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
|
#
# Typically the only thing that needs to be changed are the paths to the
# TIFF tree. Note that we expect an existing build tree, in part because we
# need private include files from libtiff, but also we need access to getopt.h.
# in the ports directory.
#
# You may want to add optimization options to the CFLAGS macro as well.
#
OSGEO4W = c:\OSGeo4W
TIFF_INC = -I$(OSGEO4W)\include
TIFF_LIB_DLL = $(OSGEO4W)\lib\libtiff_i.lib
# Installation locations (with install, or devinstall targets)
PREFIX = release
BINDIR = $(PREFIX)\bin
LIBDIR = $(PREFIX)\lib
INCDIR = $(PREFIX)\include
DATADIR = $(PREFIX)\share\epsg_csv
#
CC = cl
INCL = -I. -Ilibxtiff $(TIFF_INC)
# Pick the first LIBS definition for a static libtiff.lib or the second
# to link against the libtiff DLL.
#LIBS = geotiff.lib $(TIFF_LIB)
LIBS = geotiff_i.lib $(TIFF_LIB_DLL)
DLLNAME = geotiff.dll
# Set optimization or debug flags here.
CFLAGS = $(INCL) /MD /Ox /nologo
#CFLAGS = $(INCL) /MD /Zi /nologo
#
OBJS = \
xtiff.obj \
geo_free.obj \
geo_get.obj \
geo_names.obj \
geo_new.obj \
geo_print.obj \
geo_set.obj \
geo_tiffp.obj \
geo_write.obj \
geo_extra.obj \
geo_trans.obj \
geo_normalize.obj \
geotiff_proj4.obj \
geo_simpletags.obj \
cpl_csv.obj \
cpl_serv.obj
all: geo_config.h geotiff.lib $(DLLNAME) listgeo.exe geotifcp.exe
listgeo.exe: bin\listgeo.c geotiff.lib
$(CC) $(CFLAGS) bin\listgeo.c $(LIBS)
geotifcp.exe: bin\geotifcp.c geotiff.lib
$(CC) $(CFLAGS) bin\geotifcp.c bin\getopt.c $(LIBS)
gt_update.exe: bin\gt_update.c geotiff.lib
$(CC) $(CFLAGS) bin\gt_update.c bin\getopt.c geotiff.lib $(LIBS)
geotiff.lib: $(OBJS)
lib /out:geotiff.lib $(OBJS)
#
$(DLLNAME): $(OBJS)
link /dll /out:$(DLLNAME) /implib:geotiff_i.lib $(OBJS) $(TIFF_LIB_DLL)
if exist $(DLLNAME).manifest mt -manifest $(DLLNAME).manifest -outputresource:$(DLLNAME);2
geo_config.h: geo_config.h.vc
copy geo_config.h.vc geo_config.h
xtiff.obj: libxtiff\xtiff.c
$(CC) -c $(CFLAGS) libxtiff\xtiff.c
geo_free.obj: geo_free.c
$(CC) -c $(CFLAGS) geo_free.c
geo_get.obj: geo_get.c
$(CC) -c $(CFLAGS) geo_get.c
geo_names.obj: geo_names.c
$(CC) -c $(CFLAGS) geo_names.c
geo_new.obj: geo_new.c
$(CC) -c $(CFLAGS) geo_new.c
geo_print.obj: geo_print.c
$(CC) -c $(CFLAGS) geo_print.c
geo_set.obj: geo_set.c
$(CC) -c $(CFLAGS) geo_set.c
geo_tiffp.obj: geo_tiffp.c
$(CC) -c $(CFLAGS) geo_tiffp.c
geo_write.obj: geo_write.c
$(CC) -c $(CFLAGS) geo_write.c
geo_trans.obj: geo_trans.c
$(CC) -c $(CFLAGS) geo_trans.c
geo_extra.obj: geo_extra.c
$(CC) -c $(CFLAGS) geo_extra.c
geo_normalize.obj: geo_normalize.c
$(CC) -c $(CFLAGS) geo_normalize.c
geotiff_proj4.obj: geotiff_proj4.c
$(CC) -c $(CFLAGS) geotiff_proj4.c
cpl_csv.obj: cpl_csv.c
$(CC) -c $(CFLAGS) cpl_csv.c
cpl_serv.obj: cpl_serv.c
$(CC) -c $(CFLAGS) cpl_serv.c
clean:
-del *.obj
-del *.exe
-del *.lib
-del *.dll
-del *.manifest
install: all
-mkdir $(PREFIX)
-mkdir $(BINDIR)
-mkdir $(DATADIR)
copy *.dll $(BINDIR)
copy *.exe $(BINDIR)
-copy csv\*.csv $(DATADIR)
devinstall: install
-mkdir $(INCDIR)
-mkdir $(LIBDIR)
copy *.lib $(LIBDIR)
copy *.h $(INCDIR)
copy libxtiff\*.h $(INCDIR)
copy *.inc $(INCDIR)
|