From d2a411bd0cd54812e5c9d31dd098bb41337fc1f6 Mon Sep 17 00:00:00 2001 From: scipio Date: Sat, 21 Apr 2007 03:28:17 +0000 Subject: [PATCH] Added better OS probing. Need to test on cygwin. --- support/make/sim.extra | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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 -- 2.39.2