From d82c2c9d3f8730f97377250f52b6e4088c3de9c7 Mon Sep 17 00:00:00 2001 From: klueska Date: Mon, 25 Feb 2008 18:24:38 +0000 Subject: [PATCH] Update to work with some versions of darwin on mac os --- support/make/sim.extra | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/support/make/sim.extra b/support/make/sim.extra index 2a17df0e..10ee5195 100644 --- a/support/make/sim.extra +++ b/support/make/sim.extra @@ -35,12 +35,11 @@ ifeq ($(OS), Windows_NT) # Some TinyOS installs are like this PLATFORM_BUILD_FLAGS= -fpic -W1,--enabled-auto-image-base PLATFORM_LIB_FLAGS =-shared -L/usr/lib/python$(PYTHON_VERSION)/config -L/$(PYDIR)/config -lstdc++ -lpython$(PYTHON_VERSION) else -ifeq ($(findstring darwin, $(OSTYPE)), darwin) - PLATFORM_FLAGS=-fPIC - PLATFORM_CC_FLAGS=-bundle - SHARED_OBJECT=_TOSSIMmodule.so - PLATFORM_BUILD_FLAGS=-flat_namespace -undefined suppress - PLATFORM_LIB_FLAGS = -lstdc++ +ifeq ($(findstring darwin, $(OSTYPE)), darwin) + SIM_DARWIN=TRUE +else +ifeq ($(findstring Darwin, $(shell uname)), Darwin) + SIM_DARWIN = TRUE else # linux PLATFORM_FLAGS=-shared -fPIC SHARED_OBJECT=_TOSSIMmodule.so @@ -49,7 +48,15 @@ else # linux endif endif endif - +endif +ifdef SIM_DARWIN + PLATFORM_FLAGS=-fPIC + PLATFORM_CC_FLAGS=-bundle + SHARED_OBJECT=_TOSSIMmodule.so + PLATFORM_BUILD_FLAGS=-flat_namespace -undefined suppress + PLATFORM_LIB_FLAGS = -lstdc++ +endif + BUILD_DEPS = sim-exe # lib/tossim has to come at the end in order to ensure basic TOSSIM -- 2.39.2