-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #634 from collinsr/dev/patch-gdal-for-mac
Patch GDAL to build on OSX (fixes missing strdup() prototype).
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
Patches/GDAL/2.3.2/ogr/ogrsf_frmts/geojson/libjson/GNUmakefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 *~ |