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
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