

include ../../../GDALmake.opt

OBJ	=	ogrsfdriverregistrar.o ogrlayer.o ogrdatasource.o \
		ogrsfdriver.o ogrregisterall.o ogr_gensql.o \
		ogr_attrind.o ogr_miattrind.o

BASEFORMATS = \
	-DAVCBIN_ENABLED \
	-DBNA_ENABLED \
	-DCSV_ENABLED \
	-DDGN_ENABLED \
	-DGML_ENABLED \
	-DGMT_ENABLED \
	-DGPX_ENABLED \
	-DMEM_ENABLED \
	-DNTF_ENABLED \
	-DREC_ENABLED \
	-DS57_ENABLED \
	-DSDTS_ENABLED \
	-DSHAPE_ENABLED \
	-DTAB_ENABLED \
	-DTIGER_ENABLED \
	-DVRT_ENABLED \
	-DKML_ENABLED \
	-DGEOJSON_ENABLED \
	-DGEOCONCEPT_ENABLED \
	-DXPLANE_ENABLED

CFLAGS   :=     $(CFLAGS) -DINST_DATA=\"$(INST_DATA)\" $(BASEFORMATS)
CXXFLAGS :=     $(CXXFLAGS) -DINST_DATA=\"$(INST_DATA)\" $(BASEFORMATS)

ifeq ($(HAVE_OGDI),yes)
CFLAGS   :=	$(CFLAGS) -DOGDI_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DOGDI_ENABLED
endif

ifeq ($(HAVE_OCI),yes)
CFLAGS   :=	$(CFLAGS) -DOCI_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DOCI_ENABLED
endif

ifeq ($(HAVE_SDE),yes)
CFLAGS   :=	$(CFLAGS) -DSDE_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DSDE_ENABLED
endif

ifeq ($(HAVE_OGR_PG),yes)
CFLAGS   :=	$(CFLAGS) -DPG_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DPG_ENABLED
endif

ifeq ($(HAVE_MYSQL),yes)
CFLAGS   :=	$(CFLAGS) -DMYSQL_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DMYSQL_ENABLED
endif

ifeq ($(HAVE_INGRES),yes)
CFLAGS   :=	$(CFLAGS) -DINGRES_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DINGRES_ENABLED
endif

ifeq ($(HAVE_FME),yes)
CFLAGS   :=	$(CFLAGS) -DFME_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DFME_ENABLED
endif

ifeq ($(ODBC_SETTING),yes)
CFLAGS   :=	$(CFLAGS) -DODBC_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DODBC_ENABLED
endif

ifeq ($(PGEO_SETTING),yes)
CFLAGS   :=	$(CFLAGS) -DPGEO_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DPGEO_ENABLED
endif

ifeq ($(HAVE_DODS),yes)
CFLAGS   :=	$(CFLAGS) -DDODS_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DDODS_ENABLED
endif

ifeq ($(HAVE_SQLITE),yes)
CFLAGS   :=	$(CFLAGS) -DSQLITE_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DSQLITE_ENABLED
endif

ifeq ($(HAVE_GRASS),yes)
CFLAGS   :=	$(CFLAGS) -DGRASS_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DGRASS_ENABLED
endif

ifeq ($(HAVE_XERCES),yes)
CFLAGS   :=	$(CFLAGS)   -DILI_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DILI_ENABLED
endif

ifeq ($(HAVE_NAS),yes)
CFLAGS   :=	$(CFLAGS)   -DNAS_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DNAS_ENABLED
endif

ifeq ($(HAVE_DWGDIRECT),yes)
CFLAGS   :=	$(CFLAGS) -DDWGDIRECT_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DDWGDIRECT_ENABLED
endif

ifeq ($(HAVE_IDB),yes)
CFLAGS   :=	$(CFLAGS) -DIDB_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DIDB_ENABLED
endif

ifeq ($(HAVE_PANORAMA),yes)
CFLAGS   :=	$(CFLAGS) -DPANORAMA_ENABLED
CXXFLAGS :=	$(CXXFLAGS) -DPANORAMA_ENABLED
endif

CPPFLAGS	:=	-I.. -I../.. $(GDAL_INCLUDE) $(CPPFLAGS)

default:	$(O_OBJ:.o=.$(OBJ_EXT))

clean:
	rm -f *.o $(O_OBJ)

$(O_OBJ):	../../../GDALmake.opt

