aboutsummaryrefslogtreecommitdiff
path: root/externals
diff options
context:
space:
mode:
authorGuenter Geiger <ggeiger@users.sourceforge.net>2002-10-17 14:05:55 +0000
committerGuenter Geiger <ggeiger@users.sourceforge.net>2002-10-17 14:05:55 +0000
commit2b07dd7d13f0aa5dfb53d13ee944e2dd3113a9f9 (patch)
treea5b3b35647e175ac374a90273575336f73c9cce8 /externals
parent2c23a63729d6323de172f7e1e8c16ff7ce8bedc6 (diff)
started build system
svn path=/trunk/; revision=175
Diffstat (limited to 'externals')
-rw-r--r--externals/build/README39
-rw-r--r--externals/build/linux/makefile23
-rwxr-xr-xexternals/build/pdln8
-rw-r--r--externals/build/win/makefile22
4 files changed, 92 insertions, 0 deletions
diff --git a/externals/build/README b/externals/build/README
new file mode 100644
index 00000000..5118ee13
--- /dev/null
+++ b/externals/build/README
@@ -0,0 +1,39 @@
+PD externals build system
+=========================
+
+To build, cd to the platform directory:
+
+cd linux
+cd win
+cd darwin
+cd irix
+
+and type make.
+
+
+
+
+
+Build System Internals
+======================
+
+The build system is actually on top of the different externals packages
+that are in the CVS.
+
+Every external (the source code) is linked into the "src" directory.
+In order to be platform independent this is done via c-includes.
+
+Then the build system just tries to build every exeternal that it
+finds in "src".
+
+Problems with this approach:
+- it can't be applied to externals that use additional libraries.
+- it might be hard for externals that use several source files
+ (not always, look at src/ann.c)
+
+
+
+
+
+
+
diff --git a/externals/build/linux/makefile b/externals/build/linux/makefile
new file mode 100644
index 00000000..1bfa0a3d
--- /dev/null
+++ b/externals/build/linux/makefile
@@ -0,0 +1,23 @@
+
+
+EXTERNALS = $(shell ls ../src)
+
+all: $(EXTERNALS:.c=.pd_linux)
+
+.SUFFIXES: .pd_linux
+
+LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \
+ -Wall -W -Wshadow -Wstrict-prototypes \
+ -Wno-unused -Wno-parentheses -Wno-switch
+
+LINUXINCLUDE = -I..
+
+%.pd_linux: ../src/%.c
+ $(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c ../src/$*.c
+ ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm
+ chmod a-x $*.pd_linux
+# strip --strip-unneeded $*.pd_linux
+ rm -f $*.o
+
+clean:
+ -rm *.pd_linux *~
diff --git a/externals/build/pdln b/externals/build/pdln
new file mode 100755
index 00000000..76b4b6d8
--- /dev/null
+++ b/externals/build/pdln
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+arg=$1
+
+echo linking $arg ../src/${arg##*/}
+echo \#include \"$arg\" > src/${arg##*/}
+
+
diff --git a/externals/build/win/makefile b/externals/build/win/makefile
new file mode 100644
index 00000000..b2441158
--- /dev/null
+++ b/externals/build/win/makefile
@@ -0,0 +1,22 @@
+# ----------------------- NT -----------------------
+
+pd_nt: $(NAME).dll
+
+.SUFFIXES: .dll
+
+PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
+VC="C:\Program Files\Microsoft Visual Studio\Vc98"
+
+PDNTINCLUDE = /I. /I\tcl\include /I\ftp\pd\src /I$(VC)\include
+
+PDNTLDIR = $(VC)\lib
+PDNTLIB = $(PDNTLDIR)\libc.lib \
+ $(PDNTLDIR)\oldnames.lib \
+ $(PDNTLDIR)\kernel32.lib \
+ \ftp\pd\bin\pd.lib
+
+.c.dll:
+ cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
+ link /dll /export:$(CSYM)_setup $*.obj $(PDNTLIB)
+
+