forked from OSGeo/gdal
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakefile.vc
158 lines (137 loc) · 3.08 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
GDAL_ROOT = .
!INCLUDE nmake.opt
##############################################################################
# The following determines whether we are linking all the OGR formats
# into the DLL, or only the minimum spatial reference related stuff required
# for a raster-gdal build.
!IFDEF INCLUDE_OGR_FRMTS
OGR_OBJ = ogr\ogrsf_frmts\ogrsf_frmts.lib ogr\ogr.lib
OGR_INCLUDE = /INCLUDE:_OCTNewCoordinateTransformation \
/INCLUDE:_OGRRegisterAll \
/INCLUDE:_OGRFeatureStylePuller \
/INCLUDE:_OSRValidate \
/INCLUDE:_OPTGetProjectionMethods \
/INCLUDE:_OGR_G_GetPointCount
!ELSE
OGR_OBJ = ogr\ogr.lib
OGR_INCLUDE = /INCLUDE:_OCTNewCoordinateTransformation /INCLUDE:_OGRFree \
/INCLUDE:_OPTGetParameterList
!ENDIF
BASE_INCLUDE = /INCLUDE:_GDALSimpleImageWarp \
/INCLUDE:_GDALSuggestedWarpOutput \
/INCLUDE:_GDALGCPTransform \
/INCLUDE:_GDALComputeMedianCutPCT \
/INCLUDE:_GDALDitherRGB2PCT
LIBOBJ = port\*.obj gcore\*.obj alg\*.obj frmts\o\*.obj $(OGR_OBJ)
DISTDIR = gdal_$(VERSION)
default: port_dir ogr_dir core_dir frmts_dir $(GDAL_DLL) \
apps_dir pymod_dir ogr_apps
lib:
if exist gdal.lib del gdal.lib
lib /out:gdal.lib $(LIBOBJ)
clean:
cd port
$(MAKE) /f makefile.vc clean
cd ..
cd gcore
$(MAKE) /f makefile.vc clean
cd ..
cd alg
$(MAKE) /f makefile.vc clean
cd ..
cd frmts
$(MAKE) /f makefile.vc clean
cd ..
cd ogr
$(MAKE) allclean
cd ..
cd apps
$(MAKE) /f makefile.vc clean
cd ..
cd pymod
$(MAKE) /f makefile.vc clean
cd ..
if exist gdal.lib del gdal.lib
if exist $(GDAL_DLL) del $(GDAL_DLL)
if exist gdal_i.lib del gdal_i.*
-del *.ilk
-del *.pdb
port_dir:
cd port
$(MAKE) /f makefile.vc
cd ..
ogr_min:
cd ogr
$(MAKE) ogr.lib
cd ..
core_dir:
cd gcore
$(MAKE) /f makefile.vc
cd ..\alg
$(MAKE) /f makefile.vc
cd ..
frmts_dir:
cd frmts
$(MAKE) /f makefile.vc
cd ..
apps_dir:
cd apps
$(MAKE) /f makefile.vc
cd ..
pymod_dir:
cd pymod
if exist $(PYDIR)\python.exe $(MAKE) /f makefile.vc
cd ..
ogr_dir: port_dir
cd frmts/iso8211
$(MAKE) /f makefile.vc
cd ..\sdts
$(MAKE) /f makefile.vc
cd ..\..\ogr
!IFDEF INCLUDE_OGR_FRMTS
$(MAKE) ogr.lib frmts
!ELSE
$(MAKE) ogr.lib
!ENDIF
cd ..
ogr_apps:
cd ogr
!IFDEF INCLUDE_OGR_FRMTS
$(MAKE) default
!ENDIF
cd ..
lib_dist: default
rm -rf $(DISTDIR)
mkdir $(DISTDIR)
cp gdal.lib port\*.h gcore\*.h ogr\*.h $(DISTDIR)
zip -r $(DISTDIR).zip $(DISTDIR)
$(GDAL_DLL): lib
link /dll /debug $(OGR_INCLUDE) $(BASE_INCLUDE) $(LIBOBJ) \
$(EXTERNAL_LIBS) \
/out:$(GDAL_DLL) /implib:gdal_i.lib $(LINKER_FLAGS)
install: $(GDAL_DLL) apps_dir pymod_dir
-mkdir $(BINDIR)
-mkdir $(DATADIR)
xcopy /y /r /d /f $(GDAL_DLL) $(BINDIR)
cd apps
$(MAKE) /f makefile.vc install
cd ..\pymod
if exist $(PYDIR)\python.exe $(MAKE) /f makefile.vc install
cd ..
xcopy /y /r /d /f data\*.* $(DATADIR)
!IFDEF INCLUDE_OGR_FRMTS
cd ogr
$(MAKE) install
!ENDIF
cd ..
devinstall: install
-mkdir $(INCDIR)
-mkdir $(LIBDIR)
copy port\*.h $(INCDIR)
copy gcore\*.h $(INCDIR)
copy alg\*.h $(INCDIR)
copy ogr\*.h $(INCDIR)
!IFDEF INCLUDE_OGR_FRMTS
copy ogr\ogrsf_frmts\*.h $(INCDIR)
!ENDIF
copy gdal_i.lib $(LIBDIR)