aboutsummaryrefslogtreecommitdiff
path: root/ports/libspatialite/fix-makefiles.patch
blob: 9372739bbbbfcc0ea0cb195ed1f083aeae2fb3a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
diff --git a/makefile.vc b/makefile.vc
index 9b9e8ee..b524a27 100644
--- a/makefile.vc
+++ b/makefile.vc
@@ -59,7 +59,7 @@ LIBOBJ = src\gaiaaux\gg_sqlaux.obj src\gaiaaux\gg_utf8.obj \
 	src\versioninfo\version.obj src\virtualtext\virtualtext.obj
 SPATIALITE_DLL = spatialite$(VERSION).dll
 
-CFLAGS = /nologo -I.\src\headers -I. -IC:\OSGeo4W\include $(OPTFLAGS)
+CFLAGS = /nologo -I.\src\headers -I. -I$(INSTALLED_ROOT)\include $(OPTFLAGS)
 
 default:	all
 
@@ -73,12 +73,9 @@ spatialite.lib:	$(LIBOBJ)
 $(SPATIALITE_DLL):	spatialite_i.lib
 
 spatialite_i.lib:     $(LIBOBJ)
-	link /debug /dll /out:$(SPATIALITE_DLL) \
+	link $(LINK_FLAGS) /dll /out:$(SPATIALITE_DLL) \
 		/implib:spatialite_i.lib $(LIBOBJ) \
-		C:\OSGeo4W\lib\proj_i.lib C:\OSGeo4W\lib\geos_c.lib \
-		C:\OSGeo4w\lib\freexl_i.lib C:\OSGeo4w\lib\iconv.lib \
-		C:\OSGeo4W\lib\sqlite3_i.lib C:\OSGeo4W\lib\zlib.lib \
-		C:\OSGeo4W\lib\libxml2.lib
+		$(LIBS_ALL)
 	if exist $(SPATIALITE_DLL).manifest mt -manifest \
 		$(SPATIALITE_DLL).manifest -outputresource:$(SPATIALITE_DLL);2
 		
@@ -90,16 +87,7 @@ clean:
 	del *.exp
 	del *.manifest
 	del *.lib
-	del src\gaiaaux\*.obj
-	del src\gaiaexif\*.obj
-	del src\gaiageo\*.obj
-	del src\spatialite\*.obj
-	del src\srsinit\*.obj
-	del src\versioninfo\*.obj
-	del src\virtualtext\*.obj
-	del src\wfs\*.obj
-	del src\dxf\*.obj
-	del src\md5\*.obj
+	forfiles /m *.obj* /s /c "cmd /c del @path" & exit 0
 	del *.pdb
 
 install: all
diff --git a/nmake.opt b/nmake.opt
index 0960ec1..276bc84 100644
--- a/nmake.opt
+++ b/nmake.opt
@@ -1,8 +1,8 @@
 # Directory tree where SpatiaLite will be installed.
-INSTDIR=C:\OSGeo4W
+INSTDIR=$(INST_DIR)
 
 # Uncomment the first for an optimized build, or the second for debug.
-OPTFLAGS=	/nologo /Ox /fp:precise /W3 /MD /D_CRT_SECURE_NO_WARNINGS \
+OPTFLAGS=	/nologo /fp:precise /W3 $(CL_FLAGS) /D_CRT_SECURE_NO_WARNINGS \
 		/DDLL_EXPORT /DYY_NO_UNISTD_H
 #OPTFLAGS=	/nologo /Zi /MD /Fdspatialite.pdb /DDLL_EXPORT