diff --git a/Patches/GDAL/2.3.2/Patch.cmake b/Patches/GDAL/2.3.2/Patch.cmake index 38c58efb..96740d2d 100644 --- a/Patches/GDAL/2.3.2/Patch.cmake +++ b/Patches/GDAL/2.3.2/Patch.cmake @@ -8,3 +8,6 @@ message("Copying ${GDAL_patch}/data/nitf_spec.xml to ${GDAL_source}/data/nitf_spec.xml") file(COPY ${GDAL_patch}/data/nitf_spec.xml DESTINATION ${GDAL_source}/data/) +message("Copying ${GDAL_patch}/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile to ${GDAL_source}/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile") +file(COPY ${GDAL_patch}/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile DESTINATION ${GDAL_source}/ogr/ogrsf_frmts/geojson/libjson/) + diff --git a/Patches/GDAL/2.3.2/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile b/Patches/GDAL/2.3.2/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile new file mode 100644 index 00000000..886473d7 --- /dev/null +++ b/Patches/GDAL/2.3.2/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile @@ -0,0 +1,38 @@ +# $Id$ +# +# Makefile building json-c library (http://oss.metaparadigm.com/json-c/) +# +include ../../../../GDALmake.opt + +OBJ = \ + arraylist.o \ + debug.o \ + json_object.o \ + json_tokener.o \ + json_util.o \ + linkhash.o \ + printbuf.o \ + json_object_iterator.o \ + json_c_version.o + +O_OBJ = $(foreach file,$(OBJ),../../o/$(file)) + +CPPFLAGS := $(CPPFLAGS) + +default: $(O_OBJ:.o=.$(OBJ_EXT)) + +#ifdef __APPLE__ +# ...actually, needs to be -->600<-- to get strdup; +# per https://bugs.launchpad.net/libvterm/+bug/1638205 +CPPFLAGS := -D_XOPEN_SOURCE=600 $(CPPFLAGS) +#else +# -D_XOPEN_SOURCE=500 to enable strdup() definition in C11 mode +CPPFLAGS := -D_XOPEN_SOURCE=500 $(CPPFLAGS) +#endif + +../../o/%.$(OBJ_EXT): %.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< + +clean: + rm -f *.o $(O_OBJ) + rm -f *~