1
1
Fork 0

Add build scripts for MSVC

Files provided by Alessandro Furieri
skippip
Sandro Santilli 2016-04-25 17:19:10 +02:00
parent 55e782a20a
commit fd83091bcd
2 changed files with 75 additions and 0 deletions

62
makefile.vc Normal file
View File

@ -0,0 +1,62 @@
# $Id: makefile.vc 2016/04/24 Sandro Furieri $
#
# NMAKE Makefile to build librttopo on Windows
#
!INCLUDE nmake.opt
LIBOBJ = src\box2d.obj src\bytebuffer.obj src\g_box.obj \
src\g_serialized.obj src\g_util.obj src\measures3d.obj src\measures.obj \
src\ptarray.obj src\rtalgorithm.obj src\rtcircstring.obj src\rtcollection.obj \
src\rtcompound.obj src\rtcurvepoly.obj src\rtgeodetic.obj \
src\rtgeom_api.obj src\rtgeom.obj src\rtgeom_debug.obj src\rtgeom_geos.obj \
src\rtgeom_geos_clean.obj src\rtgeom_geos_node.obj src\rtgeom_geos_split.obj \
src\rtgeom_topo.obj src\rthomogenize.obj src\rtin_geojson.obj src\rtin_twkb.obj \
src\rtin_wkb.obj src\rtiterator.obj src\rtlinearreferencing.obj src\rtline.obj \
src\rtmcurve.obj src\rtmline.obj src\rtmpoint.obj src\rtmpoly.obj src\rtmsurface.obj \
src\rtout_encoded_polyline.obj src\rtout_geojson.obj src\rtout_gml.obj \
src\rtout_kml.obj src\rtout_svg.obj src\rtout_twkb.obj src\rtout_wkb.obj \
src\rtout_wkt.obj src\rtout_x3d.obj src\rtpoint.obj src\rtpoly.obj src\rtprint.obj \
src\rtpsurface.obj src\rtspheroid.obj src\rtstroke.obj src\rttin.obj src\rttree.obj \
src\rttriangle.obj src\rtutil.obj src\stringbuffer.obj src\varint.obj
LIBRTTOPO_DLL = librttopo$(VERSION).dll
CFLAGS = /nologo -IC:\OSGeo4W\include -I. -Iheaders $(OPTFLAGS)
default: all
all: librttopo.lib librttopo_i.lib
librttopo.lib: $(LIBOBJ)
if exist librttopo.lib del librttopo.lib
lib /out:librttopo.lib $(LIBOBJ)
$(LIBRTTOPO_DLL): librttopo_i.lib
librttopo_i.lib: $(LIBOBJ)
link /debug /dll /out:$(LIBRTTOPO_DLL) \
/implib:librrttopo_i.lib $(LIBOBJ) \
C:\OSGeo4W\lib\geos_c.lib
if exist $(LIBRTTOPO_DLL).manifest mt -manifest \
$(LIBRTTOPO_DLL).manifest -outputresource:$(LIBRTTOPO_DLL);2
.c.obj:
$(CC) $(CFLAGS) /c $*.c /Fo$@
clean:
del *.dll
del *.exp
del *.manifest
del *.lib
del src\*.obj
del *.pdb
install: all
-mkdir $(INSTDIR)
-mkdir $(INSTDIR)\bin
-mkdir $(INSTDIR)\lib
-mkdir $(INSTDIR)\include
copy *.dll $(INSTDIR)\bin
copy *.lib $(INSTDIR)\lib
copy headers\*.h $(INSTDIR)\include

13
nmake.opt Normal file
View File

@ -0,0 +1,13 @@
# Directory tree where RTTOPO will be installed.
INSTDIR=C:\OSGeo4W
# Uncomment the first for an optimized build, or the second for debug.
OPTFLAGS= /nologo /Ox /fp:precise /W4 /MD /D_CRT_SECURE_NO_WARNINGS \
/DDLL_EXPORT
#OPTFLAGS= /nologo /Zi /MD /Fdlibrttopo.pdb /DDLL_EXPORT
# Set the version number for the DLL. Normally we leave this blank since
# we want software that is dynamically loading the DLL to have no problem
# with version numbers.
VERSION=