From 2b07dd7d13f0aa5dfb53d13ee944e2dd3113a9f9 Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Thu, 17 Oct 2002 14:05:55 +0000 Subject: started build system svn path=/trunk/; revision=175 --- externals/build/README | 39 +++++++++++++++++++++++++++++++++++++++ externals/build/linux/makefile | 23 +++++++++++++++++++++++ externals/build/pdln | 8 ++++++++ externals/build/win/makefile | 22 ++++++++++++++++++++++ 4 files changed, 92 insertions(+) create mode 100644 externals/build/README create mode 100644 externals/build/linux/makefile create mode 100755 externals/build/pdln create mode 100644 externals/build/win/makefile 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) + + -- cgit v1.2.1