forked from OSGeo/shapelib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.vc
90 lines (66 loc) · 2.84 KB
/
makefile.vc
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#CFLAGS = /DSHPAPI_CALL=__stdcall
# 4100: 'identifier' : unreferenced formal parameter
CFLAGS = /nologo /Ox /MD /W4 /wd4100 /D_CRT_SECURE_NO_DEPRECATE /DSHAPELIB_DLLEXPORT
IMPORT_LIB = shapelib_i.lib
STATIC_LIB = shapelib.lib
DLLNAME = shapelib.dll
LINK_LIB = $(IMPORT_LIB)
OBJ = shpopen.obj dbfopen.obj shptree.obj safileio.obj sbnsearch.obj
all: $(STATIC_LIB) $(DLLNAME) \
shpcreate.exe shpadd.exe shpdump.exe shprewind.exe dbfcreate.exe \
dbfadd.exe dbfdump.exe shptest.exe shptreedump.exe
shpopen.obj: shpopen.c shapefil.h
$(CC) $(CFLAGS) -c shpopen.c
shptree.obj: shptree.c shapefil.h
$(CC) $(CFLAGS) -c shptree.c
dbfopen.obj: dbfopen.c shapefil.h
$(CC) $(CFLAGS) -c dbfopen.c
safileio.obj: safileio.c shapefil.h
$(CC) $(CFLAGS) -c safileio.c
sbnsearch.obj: sbnsearch.c shapefil.h
$(CC) $(CFLAGS) -c sbnsearch.c
shpcreate.exe: shpcreate.c $(LINK_LIB)
$(CC) $(CFLAGS) shpcreate.c $(LINK_LIB) $(LINKOPT)
if exist [email protected] mt -manifest [email protected] -outputresource:$@;1
shpadd.exe: shpadd.c $(LINK_LIB)
$(CC) $(CFLAGS) shpadd.c $(LINK_LIB) $(LINKOPT)
if exist [email protected] mt -manifest [email protected] -outputresource:$@;1
shpdump.exe: shpdump.c $(LINK_LIB)
$(CC) $(CFLAGS) shpdump.c $(LINK_LIB) $(LINKOPT)
if exist [email protected] mt -manifest [email protected] -outputresource:$@;1
shprewind.exe: shprewind.c $(LINK_LIB)
$(CC) $(CFLAGS) shprewind.c $(LINK_LIB) $(LINKOPT)
if exist [email protected] mt -manifest [email protected] -outputresource:$@;1
dbfcreate.exe: dbfcreate.c $(LINK_LIB)
$(CC) $(CFLAGS) dbfcreate.c $(LINK_LIB) $(LINKOPT)
if exist [email protected] mt -manifest [email protected] -outputresource:$@;1
dbfadd.exe: dbfadd.c $(LINK_LIB)
$(CC) $(CFLAGS) dbfadd.c $(LINK_LIB) $(LINKOPT)
if exist [email protected] mt -manifest [email protected] -outputresource:$@;1
dbfdump.exe: dbfdump.c $(LINK_LIB)
$(CC) $(CFLAGS) dbfdump.c $(LINK_LIB) $(LINKOPT)
if exist [email protected] mt -manifest [email protected] -outputresource:$@;1
shptest.exe: shptest.c $(LINK_LIB)
$(CC) $(CFLAGS) shptest.c $(LINK_LIB) $(LINKOPT)
if exist [email protected] mt -manifest [email protected] -outputresource:$@;1
shputils.exe: shputils.c $(LINK_LIB)
$(CC) $(CFLAGS) shputils.c $(LINK_LIB) $(LINKOPT)
if exist [email protected] mt -manifest [email protected] -outputresource:$@;1
shptreedump.exe: shptreedump.c $(LINK_LIB)
$(CC) $(CFLAGS) shptreedump.c $(LINK_LIB) $(LINKOPT)
if exist [email protected] mt -manifest [email protected] -outputresource:$@;1
shpdiff.exe: shpdiff.c $(LINK_LIB)
$(CC) $(CFLAGS) shpdiff.c $(LINK_LIB) $(LINKOPT)
if exist [email protected] mt -manifest [email protected] -outputresource:$@;1
clean:
-del *.obj
-del *.exe
-del *.lib
-del *.dll
-del *.manifest
$(STATIC_LIB): $(OBJ)
lib /nologo /out:$(STATIC_LIB) $(OBJ)
$(IMPORT_LIB): $(DLLNAME)
$(DLLNAME): $(OBJ)
link /nologo /dll /out:$(DLLNAME) /implib:$(IMPORT_LIB) $(OBJ)
if exist $(DLLNAME).manifest mt /nologo -manifest $(DLLNAME).manifest -outputresource:$(DLLNAME);2