# $Id: makefile.vc,v 1.5 2006/12/06 15:38:16 mloskot Exp $ # # Makefile to build GDAL C++ Unit Tests (subset of Python tests) # # These tests are dedicated to Windows CE platform and cover features # supported by Windows CE port of GDAL. # Also, compilable and runnable on Windows 2000/XP. # ############################################################################# # CONFIGURATION GDAL_VERSION = 19dev GDAL_ROOT = ..\.. # GDAL library !IFNDEF GDAL_ROOT GDAL_ROOT = ..\..\gdal !ENDIF GDAL_LIB = $(GDAL_ROOT)\gdal_i.lib # Specification of enabled GDAL drivers #GDAL_SUPPORT = \ # -DHAVE_GEOS \ # -DOGR_ENABLED \ # -DSHAPE_ENABLED \ # -DFRMT_aaigrid \ # -DFRMT_dted \ # -DFRMT_gtiff GDAL_SUPPORT = \ -DOGR_ENABLED \ -DSHAPE_ENABLED \ -DFRMT_aaigrid \ -DFRMT_dted \ -DFRMT_gtiff # END OF CONFIGURATION ############################################################################# INCLUDE_DIR = \ -I. \ -Itut \ -I$(GDAL_ROOT)\port \ -I$(GDAL_ROOT)\alg \ -I$(GDAL_ROOT)\gcore \ -I$(GDAL_ROOT)\ogr \ -I$(GDAL_ROOT)\ogr/ogrsf_frmts \ -I$(PROJ4_ROOT)\src OBJ = \ test_cpl.obj \ test_gdal.obj \ test_gdal_aaigrid.obj \ test_gdal_dted.obj \ test_gdal_gtiff.obj \ test_ogr.obj \ test_ogr_geos.obj \ test_ogr_shape.obj \ test_osr.obj \ test_osr_ct.obj \ test_osr_pci.obj \ test_osr_proj4.obj \ tut/tut_gdal.obj # Commands RM = -del # Always compile tests in debug mode OPTFLAGS = /nologo /MDd /EHsc /W3 /Od /Zi \ /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE # Preprocessor definitions CPPFLAGS = /D "WIN32" /D "_DEBUG" /D "UNICODE" /D "_UNICODE" /D "_CONSOLE" \ $(GDAL_SUPPORT) # Complete set of compilation flags CFLAGS = $(OPTFLAGS) $(CPPFLAGS) $(INCLUDE_DIR) GDAL_DLL = gdal$(GDAL_VERSION).dll GDAL_TEST_EXE = gdal_unit_test.exe default: $(GDAL_TEST_EXE) testcopywords.exe testperfcopywords.exe check: $(GDAL_TEST_EXE) $(GDAL_TEST_EXE) $(GDAL_TEST_EXE): gdal_unit_test.cpp $(GDAL_DLL) $(OBJ) $(CC) gdal_unit_test.cpp $(CFLAGS) $(OBJ) $(GDAL_LIB) $(GEOS_LIB) $(PROJ4_LIB) if exist $(GDAL_TEST_EXE).manifest mt -manifest $(GDAL_TEST_EXE).manifest -outputresource:$(GDAL_TEST_EXE);1 testcopywords.exe: testcopywords.cpp $(CC) testcopywords.cpp $(CFLAGS) $(GDAL_LIB) if exist testcopywords.exe.manifest mt -manifest testcopywords.exe.manifest -outputresource:testcopywords.exe;1 testperfcopywords.exe: testperfcopywords.cpp $(CC) testperfcopywords.cpp $(CFLAGS) $(GDAL_LIB) if exist testperfcopywords.exe.manifest mt -manifest testperfcopywords.exe.manifest -outputresource:testperfcopywords.exe;1 copy-gdal-dll: $(GDAL_DLL) $(GDAL_DLL): $(GDAL_ROOT)\$(GDAL_DLL) copy $(GDAL_ROOT)\$(GDAL_DLL) . .cpp.obj: $(CC) $(CFLAGS) /c $*.cpp /Fo$@ .c.obj: $(CC) $(CFLAGS) /c $*.c /Fo$@ clean: $(RM) *~ $(RM) *.dll $(RM) *.exe $(RM) *.exp $(RM) *.ilk $(RM) *.lib $(RM) *.manifest $(RM) *.obj $(RM) *.pdb $(RM) tmp\*.dbf $(RM) tmp\*.dt0 $(RM) tmp\*.grd $(RM) tmp\*.shp $(RM) tmp\*.shx $(RM) tut\*.obj