aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormescalinum <mescalinum@users.sourceforge.net>2009-09-19 10:44:11 +0000
committermescalinum <mescalinum@users.sourceforge.net>2009-09-19 10:44:11 +0000
commitf2d8b84196804e13edc69bebd02d070e9b0aa194 (patch)
treec2c78fd151ec53f1f86fb957f36f7a376114cb0e
parent84b81510709f40ba1aaff81a90a677a567d4f371 (diff)
add Hans' fixes for building on OSX and Win
svn path=/trunk/externals/tclpd/; revision=12400
-rw-r--r--Makefile27
1 files changed, 15 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index f394d66..633feb2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,33 +1,36 @@
#!/usr/bin/make
DEBUG?=0
-OS = linux
+OS := $(shell uname -s)
+TCL_VERSION := $(shell echo 'puts $$tcl_version' | tclsh)
ifeq ($(DEBUG),1)
CFLAGS += -O0 -g -ggdb -DDEBUG
endif
-ifeq ($(OS),darwin)
+ifeq ($(OS),Linux)
+ PDSUF = .pd_linux
+ PDBUNDLEFLAGS = -shared -rdynamic
+ LDSOFLAGS = -lm -ltcl$(TCL_VERSION)
+endif
+ifeq ($(OS),Darwin)
PDSUF = .pd_darwin
+ INCLUDES = -I/Library/Frameworks/Tcl.framework/Headers
PDBUNDLEFLAGS = -bundle -flat_namespace -undefined dynamic_lookup
-else
- ifeq ($(OS),nt)
- PDSUF = .dll
- PDBUNDLEFLAGS = -shared
- else
- PDSUF = .pd_linux
- PDBUNDLEFLAGS = -shared -rdynamic
- endif
+ LDSOFLAGS = -lm -framework Tcl
+endif
+ifeq (MINGW,$(findstring MINGW,$(UNAME)))
+ PDSUF = .dll
+ PDBUNDLEFLAGS = -shared
+ LDSOFLAGS = -lm -ltcl$(TCL_VERSION)
endif
LIBNAME = tcl
-TCL_VERSION := $(shell echo 'puts $$tcl_version' | tclsh)
INCLUDES = -I../../pd/src -I/usr/include -I/usr/include/tcl$(TCL_VERSION)
CFLAGS += -funroll-loops -fno-operator-names -fno-omit-frame-pointer -falign-functions=16 -Wall -fPIC
CFLAGS += -DPDSUF=\"$(PDSUF)\"
ifeq ($(DEBUG),0)
CFLAGS += -O2
endif
-LDSOFLAGS += -lm -ltcl$(TCL_VERSION)
LDSHARED = $(CXX) $(PDBUNDLEFLAGS)
all:: $(LIBNAME)$(PDSUF)