| 1 |
GDAL_ROOT = . |
|---|
| 2 |
|
|---|
| 3 |
!INCLUDE nmake.opt |
|---|
| 4 |
|
|---|
| 5 |
############################################################################## |
|---|
| 6 |
# We need to add vb6 support if STDCALL is defined. |
|---|
| 7 |
!IFDEF STDCALL |
|---|
| 8 |
VB6_OBJ = vb6\vb6_support.obj |
|---|
| 9 |
VB6_TARGET = vb6_dir |
|---|
| 10 |
!ENDIF |
|---|
| 11 |
|
|---|
| 12 |
############################################################################## |
|---|
| 13 |
# The following determines whether we are linking all the OGR formats |
|---|
| 14 |
# into the DLL, or only the minimum spatial reference related stuff required |
|---|
| 15 |
# for a raster-gdal build. |
|---|
| 16 |
|
|---|
| 17 |
#OGR_BASE_INCLUDE = /INCLUDE:_OCTNewCoordinateTransformation@8 \ |
|---|
| 18 |
# /INCLUDE:_OGRFeatureStylePuller@0 \ |
|---|
| 19 |
# /INCLUDE:_OSRValidate@4 \ |
|---|
| 20 |
# /INCLUDE:_OPTGetProjectionMethods@0 \ |
|---|
| 21 |
# /INCLUDE:_OGR_G_GetPointCount@4 |
|---|
| 22 |
|
|---|
| 23 |
OGR_BASE_INCLUDE = /INCLUDE:_OGRFeatureStylePuller \ |
|---|
| 24 |
/INCLUDE:_OSRValidate \ |
|---|
| 25 |
/INCLUDE:_OPTGetProjectionMethods \ |
|---|
| 26 |
/INCLUDE:_OGR_G_GetPointCount |
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
!IFDEF INCLUDE_OGR_FRMTS |
|---|
| 30 |
CPPFLAGS = $(CPPFLAGS) -DOGR_ENABLED |
|---|
| 31 |
OGR_OBJ = ogr\ogrsf_frmts\ogrsf_frmts.lib ogr\ogr.lib |
|---|
| 32 |
OGR_INCLUDE = $(OGR_BASE_INCLUDE) \ |
|---|
| 33 |
/INCLUDE:_OGRRegisterAll |
|---|
| 34 |
|
|---|
| 35 |
!ELSE |
|---|
| 36 |
OGR_OBJ = ogr\ogr.lib |
|---|
| 37 |
OGR_INCLUDE = $(OGR_BASE_INCLUDE) |
|---|
| 38 |
!ENDIF |
|---|
| 39 |
|
|---|
| 40 |
!IFDEF STDCALL |
|---|
| 41 |
BASE_INCLUDE = /INCLUDE:_GDALSimpleImageWarp@36 \ |
|---|
| 42 |
/INCLUDE:_GDALReprojectImage@48 \ |
|---|
| 43 |
/INCLUDE:_GDALComputeMedianCutPCT@32 \ |
|---|
| 44 |
/INCLUDE:_GDALDitherRGB2PCT@28 \ |
|---|
| 45 |
/INCLUDE:_vbSafeArrayToPtr@16 \ |
|---|
| 46 |
/INCLUDE:_OCTNewCoordinateTransformation@8 |
|---|
| 47 |
!ELSE |
|---|
| 48 |
BASE_INCLUDE = /INCLUDE:_GDALSimpleImageWarp \ |
|---|
| 49 |
/INCLUDE:_GDALReprojectImage \ |
|---|
| 50 |
/INCLUDE:_GDALComputeMedianCutPCT \ |
|---|
| 51 |
/INCLUDE:_GDALDitherRGB2PCT \ |
|---|
| 52 |
/INCLUDE:_OCTNewCoordinateTransformation |
|---|
| 53 |
!ENDIF |
|---|
| 54 |
|
|---|
| 55 |
LIBOBJ = port\*.obj gcore\*.obj alg\*.obj frmts\o\*.obj $(OGR_OBJ) $(VB6_OBJ) |
|---|
| 56 |
|
|---|
| 57 |
DISTDIR = gdal_$(VERSION) |
|---|
| 58 |
|
|---|
| 59 |
default: port_dir ogr_dir core_dir frmts_dir $(VB6_TARGET) $(GDAL_DLL) \ |
|---|
| 60 |
apps_dir pymod_dir ogr_apps |
|---|
| 61 |
|
|---|
| 62 |
staticlib: |
|---|
| 63 |
if exist gdal.lib del gdal.lib |
|---|
| 64 |
lib /out:gdal.lib $(LIBOBJ) |
|---|
| 65 |
|
|---|
| 66 |
clean: |
|---|
| 67 |
cd port |
|---|
| 68 |
$(MAKE) /f makefile.vc clean |
|---|
| 69 |
cd .. |
|---|
| 70 |
cd gcore |
|---|
| 71 |
$(MAKE) /f makefile.vc clean |
|---|
| 72 |
cd .. |
|---|
| 73 |
cd alg |
|---|
| 74 |
$(MAKE) /f makefile.vc clean |
|---|
| 75 |
cd .. |
|---|
| 76 |
cd frmts |
|---|
| 77 |
$(MAKE) /f makefile.vc clean |
|---|
| 78 |
cd .. |
|---|
| 79 |
cd ogr |
|---|
| 80 |
$(MAKE) allclean |
|---|
| 81 |
cd .. |
|---|
| 82 |
cd apps |
|---|
| 83 |
$(MAKE) /f makefile.vc clean |
|---|
| 84 |
cd .. |
|---|
| 85 |
cd pymod |
|---|
| 86 |
$(MAKE) /f makefile.vc clean |
|---|
| 87 |
cd .. |
|---|
| 88 |
cd vb6 |
|---|
| 89 |
$(MAKE) /f makefile.vc clean |
|---|
| 90 |
cd .. |
|---|
| 91 |
if exist gdal.lib del gdal.lib |
|---|
| 92 |
if exist $(GDAL_DLL) del $(GDAL_DLL) |
|---|
| 93 |
if exist gdal_i.lib del gdal_i.* |
|---|
| 94 |
-del *.ilk |
|---|
| 95 |
-del *.pdb |
|---|
| 96 |
|
|---|
| 97 |
port_dir: |
|---|
| 98 |
cd port |
|---|
| 99 |
$(MAKE) /f makefile.vc |
|---|
| 100 |
cd .. |
|---|
| 101 |
|
|---|
| 102 |
ogr_min: |
|---|
| 103 |
cd ogr |
|---|
| 104 |
$(MAKE) ogr.lib |
|---|
| 105 |
cd .. |
|---|
| 106 |
|
|---|
| 107 |
core_dir: |
|---|
| 108 |
cd gcore |
|---|
| 109 |
$(MAKE) /f makefile.vc |
|---|
| 110 |
cd ..\alg |
|---|
| 111 |
$(MAKE) /f makefile.vc |
|---|
| 112 |
cd .. |
|---|
| 113 |
|
|---|
| 114 |
frmts_dir: |
|---|
| 115 |
cd frmts |
|---|
| 116 |
$(MAKE) /f makefile.vc |
|---|
| 117 |
cd .. |
|---|
| 118 |
|
|---|
| 119 |
apps_dir: |
|---|
| 120 |
cd apps |
|---|
| 121 |
$(MAKE) /f makefile.vc |
|---|
| 122 |
cd .. |
|---|
| 123 |
|
|---|
| 124 |
pymod_dir: |
|---|
| 125 |
cd pymod |
|---|
| 126 |
if exist $(PYDIR)\python.exe $(MAKE) /f makefile.vc |
|---|
| 127 |
cd .. |
|---|
| 128 |
|
|---|
| 129 |
vb6_dir: |
|---|
| 130 |
cd vb6 |
|---|
| 131 |
$(MAKE) /f makefile.vc |
|---|
| 132 |
cd .. |
|---|
| 133 |
|
|---|
| 134 |
ogr_dir: port_dir |
|---|
| 135 |
cd frmts/iso8211 |
|---|
| 136 |
$(MAKE) /f makefile.vc |
|---|
| 137 |
cd ..\sdts |
|---|
| 138 |
$(MAKE) /f makefile.vc |
|---|
| 139 |
cd ..\..\ogr |
|---|
| 140 |
!IFDEF INCLUDE_OGR_FRMTS |
|---|
| 141 |
$(MAKE) ogr.lib frmts |
|---|
| 142 |
!ELSE |
|---|
| 143 |
$(MAKE) ogr.lib |
|---|
| 144 |
!ENDIF |
|---|
| 145 |
cd .. |
|---|
| 146 |
|
|---|
| 147 |
ogr_apps: |
|---|
| 148 |
cd ogr |
|---|
| 149 |
!IFDEF INCLUDE_OGR_FRMTS |
|---|
| 150 |
$(MAKE) default |
|---|
| 151 |
!ENDIF |
|---|
| 152 |
cd .. |
|---|
| 153 |
|
|---|
| 154 |
lib_dist: default |
|---|
| 155 |
rm -rf $(DISTDIR) |
|---|
| 156 |
mkdir $(DISTDIR) |
|---|
| 157 |
cp gdal.lib port\*.h gcore\*.h ogr\*.h $(DISTDIR) |
|---|
| 158 |
zip -r $(DISTDIR).zip $(DISTDIR) |
|---|
| 159 |
|
|---|
| 160 |
$(GDAL_DLL): staticlib |
|---|
| 161 |
link /dll /debug $(OGR_INCLUDE) $(BASE_INCLUDE) $(LIBOBJ) \ |
|---|
| 162 |
$(EXTERNAL_LIBS) gcore\Version.res \ |
|---|
| 163 |
/out:$(GDAL_DLL) /implib:gdal_i.lib $(LINKER_FLAGS) |
|---|
| 164 |
|
|---|
| 165 |
install: $(GDAL_DLL) apps_dir pymod_dir |
|---|
| 166 |
-mkdir $(BINDIR) |
|---|
| 167 |
-mkdir $(DATADIR) |
|---|
| 168 |
xcopy /y /r /d /f $(GDAL_DLL) $(BINDIR) |
|---|
| 169 |
if exist $(GDAL_DLL).manifest xcopy /y /r /d /f $(GDAL_DLL).manifest $(BINDIR) |
|---|
| 170 |
cd apps |
|---|
| 171 |
$(MAKE) /f makefile.vc install |
|---|
| 172 |
cd ..\pymod |
|---|
| 173 |
if exist $(PYDIR)\python.exe $(MAKE) /f makefile.vc install |
|---|
| 174 |
cd .. |
|---|
| 175 |
xcopy /y /r /d /f data\*.* $(DATADIR) |
|---|
| 176 |
!IFDEF HTMLDIR |
|---|
| 177 |
-mkdir $(HTMLDIR) |
|---|
| 178 |
cd frmts |
|---|
| 179 |
$(MAKE) /f makefile.vc html-install |
|---|
| 180 |
cd .. |
|---|
| 181 |
!ENDIF |
|---|
| 182 |
!IFDEF INCLUDE_OGR_FRMTS |
|---|
| 183 |
cd ogr |
|---|
| 184 |
$(MAKE) install |
|---|
| 185 |
cd .. |
|---|
| 186 |
!IFDEF HTMLDIR |
|---|
| 187 |
cd ogr\ogrsf_frmts |
|---|
| 188 |
$(MAKE) /f Makefile html-install |
|---|
| 189 |
cd ..\.. |
|---|
| 190 |
!ENDIF |
|---|
| 191 |
!ENDIF |
|---|
| 192 |
|
|---|
| 193 |
devinstall: install |
|---|
| 194 |
-mkdir $(INCDIR) |
|---|
| 195 |
-mkdir $(LIBDIR) |
|---|
| 196 |
copy port\*.h $(INCDIR) |
|---|
| 197 |
copy gcore\*.h $(INCDIR) |
|---|
| 198 |
copy alg\*.h $(INCDIR) |
|---|
| 199 |
copy ogr\*.h $(INCDIR) |
|---|
| 200 |
!IFDEF INCLUDE_OGR_FRMTS |
|---|
| 201 |
copy ogr\ogrsf_frmts\*.h $(INCDIR) |
|---|
| 202 |
!ENDIF |
|---|
| 203 |
copy gdal_i.lib $(LIBDIR) |
|---|
| 204 |
|
|---|