From: scipio Date: Sat, 21 Apr 2007 03:28:17 +0000 (+0000) Subject: Added better OS probing. Need to test on cygwin. X-Git-Tag: tinyos/2.0.1~8 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=d2a411bd0cd54812e5c9d31dd098bb41337fc1f6 Added better OS probing. Need to test on cygwin. --- diff --git a/support/make/sim.extra b/support/make/sim.extra index c14a5f1c..c1838482 100644 --- a/support/make/sim.extra +++ b/support/make/sim.extra @@ -23,13 +23,19 @@ SIMDIR =$(TOSDIR)/lib/tossim XML = app.xml DUMPTYPES = -fnesc-dump=components -fnesc-dump=variables -fnesc-dump=constants -fnesc-dump=typedefs -fnesc-dump=interfacedefs -fnesc-dump=tags -ifeq ($(OSTYPE), cygwin) +ifeq ($(findstring cygwin, $(OSTYPE)),cygwin) PLATFORM_FLAGS=-DUSE_DL_IMPORT -fpic SHARED_OBJECT=_TOSSIM.dll PLATFORM_BUILD_FLAGS= -fpic -W1,--enabled-auto-image-base - PLATFORM_LIB_FLAGS = -L/$(PYDIR)/config -lstdc++ -lpython$(PYTHON_VERSION) + PLATFORM_LIB_FLAGS = -L/usr/lib/python$(PYTHON_VERSION)/config -L/$(PYDIR)/config -lstdc++ -lpython$(PYTHON_VERSION) else -ifeq ($(OSTYPE), darwin) +ifeq ($(OS), Windows_NT) # Some TinyOS installs are like this + PLATFORM_FLAGS=-DUSE_DL_IMPORT -fpic + SHARED_OBJECT=_TOSSIM.dll + PLATFORM_BUILD_FLAGS= -fpic -W1,--enabled-auto-image-base + PLATFORM_LIB_FLAGS = -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 @@ -42,6 +48,7 @@ else # linux PLATFORM_BUILD_FLAGS= -shared -fPIC endif endif +endif BUILD_DEPS = sim-exe