I was trying to build gdal and noticed that setting CFLAGS is not enough as
you also need CPPFLAGS for the c++ code, fair enough. But some places (the
one I found is in gcore and frmts/ilwis) this is not handled correctly. In
gcore this appears correct
CPPFLAGS := $(GDAL_INCLUDE) $(CPPFLAGS) $(PAM_SETTING)
However, this isnt used in the GNUMakefile instead its CXXFLAGS that is
used in the make as shown below, shouldn't that be CPPFLAGS?
gdaldrivermanager.o: gdaldrivermanager.cpp ../GDALmake.opt
$(CXX) -c $(GDAL_INCLUDE) $(CXXFLAGS) -DINST_DATA=\"$(INST_DATA)\" \
$*.cpp -o $*.o
There appear to other places that use CXXFLAGS
frmts/GNUmakefile
frmts/grib/GNUmakefile
frmts/grib/GNUmakefile
frmts/grib/GNUmakefile
frmts/grib/GNUmakefile
frmts/jp2kak/GNUmakefile
frmts/sdts/GNUmakefile
gcore/GNUmakefile
port/GNUmakefile
pymod/GNUmakefile
In iLwin CPPFLAGS ignores the existing CPPFLAGS and sets it like this:
CPPFLAGS = $(GDAL_INCLUDE)
Shouldn't this be
CPPFLAGS := $(GDAL_INCLUDE) $(CPPFLAGS)
Best jim
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev