aboutsummaryrefslogtreecommitdiff
path: root/ports/readosm/fix-makefiles.patch
blob: 3904b5136aa488dbcd5d6a559cfdb889df894721 (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
diff --git a/makefile.vc b/makefile.vc
index 791aedf..d294548 100644
--- a/makefile.vc
+++ b/makefile.vc
@@ -8,7 +8,7 @@ LIBOBJ	               =	src\readosm.obj src\osmxml.obj \
 							src\protobuf.obj src\osm_objects.obj
 READOSM_DLL	 	       =	readosm$(VERSION).dll
 
-CFLAGS	=	/nologo -IC:\OSGeo4W\include -Iheaders $(OPTFLAGS)
+CFLAGS	=	/nologo -I$(INSTALLED_ROOT)\include -Iheaders $(OPTFLAGS)
 
 default:	all
 
@@ -21,9 +21,9 @@ readosm.lib:	$(LIBOBJ)
 $(READOSM_DLL):	readosm_i.lib
 
 readosm_i.lib:	$(LIBOBJ)
-	link /debug /dll /out:$(READOSM_DLL) \
+	link $(LINK_FLAGS) /dll /out:$(READOSM_DLL) \
 		/implib:readosm_i.lib $(LIBOBJ) \
-		C:\OSGeo4w\lib\libexpat.lib C:\OSGeo4w\lib\zlib.lib
+		$(LIBS_ALL)
 	if exist $(READOSM_DLL).manifest mt -manifest \
 		$(READOSM_DLL).manifest -outputresource:$(READOSM_DLL);2 
 		
@@ -35,7 +35,7 @@ clean:
 	del *.exp
 	del *.manifest
 	del *.lib
-	del *.obj
+	del src\*.obj
 	del *.pdb
 
 install: all
diff --git a/nmake.opt b/nmake.opt
index 5e45c0e..61c44f9 100644
--- a/nmake.opt
+++ b/nmake.opt
@@ -1,8 +1,8 @@
 # Directory tree where ReadOSM 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
 #OPTFLAGS=	/nologo /Zi /MD /Fdreadosm.pdb /DDLL_EXPORT