aboutsummaryrefslogtreecommitdiff
path: root/externals
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-11-30 07:03:19 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-11-30 07:03:19 +0000
commit9cf2c9d4f466dfd9ae81bdae9aace2effbe5a5e5 (patch)
tree1db59bfe2e2c4eedca51c33c94448114ae649d0f /externals
parentf7d28b65ad3287d8157c914f24e4003b8d5739b7 (diff)
preparing for RC6, bug fixes and tweaks, things are look ing good
svn path=/trunk/; revision=4086
Diffstat (limited to 'externals')
-rw-r--r--externals/Makefile97
-rw-r--r--externals/Makefile.buildlayout3
-rw-r--r--externals/build/TODO5
3 files changed, 96 insertions, 9 deletions
diff --git a/externals/Makefile b/externals/Makefile
index 8aa76724..2cfa5623 100644
--- a/externals/Makefile
+++ b/externals/Makefile
@@ -37,10 +37,67 @@ DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \
#
#==============================================================================#
+CFLAGS = -DPD -DUNIX -Dunix $(OPTIM_FLAGS) \
+ -Wall -W -Wno-unused -Wno-parentheses -Wno-switch -Wno-shadow
+INCLUDES = -I$(pd_src)/src
+LDFLAGS =
+STRIP = strip --strip-unneeded -R .note -R .comment
+
+#------------------------------------------------------------------------------#
+# DARWIN
+DARWIN_CFLAGS = $(CFLAGS)
+DARWIN_INCLUDES = $(INCLUDES) -I/sw/include
+DARWIN_LDFLAGS = $(LDFLAGS) -bundle -bundle_loader $(pd_src)/bin/pd -L/sw/lib
+%.pd_darwin: %.c
+ $(CC) $(DARWIN_CFLAGS) $(DARWIN_INCLUDES) -o "$*.o" -c "$*.c"
+ $(CC) $(DARWIN_LDFLAGS) -o "$*.pd_darwin" "$*.o" -lc -lm
+ chmod a-x "$*.pd_darwin"
+ rm -f "$*.o"
+
+
#------------------------------------------------------------------------------#
-# BUILD
+# LINUX
+LINUX_CFLAGS = $(CFLAGS) -fPIC
+LINUX_INCLUDES = $(INCLUDES)
+LINUX_LDFLAGS = $(LDFLAGS) -Wl,-export_dynamic -shared
+%.pd_linux: %.c
+ $(CC) $(CFLAGS) $(INCLUDES) -o "$*.o" -c "../src/$*.c"
+ gcc $(LINUX_LDFLAGS) -o "$*.pd_linux" "$*.o" -lc -lm
+ chmod a-x "$*.pd_linux"
+ $(STRIP) $*.pd_linux
+ rm -f "$*.o"
+
+
+#------------------------------------------------------------------------------#
+# WIN (MinGW)
+WIN_CFLAGS = -mms-bitfields $(CFLAGS)
+WIN_INCLUDES = $-I. -I.. -I$(PD_PATH)/src -IC:/msys/1.0/include
+WIN_LDFLAGS = $(LDFLAGS) -shared -LC:/msys/1.0/lib -L$(PD_PATH)/bin -lpd
+# these are for compatibility
+WIN_DEFINES = \
+ -D'drand48()=((double)rand()/RAND_MAX)' \
+ -D'srand48(n)=srand((n))' \
+ -D'O_NONBLOCK=1' \
+# These don't seem to be needed:
+# -D'bzero(p,n)=memset(p,0,n)' \
+# -D'PROT_READ=1' \
+# -D'MAP_PRIVATE=2' \
+# -D'O_NDELAY=O_NONBLOCK'
+%.dll: %.c
+ $(CC) $(WIN_CFLAGS) $(WIN_DEFINES) $(WIN_INCLUDES) \
+ -o "$*.o" -c "../src/$*.c"
+ gcc $(LDFLAGS) -o "$*.dll" "$*.o"
+ chmod a-x "$*.pd_linux"
+ $(STRIP) "$*.dll"
+ rm "$*.o"
+
+
+
+
+#------------------------------------------------------------------------------#
+# ALL
all: pre_all_$(OS_NAME) creb cyclone iemabs iemlib iemmatrix pddp pdp pmpd \
- toxy vbap zexy
+ smlib toxy vbap zexy
@echo "Compiling objects for $(OS_NAME) aka $(UNAME)"
# try it this way so that it'll recognize files that have already been built
-cd $(externals_src)/build/$(OS_NAME) && make -k
@@ -97,6 +154,7 @@ help_install: $(helpdir)
$(externals_src)/dfx/*/*.pd \
$(externals_src)/ext13/doc/*.pd \
$(externals_src)/ggee/*/*-help.pd \
+ $(externals_src)/ggee/*/*.gif \
$(externals_src)/gem2pdp/*.pd \
$(externals_src)/ff/*.pd \
$(externals_src)/freeverb~/*.pd \
@@ -362,6 +420,32 @@ pmpd_install: pmpd
$(examplesdir)/$(PMPD_NAME)
+#------------------------------------------------------------------------------#
+# SMLIB
+SMLIB_NAME=smlib
+# exclude SMlib.c since its just for the compiled library
+SMLIB_OBJECTS = $(wildcard $(externals_src)/smlib/source/[a-z]*.c)
+smlib: $(SMLIB_OBJECTS:.c=.$(EXTENSION))
+
+smlib_install: smlib
+ install -d $(objectsdir)/$(SMLIB_NAME)
+ $(scripts_src)/generate-libdir-metafile.sh $(objectsdir) $(SMLIB_NAME) \
+ --author "Johannes Taelman <johannes.taelman@rug.ac.be>" \
+ --license "GNU GPL" \
+ --description "vector processing, vector analysis, vector synthesis, number stream analysis, number stream filters"
+ install -p $(SMLIB_OBJECTS:.c=.$(EXTENSION)) $(objectsdir)/$(SMLIB_NAME)
+ install -d $(helpdir)/$(SMLIB_NAME)
+ install -p $(wildcard $(externals_src)/smlib/help/*.pd )\
+ $(helpdir)/$(SMLIB_NAME)
+ install -d $(manualsdir)/$(SMLIB_NAME)
+ install -p $(externals_src)/smlib/readme.txt $(manualsdir)/$(SMLIB_NAME)
+ install -d $(examplesdir)/$(SMLIB_NAME)
+ install -p $(wildcard $(externals_src)/smlib/examples/*.pd) \
+ $(examplesdir)/$(SMLIB_NAME)
+
+smlib_clean:
+ rm $(SMLIB_OBJECTS:.c=.$(EXTENSION))
+
#------------------------------------------------------------------------------#
# TOXY
@@ -377,8 +461,7 @@ toxy_install: toxy
--author "Kzrysztof Czaja" \
--license "BSD" \
--description "objects for working with Tcl and Pd's Tk GUI"
-# [tow] is currently broken, it doesn't compile
- -cd $(externals_src)/miXed/toxy && $(MAKE) OUT_DIR=$(TOXY_OUT_DIR)
+ cd $(externals_src)/miXed/toxy && $(MAKE) OUT_DIR=$(TOXY_OUT_DIR)
install -d $(helpdir)/$(TOXY_NAME)
install -p $(externals_src)/miXed/doc/help/toxy/*.* \
$(helpdir)/$(TOXY_NAME)
@@ -400,6 +483,10 @@ unauthorized_install: unauthorized
# this needs to go here since it produces errors
-cd $(externals_src)/unauthorized && $(MAKE) -k
install -d $(objectsdir)/$(UNAUTHORIZED_NAME)
+ $(scripts_src)/generate-libdir-metafile.sh $(objectsdir) $(UNAUTHORIZED_NAME) \
+ --author "Yves Degoyon" \
+ --license "GNU GPL" \
+ --description "GUI and streaming objects"
install -p $(externals_src)/unauthorized/*/*.$(EXTENSION) \
$(objectsdir)/$(UNAUTHORIZED_NAME)
install -d $(helpdir)/$(UNAUTHORIZED_NAME)
@@ -505,7 +592,7 @@ devsymlinks:
#==============================================================================#
# the destination-specific clean targets are in Makefile.buildlayout
-clean: install_clean
+clean: smlib_clean install_clean
cd $(externals_src)/build/$(OS_NAME) && make $(DEST_PATHS) clean
cd $(externals_src)/hcs/hid && make $(DEST_PATHS) clean
cd $(externals_src)/OSCx && make $(DEST_PATHS) clean
diff --git a/externals/Makefile.buildlayout b/externals/Makefile.buildlayout
index 5bc5f28b..6a2dab6d 100644
--- a/externals/Makefile.buildlayout
+++ b/externals/Makefile.buildlayout
@@ -40,7 +40,6 @@ UNAME := $(shell uname -s)
ifeq ($(UNAME),Linux)
OS_NAME = linux
EXTENSION = pd_linux
- prefix = /usr/local
else
ifeq ($(UNAME),Darwin)
OS_NAME = darwin
@@ -150,7 +149,7 @@ PD_VERSION = $(PD_MAJOR_VERSION).$(PD_MINOR_VERSION).$(PD_BUGFIX_VERSION)
# release version for this distro
-PACKAGE_VERSION = extended-RC5
+PACKAGE_VERSION = extended-RC6
PACKAGE_NAME = Pd-$(PD_VERSION)-$(PACKAGE_VERSION)
diff --git a/externals/build/TODO b/externals/build/TODO
index ad5d4e12..b8492818 100644
--- a/externals/build/TODO
+++ b/externals/build/TODO
@@ -1,6 +1,7 @@
-- incorporate %.c building into cross-platform Makefile, and have it work with
- subdirectories so that libdirs can be compiled here.
+- document smlib building
+
+- add "test lib" functionality to binary building in externals/Makefile
- simplify Makefile, making just "all" and "install" with subsections for each
subdir.