3 @@ -64,9 +64,17 @@ HOSTSTRIP = strip
6 ifeq ($(HOSTOS),darwin)
8 -HOSTCFLAGS += -traditional-cpp
9 -HOSTLDFLAGS += -multiply_defined suppress
10 +#get the major and minor product version (e.g. '10' and '6' for Snow Leopard)
11 +DARWIN_MAJOR_VERSION = $(shell sw_vers -productVersion | cut -f 1 -d '.')
12 +DARWIN_MINOR_VERSION = $(shell sw_vers -productVersion | cut -f 2 -d '.')
14 +before-snow-leopard = $(shell if [ $(DARWIN_MAJOR_VERSION) -le 10 -a \
15 + $(DARWIN_MINOR_VERSION) -le 5 ] ; then echo "$(1)"; else echo "$(2)"; fi ;)
17 +# Snow Leopards build environment has no longer restrictions as described above
18 +HOSTCC = $(call before-snow-leopard, "cc", "gcc")
19 +HOSTCFLAGS += $(call before-snow-leopard, "-traditional-cpp")
20 +HOSTLDFLAGS += $(call before-snow-leopard, "-multiply_defined suppress")