forked from OSGeo/gdal
-
Notifications
You must be signed in to change notification settings - Fork 1
/
GDALmake.opt.in
255 lines (209 loc) · 5.58 KB
/
GDALmake.opt.in
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
top_builddir = $(GDAL_ROOT)
#
# the library can be built by the native build or with the help of libtool
#
HAVE_LIBTOOL = @HAVE_LIBTOOL@
LIBTOOL = @LIBTOOL@
ifeq ($(HAVE_LIBTOOL),yes)
LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
LIBTOOL_LINK = $(LIBTOOL) --mode=link
LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
LIBTOOL_FINISH = $(LIBTOOL) --mode=finish --silent
LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean
else
LIBTOOL_FINISH = /bin/true
endif
CC = $(LIBTOOL_COMPILE) @CC@
CXX = $(LIBTOOL_COMPILE) @CXX@
LD = $(LIBTOOL_LINK) @CXX@
RM = $(LIBTOOL_CLEAN) /bin/rm -f *.lo
INSTALL = $(LIBTOOL_INSTALL) $(GDAL_ROOT)/install-sh -c
INSTALL_LIB = $(LIBTOOL_INSTALL) $(GDAL_ROOT)/install-sh -c
INSTALL_DATA = $(GDAL_ROOT)/install-sh -c -m 0644
INSTALL_DIR = $(GDAL_ROOT)/install-sh -d
#Flags to build optimized relese version
CXX_OPTFLAGS = @CXXFLAGS@
C_OPTFLAGS = @CFLAGS@
# Flags to build debug version
CXX_DBGFLAGS = -g -DDEBUG
C_DBGFLAGS = -g -DDEBUG
# Flags to build profiling version
CXX_PROFFLAGS = -g3 -pg -DDEBUG
C_PROFFLAGS = -g3 -pg -DDEBUG
LIBS = @LIBS@
PYTHON_INCLUDES = @PYTHON_INCLUDES@
PYTHON_LIBS = @PYTHON_LIBS@
PYTHON_CFLAGS = @PYTHON_CFLAGS@ @NUMPY_FLAG@
PYTHON = @PYTHON@
HAVE_OGDI = @HAVE_OGDI@
OGR_ENABLED = @OGR_ENABLED@
prefix = @prefix@
exec_prefix = @exec_prefix@
INST_PREFIX = @exec_prefix@
INST_INCLUDE = @exec_prefix@/include
INST_DATA = @exec_prefix@/share/gdal
INST_LIB = @libdir@
INST_BIN = @bindir@
INST_PYMOD = @pymoddir@
INST_DOCS = @exec_prefix@/doc
#
# Whether we use debug flags, or optimization is determined by
# the CFG environment variable. Set to debug for debug builds.
# This is similar to the OGDI builds.
#
ifneq (,$(findstring debug,$(CFG)))
C_ODFLAGS = $(C_DBGFLAGS)
CXX_ODFLAGS = $(CXX_DBGFLAGS)
endif
ifneq (,$(findstring gprof,$(CFG)))
C_ODFLAGS = $(CXX_PROFFLAGS)
CXX_ODFLAGS = $(C_PROFFLAGS)
LNK_FLAGS = -pg
LIBS := $(filter-out -ldbmalloc,$(LIBS))
endif
ifeq ($(CFG),)
C_ODFLAGS = $(C_OPTFLAGS)
CXX_ODFLAGS = $(CXX_OPTFLAGS)
LIBS := $(filter-out -ldbmalloc,$(LIBS))
endif
CPPFLAGS = @CPPFLAGS@ -I$(GDAL_ROOT)/port
CFLAGS = @C_WFLAGS@ @C_PIC@ $(C_ODFLAGS) @EXTRA_INCLUDES@ $(USER_DEFS)
CXXFLAGS = @CXX_WFLAGS@ @CXX_PIC@ $(CXX_ODFLAGS) \
@EXTRA_INCLUDES@ $(USER_DEFS)
RANLIB = @RANLIB@
SO_EXT = @SO_EXT@
LD_SHARED = @LD_SHARED@
EXE = @EXE_EXT@
ifeq ($(notdir $(LD_SHARED)),true)
HAVE_LD_SHARED = no
else
HAVE_LD_SHARED = yes
endif
GDAL_INCLUDE = -I$(GDAL_ROOT)/port -I$(GDAL_ROOT)/gcore \
-I$(GDAL_ROOT)/ogr
# libtool targets and help variables
LIBGDAL := $(GDAL_ROOT)/libgdal.la
LIBGDAL_CURRENT := 2
LIBGDAL_REVISION := 9
LIBGDAL_AGE := 1
# native build targets and variables
GDAL_VER = 1.1
GDAL_LIB = $(GDAL_ROOT)/libgdal.a
GDAL_SLIB = $(GDAL_ROOT)/libgdal.$(GDAL_VER).$(SO_EXT)
GDAL_SLIB_LINK = -L$(GDAL_ROOT) -lgdal.$(GDAL_VER)
#GDAL_SLIB_SONAME = -Wl,-soname,libgdal.so.$(sover)
#
# OGR/PostgreSQL support.
#
HAVE_OGR_PG = @HAVE_PG@
PG_LIB = @PG_LIB@
PG_INC = @PG_INC@
LIBS += $(PG_LIB)
#
# HDF4 Support.
#
HAVE_HDF4 = @HAVE_HDF4@
HDF4_INCLUDE = @HDF4_INCLUDE@
# DODS Include file location
#
DODS_INC = @DODS_INC@
#
# JPEG2000 via Kakadu Support.
#
KAKDIR = @KAKDIR@
#
# JPEG-2000 Support via JasPer library.
#
HAVE_JASPER = @HAVE_JASPER@
#
# MrSID support via LizardTech's DSDK
#
MRSID_HOME = @MRSID_HOME@
ifneq ($(MRSID_HOME),)
MRSID_INCLUDE = -I$(MRSID_HOME)/include
MRSID_LIB = -L$(MRSID_HOME)/bin/lib -lMrSIDDecode -llt_xTrans
LIBS := $(MRSID_LIB) $(LIBS)
endif
#
# Xerces C++ XML Parser for GML.
#
HAVE_XERCES = @HAVE_XERCES@
XERCES_INCLUDE = @XERCES_INCLUDE@
#
# Oracle Spatial Support
#
HAVE_OCI = @HAVE_OCI@
OCI_INCLUDE = @OCI_INCLUDE@
#
# FMEObjects
#
ifeq (@X_FME_HOME@,)
HAVE_FME = no
FME_INCLUDE =
else
HAVE_FME = yes
FME_INCLUDE = -I@X_FME_HOME@/fmeobjects/cpp
endif
OGDI_INCLUDE = @OGDI_INCLUDE@
PNG_SETTING = @PNG_SETTING@
JPEG_SETTING = @JPEG_SETTING@
TIFF_SETTING = @TIFF_SETTING@
GEOTIFF_SETTING = @GEOTIFF_SETTING@
GIF_SETTING = @GIF_SETTING@
FITS_SETTING = @FITS_SETTING@
OGDI_SETTING = @HAVE_OGDI@
ODBC_SETTING = @ODBC_SETTING@
GDAL_LIBS = $(GDAL_LIB)
ifeq ($(OGR_ENABLED),yes)
GDAL_LIBS := $(GDAL_LIB) $(PG_LIB) $(OCI_LIB) $(GDAL_LIBS)
endif
#
# Note these codes have to exactly match the format directory names,
# and their uppercase form should be the format portion of the
# format registration entry point. eg. gdb -> GDALRegister_GDB().
#
GDAL_FORMATS = gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm \
sdts raw dted mem jdem envisat elas fit vrt usgsdem l1b \
nitf bmp pcidsk \
@OPT_GDAL_FORMATS@
#
# CONFIG_LIBS is what local program should link against, and CONFIG_LIBS_INS
# is what will be emitted into the gdal-config script that is installed
# globally.
#
ifeq ($(HAVE_LIBTOOL), yes)
CONFIG_LIBS = $(LIBGDAL)
CONFIG_LIBS_INS = -L$(INST_LIB) -lgdal
EXE_DEP_LIBS = $(LIBGDAL)
SO_EXT = la
else
ifeq ($(HAVE_LD_SHARED),yes)
CONFIG_LIBS = $(GDAL_SLIB_LINK) $(LIBS)
CONFIG_LIBS_INS = -L$(INST_LIB) -lgdal.$(GDAL_VER)
EXE_DEP_LIBS = $(GDAL_SLIB)
else
CONFIG_LIBS = $(GDAL_LIBS) $(LIBS)
CONFIG_LIBS_INS = $(foreach LF,$(GDAL_LIBS),$(INST_LIB)/$(notdir $(LF)))\
$(LIBS)
EXE_DEP_LIBS = $(GDAL_LIB)
endif
endif # HAVE_LIBTOOL
#
# generic library rules
#
#
# gdal and ogr low level drivers use the following default rules in order to
# populate the ../o/ directory with all object and library object files
#
O_OBJ = $(foreach file,$(OBJ),../o/$(file))
../o/%.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
../o/%.o: %.cpp
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
#
# default rules for handling subdirectories
#
%-target:
$(MAKE) -C $*
%-clean:
$(MAKE) -C $* clean