File: GDALmake.opt.in

package info (click to toggle)
gdal 2.4.2+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 106,252 kB
  • sloc: cpp: 1,034,818; ansic: 177,912; python: 23,610; perl: 7,420; sh: 6,283; java: 5,382; xml: 3,100; cs: 2,343; yacc: 1,198; makefile: 519; sql: 112
file content (686 lines) | stat: -rw-r--r-- 14,731 bytes parent folder | download
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
# -*- Makefile -*- for emacs.
GDAL_ROOT	=	@abs_top_builddir@
top_builddir	=	$(GDAL_ROOT)

#
# the library can be built by the native build or with the help of libtool
#

SHELL    =   @SHELL@
HAVE_LIBTOOL	=	@HAVE_LIBTOOL@
LIBTOOL	=	@LIBTOOL@
ifeq ($(HAVE_LIBTOOL),yes)
LIBTOOL_COMPILE_CC =	$(LIBTOOL) --mode=compile --silent --tag=CC
LIBTOOL_COMPILE_CXX =	$(LIBTOOL) --mode=compile --silent --tag=CXX
LIBTOOL_LINK	=	$(LIBTOOL) --mode=link --silent
LIBTOOL_INSTALL	=	$(LIBTOOL) --mode=install --silent
LIBTOOL_FINISH	=	$(LIBTOOL) --mode=finish --silent
LIBTOOL_CLEAN	=	$(LIBTOOL) --mode=clean --silent
OBJ_EXT = lo
else
LIBTOOL_FINISH	=	@BINTRUE@
OBJ_EXT = o
endif

CC	=	$(LIBTOOL_COMPILE_CC) @CC@
CXX	=	$(LIBTOOL_COMPILE_CXX) @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

# SDE_LIB needs to be first because it embeds zlib.  We need to use its symbols instead of -lz's

LIBS	=	$(SDE_LIB) @LIBS@ $(KAK_LIBS) $(DWG_LIBS) $(CURL_LIB) \
		$(MRSID_LIBS) $(MRSID_LIDAR_LIBS) $(ECW_LIBS) $(INGRES_LIB) \
		$(PCIDSK_LIB) $(RASDAMAN_LIB) $(SOSI_LIB) \
		$(OPENCL_LIB) $(JVM_LIB) $(LIBICONV) $(FGDB_LIB) $(LIBXML2_LIB) $(MONGODB_LIB) \
		$(JNI_LIB) $(HDFS_LIB)

SSEFLAGS = @SSEFLAGS@
SSSE3FLAGS = @SSSE3FLAGS@
AVXFLAGS = @AVXFLAGS@

PYTHON = @PYTHON@
PY_HAVE_SETUPTOOLS=@PY_HAVE_SETUPTOOLS@

# Next Generation SWIG bindings
BINDINGS	=	@BINDINGS@

HAVE_OGDI = @HAVE_OGDI@
OGR_ENABLED = yes
GNM_ENABLED = @GNM_ENABLED@

OSX_FRAMEWORK_PREFIX = /Library/Frameworks/GDAL.framework
OSX_VERSION_FRAMEWORK_PREFIX = ${OSX_FRAMEWORK_PREFIX}/Versions/@GDAL_VERSION_MAJOR@.@GDAL_VERSION_MINOR@

prefix		=	@prefix@
exec_prefix	=	@exec_prefix@
INST_PREFIX	=	@exec_prefix@
INST_INCLUDE	=	@includedir@
INST_DATA 	=	@datadir@
INST_LIB	=	@libdir@
INST_BIN	=	@bindir@
INST_PYMOD      =       @pymoddir@
INST_DOCS	=	@exec_prefix@/doc
INST_MAN	=	@mandir@
INST_HTML	=	$(HOME)/www/gdal

CPPFLAGS	:= @CPPFLAGS@ -I$(GDAL_ROOT)/port @EXTRA_INCLUDES@ -DGDAL_COMPILATION
CFLAGS		= @CFLAGS@ @C_WFLAGS@ $(USER_DEFS)
CXXFLAGS	= @CXXFLAGS@ @CXX_WFLAGS@ $(USER_DEFS)
CFLAGS_NOFTRAPV          = @CFLAGS_NOFTRAPV@ @C_WFLAGS@ $(USER_DEFS)
CXXFLAGS_NOFTRAPV        = @CXXFLAGS_NOFTRAPV@ @CXX_WFLAGS@ $(USER_DEFS)
CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT           = @CXXFLAGS_NO_LTO_IF_SSSE3_NONDEFAULT@ @CXX_WFLAGS@ $(USER_DEFS)
CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT           = @CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT@ @CXX_WFLAGS@ $(USER_DEFS)

NO_UNUSED_PARAMETER_FLAG = @NO_UNUSED_PARAMETER_FLAG@
NO_SIGN_COMPARE = @NO_SIGN_COMPARE@
NO_NON_VIRTUAL_DTOR_FLAG = @NO_NON_VIRTUAL_DTOR_FLAG@
NO_LOGICAL_OP_FLAG = @NO_LOGICAL_OP_FLAG@
WARN_OLD_STYLE_CAST = @WARN_OLD_STYLE_CAST@
WARN_EFFCPLUSPLUS = @WARN_EFFCPLUSPLUS@

# Also available -DAFL_FRIENDLY for strcmp(), etc.. variants that will
# work better with American Fuzzy Lop branch examination logic

# TODO(schwehr): Make these be configure flags.
# CFLAGS += -Werror
# CFLAGS += -std=c11
# CFLAGS += -fsanitize=address
# CFLAGS += -D_FORTIFY_SOURCE=2
# CFLAGS += -fPIE -pie
# CFLAGS += -fstack-protector-all

# CXXFLAGS += -Werror
# CXXFLAGS += -std=c++11
# CXXFLAGS += -fsanitize=address
# CXXFLAGS += -D_FORTIFY_SOURCE=2
# CXXFLAGS += -fPIE -pie
# CXXFLAGS += -fstack-protector-all

LDFLAGS     = @LDFLAGS@
# LDFLAGS += -fsanitize=address

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)/alg \
                        -I$(GDAL_ROOT)/ogr -I$(GDAL_ROOT)/ogr/ogrsf_frmts \
                        -I$(GDAL_ROOT)/gnm -I$(GDAL_ROOT)/apps

# libtool targets and help variables
LIBGDAL	:=		libgdal.la
LIBGDAL_CURRENT	:=	25
LIBGDAL_REVISION	:=	2
LIBGDAL_AGE	:=	5

# native build targets and variables
GDAL_VER	=	@GDAL_VER@

# version info
GDAL_VERSION_MAJOR =    @GDAL_VERSION_MAJOR@
GDAL_VERSION_MINOR =    @GDAL_VERSION_MINOR@
GDAL_VERSION_REV   =    @GDAL_VERSION_REV@

GDAL_LIB	= 	$(GDAL_ROOT)/libgdal.a
GDAL_SLIB	=	$(GDAL_ROOT)/libgdal.$(SO_EXT)
GDAL_SLIB_LINK	=	-L$(GDAL_ROOT) -lgdal
#GDAL_SLIB_SONAME = -Wl,-soname,libgdal.$(SO_EXT).@GDAL_VERSION_MAJOR@

# Mac OS X Framework definition
MACOSX_FRAMEWORK = @MACOSX_FRAMEWORK@

#
# GDAL/OGR PostgreSQL support.
#
HAVE_OGR_PG     = @HAVE_PG@
HAVE_POSTGISRASTER  = @HAVE_PG@
PG_INC	=	@PG_INC@

#
# INGRES
#
II_SYSTEM = @II_SYSTEM@
HAVE_INGRES = @HAVE_INGRES@
INGRES_LIB = @INGRES_LIB@
INGRES_INC = @INGRES_INC@

#
# MySQL support.
#
HAVE_MYSQL =	@HAVE_MYSQL@
MYSQL_LIB  =	@MYSQL_LIB@
MYSQL_INC  =	@MYSQL_INC@
LIBS	   +=	$(MYSQL_LIB)

#
# HDF4 Support.
#
HAVE_HDF4     = @HAVE_HDF4@
HDF4_INCLUDE  = @HDF4_INCLUDE@ -I$(GDAL_ROOT)/ogr
HDF4_HAS_MAXOPENFILES = @HDF4_HAS_MAXOPENFILES@
ifeq ($(HDF4_HAS_MAXOPENFILES),yes)
HDF4_FLAGS=-DHDF4_HAS_MAXOPENFILES
endif

#
# HDF5 Support.
#
HAVE_HDF5     = @HAVE_HDF5@
HDF5_INCLUDE  = @HDF5_INCLUDE@

#
# KEA Support.
#
HAVE_KEA     = @HAVE_KEA@
KEA_INC      = @KEA_INC@
KEA_LIB      = @KEA_LIB@
LIBS       +=   $(KEA_LIB)

#
# NetCDF Support.
#
NETCDF_MEM = @NETCDF_MEM@
NETCDF_ROOT = @NETCDF_ROOT@
NETCDF_HAS_NC4 = @NETCDF_HAS_NC4@
NETCDF_HAS_HDF4 = @NETCDF_HAS_HDF4@

#
# DODS Include file location
#
DODS_INC = @DODS_INC@
ifeq ($(DODS_INC),)
HAVE_DODS = no
else
HAVE_DODS = yes
endif

#
# SQLite
#
SQLITE_INC = @SQLITE_INC@
SQLITE_HAS_COLUMN_METADATA = @SQLITE_HAS_COLUMN_METADATA@
HAVE_SQLITE = @HAVE_SQLITE@
HAVE_SPATIALITE = @HAVE_SPATIALITE@
SPATIALITE_SONAME = @SPATIALITE_SONAME@
SPATIALITE_INC = @SPATIALITE_INC@
SPATIALITE_AMALGAMATION = @SPATIALITE_AMALGAMATION@
SPATIALITE_412_OR_LATER = @SPATIALITE_412_OR_LATER@
HAVE_PCRE = @HAVE_PCRE@
HAVE_RASTERLITE2 = @HAVE_RASTERLITE2@
RASTERLITE2_CFLAGS = @RASTERLITE2_CFLAGS@

#
# JPEG2000 via Kakadu Support.
#
KAKDIR = @KAKDIR@

ifneq ($(KAKDIR),)
ifeq ($(HAVE_LIBTOOL),yes)
include $(GDAL_ROOT)/frmts/jp2kak/jp2kak.lst
KAK_LIBS = $(KAK_OBJ)
endif
endif

#
# JPEG-2000 Support via JasPer library.
#
HAVE_JASPER     = @HAVE_JASPER@
JASPER_FLAGS	= @JASPER_FLAGS@

#
# MrSID support via LizardTech's DSDK
#
MRSID_FLAGS	= @MRSID_FLAGS@
MRSID_INCLUDE	= @MRSID_INCLUDE@
MRSID_LIBS	= @MRSID_LIBS@

#
#
# MrSID/MG4 support via LizardTech LiDAR SDK
#
MRSID_LIDAR_INCLUDE	= @MRSID_LIDAR_INCLUDE@
MRSID_LIDAR_LIBS	= @MRSID_LIDAR_LIBS@

#
# ECW Related
#
ECW_FLAGS	= @ECW_FLAGS@
ECW_INCLUDE 	= @ECW_INCLUDE@
ECW_LIBS	= @ECW_LIBS@

#
# JP2Lura Related
#
JP2LURA_INCLUDE 	= @JP2LURA_INCLUDE@

# Xerces C++ XML Parser for GML and ILI
#
HAVE_XERCES	= @HAVE_XERCES@
XERCES_INCLUDE	= @XERCES_INCLUDE@
ifeq ($(HAVE_XERCES),yes)
CPPFLAGS	+= -DHAVE_XERCES $(XERCES_INCLUDE) $(CPPFLAGS)
endif

#
# Enable NAS format
#
HAVE_NAS	= @HAVE_NAS@

#
# Expat XML Parser for KML, GPX, GeoRSS (and GML if no Xerces C++)
#
HAVE_EXPAT = @HAVE_EXPAT@
EXPAT_INCLUDE = @EXPAT_INCLUDE@

#
# Google libkml for the new OGR KML driver written by Brian Case
#
HAVE_LIBKML = @HAVE_LIBKML@
LIBKML_INCLUDE = @LIBKML_INCLUDE@

#
# Oracle Spatial Support
#
HAVE_OCI	= @HAVE_OCI@
OCI_INCLUDE	= @OCI_INCLUDE@

# GEOS Support

HAVE_GEOS       =       @HAVE_GEOS@
GEOS_CFLAGS     =       @GEOS_CFLAGS@

# SFCGAL Support

HAVE_SFCGAL       =       @HAVE_SFCGAL@
SFCGAL_CFLAGS     =       @SFCGAL_CFLAGS@

# QHull Support

QHULL_SETTING   =       @QHULL_SETTING@
QHULL_INCLUDE_SUBDIR_IS_LIBQHULL   =       @QHULL_INCLUDE_SUBDIR_IS_LIBQHULL@

# GRASS Support

GRASS_SETTING	=	@GRASS_SETTING@
GRASS_INCLUDE	=	@GRASS_INCLUDE@
GRASS_GISBASE	=	@GRASS_GISBASE@
HAVE_GRASS	=	@HAVE_GRASS@

#
# SDE
#
HAVE_SDE = @SDE_ENABLED@
SDE_LIB	= @SDE_LIB@
SDE_INC = @SDE_INC@

#
# FileGDB
#
HAVE_FGDB = @FGDB_ENABLED@
FGDB_LIB = @FGDB_LIB@
FGDB_INC = @FGDB_INC@

#
# MongoDB
#
HAVE_MONGODB = @MONGODB_ENABLED@
MONGODB_LIB = @MONGODB_LIB@
MONGODB_INC = @MONGODB_INC@

#
# ArcObjects
#
HAVE_ARCOBJECTS = @ARCOBJECTS_ENABLED@
ARCOBJECTS_LIB	= @ARCOBJECTS_LIB@
ARCOBJECTS_INC = @ARCOBJECTS_INC@

#
# Curl
#
CURL_SETTING 	=	@CURL_SETTING@
CURL_LIB	=	@CURL_LIB@
CURL_INC	=	@CURL_INC@

#
# libjson-c
#
LIBJSONC_SETTING = @LIBJSONC_SETTING@
JSON_INCLUDE = @JSON_INCLUDE@

#
# OpenCL support
#
OPENCL_LIB	=	@OPENCL_LIB@
OPENCL_FLAGS	=	@OPENCL_FLAGS@

#
# SOSI support
#
SOSI_INC = @SOSI_INC@
SOSI_LIB = @SOSI_LIB@
HAVE_SOSI = @SOSI_ENABLED@

#
# PCIDSK SDK
#
PCIDSK_SETTING  =       @PCIDSK_SETTING@
PCIDSK_LIB	=	@PCIDSK_LIB@
PCIDSK_INCLUDE	=	@PCIDSK_INCLUDE@

#
# Iconv
#
LIBICONV	=	@LIBICONV@

#
# LIBXML2
#

HAVE_LIBXML2 = @HAVE_LIBXML2@
LIBXML2_INC = @LIBXML2_INC@
LIBXML2_LIB = @LIBXML2_LIB@

#
# CAD Support
#
HAVE_CAD	=	yes

#
# Informix DataBlade support
#
HAVE_IDB	= @HAVE_IDB@
IDB_INC		= @IDB_INC@
IDB_LIB		= @IDB_LIB@
ifeq ($(HAVE_IDB),yes)
LIBS	   	+= $(IDB_LIB)
endif

#
# FMEObjects
#
ifeq (@X_FME_HOME@,)
HAVE_FME        =       no
FME_INCLUDE	=
else
HAVE_FME        =       yes
FME_INCLUDE	=	-I@X_FME_HOME@/fmeobjects/cpp
endif

# PCRaster support
PCRASTER_SETTING	=	@PCRASTER_SETTING@

#
# LERC support.
#
HAVE_LERC =	@HAVE_LERC@

OGDI_INCLUDE	=	-I/usr/include/ogdi

PNG_SETTING     =	@PNG_SETTING@
JPEG_SETTING	=	@JPEG_SETTING@
JPEG12_ENABLED =	@JPEG12_ENABLED@
TIFF_JPEG12_ENABLED =    @TIFF_JPEG12_ENABLED@
TIFF_SETTING	=	@TIFF_SETTING@
TIFF_OPTS	=	@TIFF_OPTS@
RENAME_INTERNAL_LIBTIFF_SYMBOLS = @RENAME_INTERNAL_LIBTIFF_SYMBOLS@
GEOTIFF_SETTING	=	@GEOTIFF_SETTING@
GEOTIFF_INCLUDE =	@GEOTIFF_INCLUDE@
RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS = @RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS@
RENAME_INTERNAL_SHAPELIB_SYMBOLS = @RENAME_INTERNAL_SHAPELIB_SYMBOLS@
GIF_SETTING	=	@GIF_SETTING@
FITS_SETTING    =       @FITS_SETTING@
OGDI_SETTING	=	@HAVE_OGDI@
ODBC_SETTING    =       @ODBC_SETTING@
# PGeo driver is built-in when ODBC is available
PGEO_SETTING    =       @ODBC_SETTING@
MSSQLSPATIAL_SETTING    =       @ODBC_SETTING@
GEOMEDIA_SETTING    =       @ODBC_SETTING@
NETCDF_SETTING  =       @NETCDF_SETTING@
LIBZ_SETTING	=	@LIBZ_SETTING@
LIBLZMA_SETTING	=	@LIBLZMA_SETTING@
WEBP_SETTING	=	@WEBP_SETTING@
ZSTD_SETTING	=	@ZSTD_SETTING@

#
# DDS via Crunch Support.
#
CRUNCHDIR = @CRUNCHDIR@

#
# Rasdaman stuff
#
RASDAMAN_ENABLED  =       @RASDAMAN_ENABLED@
RASDAMAN_INC  =   @RASDAMAN_INC@
RASDAMAN_LIB  =   @RASDAMAN_LIB@

#
# PDF stuff
#
PDF_PLUGIN = @PDF_PLUGIN@

#
# Poppler stuff
#

HAVE_POPPLER = @HAVE_POPPLER@
POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
POPPLER_INC = @POPPLER_CFLAGS@
POPPLER_PLUGIN_LIB = @POPPLER_PLUGIN_LIB@

#
# Podofo stuff
#

HAVE_PODOFO = @HAVE_PODOFO@
PODOFO_INC = @PODOFO_INC@
PODOFO_PLUGIN_LIB = @PODOFO_PLUGIN_LIB@

#
# Pdfium stuff
#

HAVE_PDFIUM = @HAVE_PDFIUM@
PDFIUM_INC = @PDFIUM_INC@
PDFIUM_PLUGIN_LIB = @PDFIUM_PLUGIN_LIB@

#
# CharLs stuff
#
HAVE_CHARLS = @HAVE_CHARLS@
CHARLS_INC = @CHARLS_INC@

#
# Teigha stuff
#
HAVE_TEIGHA = @HAVE_TEIGHA@
TEIGHA_DIR = @TEIGHA_DIR@
TEIGHA_CPPFLAGS = @TEIGHA_CPPFLAGS@

#
# PROJ.4 stuff
#
PROJ_STATIC	=	@PROJ_STATIC@
ifeq ($(PROJ_STATIC),yes)
PROJ_FLAGS = -DPROJ_STATIC -DPROJ_VERSION=@PROJ_VERSION@
endif
PROJ_INCLUDE	=	@PROJ_INCLUDE@

PAM_SETTING     =       @PAM_SETTING@

GDAL_LIBS	:= $(GDAL_LIB) $(OCI_LIB) $(GDAL_LIBS)

ifeq ($(GNM_ENABLED),yes)
CPPFLAGS	:= -DGNM_ENABLED $(CPPFLAGS)
endif

#
# Java stuff
#
JAVA_HOME = @JAVA_HOME@
JAVA_INC  = @JAVA_INC@
JVM_LIB   = @JVM_LIB@

MDB_ENABLED =   @MDB_ENABLED@

HAVE_ARMADILLO = @HAVE_ARMADILLO@

#
# userfaultfd
#
ENABLE_UFFD = @ENABLE_UFFD@

#
# HDFS
#
HDFS_LIB = @HDFS_LIB@
HDFS_INC = @HDFS_INC@
HDFS_ENABLED = @HDFS_ENABLED@
JNI_LIB = @JNI_LIB@

#
# freexl stuff
#

HAVE_FREEXL = @HAVE_FREEXL@
FREEXL_INCLUDE = @FREEXL_INCLUDE@

#
# cryptopp stuff
#
HAVE_CRYPTOPP    =       @HAVE_CRYPTOPP@
USE_ONLY_CRYPTODLL_ALG        =       @USE_ONLY_CRYPTODLL_ALG@

#
# crypto/openssl stuff
#
HAVE_OPENSSL_CRYPTO    =       @HAVE_OPENSSL_CRYPTO@

#
#	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_GTiff().
#
GDAL_FORMATS :=
GDAL_FORMATS += gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm
GDAL_FORMATS += sdts raw dted mem jdem envisat elas fit vrt usgsdem l1b
GDAL_FORMATS += nitf bmp airsar rs2 ilwis rmf leveller sgi srtmhgt
GDAL_FORMATS += idrisi gsg ingr ers jaxapalsar dimap gff cosar pds adrg
GDAL_FORMATS += coasp tsx terragen blx msgn til r northwood saga xyz hf2
GDAL_FORMATS += kmlsuperoverlay ctg e00grid zmap ngsgeoid iris map cals
GDAL_FORMATS += safe sentinel2 derived
GDAL_FORMATS += prf
GDAL_FORMATS += sigdem
GDAL_FORMATS += ignfheightasciigrid
GDAL_FORMATS += @OPT_GDAL_FORMATS@

ifneq ($(PCIDSK_SETTING),no)
GDAL_FORMATS += pcidsk
endif

ifneq ($(LIBZ_SETTING),no)
GDAL_FORMATS := $(GDAL_FORMATS) rik ozi

ifneq ($(PDF_PLUGIN),yes)
GDAL_FORMATS := $(GDAL_FORMATS) pdf
endif

endif

ifeq ($(HAVE_SQLITE),yes)
GDAL_FORMATS := $(GDAL_FORMATS) rasterlite mbtiles
endif

ifeq ($(HAVE_POSTGISRASTER),yes)
GDAL_FORMATS := $(GDAL_FORMATS) postgisraster
endif

ifeq ($(HAVE_CHARLS),yes)
GDAL_FORMATS := $(GDAL_FORMATS) jpegls
endif

GDAL_FORMATS := $(GDAL_FORMATS) arg

#
# 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	=	$(GDAL_ROOT)/$(LIBGDAL)
ifeq ($(MACOSX_FRAMEWORK),yes)
CONFIG_LIBS_INS	=	-L$(INST_LIB)/unix/lib -lgdal
else
CONFIG_LIBS_INS	=	-L$(INST_LIB) -lgdal
endif # MACOSX_FRAMEWORK

EXE_DEP_LIBS	=	$(GDAL_ROOT)/$(LIBGDAL)
SO_EXT		=	la

else # HAVE_LIBTOOL

ifeq ($(HAVE_LD_SHARED),yes)
CONFIG_LIBS	=	$(GDAL_SLIB_LINK) $(LIBS)
ifeq ($(MACOSX_FRAMEWORK),yes)
CONFIG_LIBS_INS	=	-L$(INST_LIB)/unix/lib -lgdal
else
CONFIG_LIBS_INS	=	-L$(INST_LIB) -lgdal
endif
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/%.$(OBJ_EXT):	%.c
	$(CC) $(GDAL_INCLUDE) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<

../o/%.$(OBJ_EXT):	%.cpp
	$(CXX) $(GDAL_INCLUDE) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<

%.$(OBJ_EXT):	%.c
	$(CC) $(GDAL_INCLUDE) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<

%.$(OBJ_EXT):	%.cpp
	$(CXX) $(GDAL_INCLUDE) $(CXXFLAGS) $(CPPFLAGS) -c -o $@ $<

#
# default rules for handling subdirectories
#

%-target:
	$(MAKE) -C $*

%-clean:
	$(MAKE) -C $* clean