aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-11-14 02:47:49 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2007-11-14 02:47:49 +0000
commitf2a776440750a0e27fe1b554b613b230521f45fd (patch)
treed35651b185aa88a1e795a5210a1d6928dc7b34ef
parentae0750b206846c4bfb806feed6c7de3ce747ec00 (diff)
added tkwidgets build targets from template; made target to build shared library, but it's not used yet
svn path=/trunk/; revision=8998
-rw-r--r--externals/Makefile45
1 files changed, 40 insertions, 5 deletions
diff --git a/externals/Makefile b/externals/Makefile
index b88cd523..4a7e68bc 100644
--- a/externals/Makefile
+++ b/externals/Makefile
@@ -21,7 +21,7 @@ export MACOSX_DEPLOYMENT_TARGET = 10.3
# default target
default: all
-.SUFFIXES: .$(EXTENSION)
+.SUFFIXES: .$(EXTENSION) .$(SHARED_LIB)
include $(BUILDLAYOUT_DIR)/Makefile.buildlayout
@@ -51,8 +51,7 @@ ifeq ($(OS_NAME),darwin)
CFLAGS += -I/sw/include -DMACOSX -DUNIX -Dunix
LDFLAGS += -bundle -bundle_loader $(pd_src)/bin/pd -L/sw/lib
LIBS += -lc
- DYLIB_LDFLAGS = -dynamiclib -read_only_relocs warning -L/sw/lib
- DYLIB_EXTENSION = dylib
+ DYLIB_LDFLAGS = -dynamiclib -undefined dynamic_lookup -read_only_relocs warning -L/sw/lib
STRIP = strip -x
endif
ifeq ($(OS_NAME),linux)
@@ -60,7 +59,6 @@ ifeq ($(OS_NAME),linux)
LDFLAGS += -Wl,-export_dynamic -shared
LIBS += -lc
DYLIB_LDFLAGS = $(LDFLAGS)
- DYLIB_EXTENSION = so
STRIP = strip --strip-unneeded -R .note -R .comment
endif
ifeq ($(OS_NAME),windows)
@@ -78,7 +76,6 @@ ifeq ($(OS_NAME),windows)
LIBS += -L$(pd_src)/bin -L$(pd_src)/obj -lpd \
-lwsock32 -lpthreadGC2 -lkernel32 -luser32 -lgdi32 -lregex
DYLIB_LDFLAGS = -shared
- DYLIB_EXTENSION = dll
STRIP = strip --strip-unneeded -R .note -R .comment
endif
@@ -2131,6 +2128,44 @@ smlib_clean:
#------------------------------------------------------------------------------#
+# TKWIDGETS
+TKWIDGETS_NAME=tkwidgets
+TKWIDGETS_OBJECTS := $(wildcard $(externals_src)/tkwidgets/*.c)
+TKWIDGETS_SHARED := $(wildcard $(externals_src)/tkwidgets/shared/*.c)
+tkwidgets_shared: $(TKWIDGETS_SHARED:.c=.o)
+ $(CC) $(DYLIB_LDFLAGS) \
+ -o $(externals_src)/tkwidgets/libtkwidgets.$(DYLIB_EXTENSION) \
+ $(TKWIDGETS_SHARED:.c=.o)
+
+tkwidgets: tkwidgets_shared $(TKWIDGETS_OBJECTS:.c=.$(EXTENSION))
+
+tkwidgets_install: tkwidgets
+ install -d $(objectsdir)/$(TKWIDGETS_NAME)
+ $(scripts_src)/generate-libdir-metafile.sh $(objectsdir) $(TKWIDGETS_NAME) \
+ --author "Hans-Christoph Steiner and other" \
+ --description "a collection of objects based on Tk widgets" \
+ --license "GPLv2 or later"
+ install -p $(TKWIDGETS_OBJECTS:.c=.$(EXTENSION)) $(objectsdir)/$(TKWIDGETS_NAME)
+ install -d $(helpdir)/$(TKWIDGETS_NAME)
+ install -p $(externals_src)/tkwidgets/*.pd \
+ $(helpdir)/$(TKWIDGETS_NAME)
+# install -d $(manualsdir)/$(TKWIDGETS_NAME)
+# install -p $(externals_src)/tkwidgets/manual.txt \
+# $(manualsdir)/$(TKWIDGETS_NAME)
+# install -d $(readmesdir)
+# install -p $(externals_src)/tkwidgets/README \
+# $(readmesdir)/$(TKWIDGETS_NAME).txt
+# install -d $(examplesdir)/$(TKWIDGETS_NAME)
+# install -p $(externals_src)/tkwidgets/examples/*.pd \
+# $(examplesdir)/$(TKWIDGETS_NAME)
+
+tkwidgets_clean:
+ -rm -f -- $(TKWIDGETS_OBJECTS:.c=.$(EXTENSION))
+ -rm -f -- $(TKWIDGETS_OBJECTS:.c=.o)
+ -rm -f -- $(externals_src)/tkwidgets/*.bak
+ -rm -f -- $(externals_src)/tkwidgets/*.*~
+
+#------------------------------------------------------------------------------#
# TOF
TOF_NAME=tof
TOF_OBJECTS := $(wildcard $(externals_src)/tof/src/*.c)