summaryrefslogtreecommitdiffhomepage
path: root/config.default.mak
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-10-17 23:28:24 +0200
committerMatthias Braun <matze@braunis.de>2015-10-19 07:23:51 +0200
commita809879726e3ddc8d7f949200dc3ebe3268b8a6a (patch)
tree62ef5ae63f759a5450777985224adc61b7938afd /config.default.mak
parentea72cbeb94a4b576c088aefd94ac21dd0193f931 (diff)
Adapt to latest OS X
Latest OS X has no /usr/include anymore, adapt to makefile to compile the $(xcrun --show-sdk-path)/usr/include for now.
Diffstat (limited to 'config.default.mak')
-rw-r--r--config.default.mak19
1 files changed, 15 insertions, 4 deletions
diff --git a/config.default.mak b/config.default.mak
index 512447a..d746772 100644
--- a/config.default.mak
+++ b/config.default.mak
@@ -11,12 +11,17 @@ FIRM_LIBS ?= `pkg-config --libs libfirm`
LIBFIRM_FILE =
endif
+ifeq ("$(shell uname)", "Darwin")
+# See if /usr/include exists (old darwin version)
+ifneq ("$(wildcard /usr/include)", "")
+SYSTEM_INCLUDE_DIR ?= -DSYSTEM_INCLUDE_DIR=\"/usr/include\"
+else
+# Use xcrun to get the include directory of the default toolchain
+SYSTEM_INCLUDE_DIR ?= -DSYSTEM_INCLUDE_DIR=\"$(shell xcrun -show-sdk-path)/usr/include\"
+endif
+else
# location of the system/libc headers
SYSTEM_INCLUDE_DIR ?= -DSYSTEM_INCLUDE_DIR=\"/usr/include\"
-# location of additional headers (may be undefined)
-LOCAL_INCLUDE_DIR ?= -DLOCAL_INCLUDE_DIR=\"/usr/local/include\"
-# location of the compiler provided headers
-COMPILER_INCLUDE_DIR ?= -DCOMPILER_INCLUDE_DIR=\"$(abspath $(srcdir))/include\"
# if APPEND_MULTILIB_DIRS is defined, then we append a directory with the
# machine triple to the system and local directory. i.e. if the target triple
# is i386-linux-gnu we append $SYSTEM_INCLUDE_DIR/i386-linux-gnu and
@@ -28,5 +33,11 @@ MULTILIB_M32_TRIPLE ?= -DMULTILIB_M32_TRIPLE=\"i386-linux-gnu\"
# hardcoded machine triple for multiarch dir when just -m64 is given
# (may be empty)
MULTILIB_M64_TRIPLE ?= -DMULTILIB_M64_TRIPLE=\"x86_64-linux-gnu\"
+endif
+
+# location of additional headers (may be undefined)
+LOCAL_INCLUDE_DIR ?= -DLOCAL_INCLUDE_DIR=\"/usr/local/include\"
+# location of the compiler provided headers
+COMPILER_INCLUDE_DIR ?= -DCOMPILER_INCLUDE_DIR=\"$(abspath $(srcdir))/include\"
# hardcoded machine triple for the host machine (may be undefined)
HOST_TRIPLE ?=