diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2005-11-21 04:49:15 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2005-11-21 04:49:15 +0000 |
commit | 196343bb45dad2fd80851888184b8140c3e11adf (patch) | |
tree | 0f7b91a56c40b06b352be3eb13a11025e3946cdf /externals/build | |
parent | c67180156bb011ebe9a0524757052a28a6c62692 (diff) |
Lots of changes, got the first complete(-ish) build with the new extended
build system. I left as much of the old functionality in place as possible,
definitely were it was being used. But there are some changes that break
backwards compatibility, thought they should be noticed by few, and be easy to
fix going forward.
Some highlights:
- centralized patch system (packages/patches with targets patch_pd and
unpatch_pd)
- easily redirected builds, using INSTALL_PREFIX and all of the *_DEST
variables. This makes building packages like Pd.app, .deb, .rpm,
etc. much easier.
- libdir format: basically a libdir is a directory that has both the objects
and the help files together in one folder. It can be added using -lib or
the StartUp preferences, or you can access them via geiger namespaces,
i.e. [mylibrary/myobject].
- special characters allow in setup function/file names for objects. This
makes objects like [||~] possible without having to be in a library. Now
they can be either .pd files or individual .pd_darwin files (thanks
IOhannes for the patch).
svn path=/trunk/; revision=3994
Diffstat (limited to 'externals/build')
-rw-r--r-- | externals/build/README | 16 | ||||
-rw-r--r-- | externals/build/TODO | 3 | ||||
-rw-r--r-- | externals/build/darwin/makefile | 126 |
3 files changed, 52 insertions, 93 deletions
diff --git a/externals/build/README b/externals/build/README index a04004e8..9babac70 100644 --- a/externals/build/README +++ b/externals/build/README @@ -1,3 +1,16 @@ + + +There are lots of docs here: http://puredata.org/docs/developer + + +Pd-extended build system +======================== + +This stuff as all be incorporated into the unified, cross-platform Pd-extended +build system. These makefiles will probably stay around for a while since they +are widely used. + + PD externals build system ========================= @@ -15,10 +28,11 @@ To build with SCons: scons scons install + Build System Internals ====================== -The build system is actually on top of the different externals packages +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. diff --git a/externals/build/TODO b/externals/build/TODO index e80174c8..da3aa827 100644 --- a/externals/build/TODO +++ b/externals/build/TODO @@ -1,5 +1,6 @@ -- fold externals/build/doc/makefile into externals/build/Makefile +- simplify Makefile, making just "all" and "install" with subsections for each + subdir. - get externals/build/src/prepend.c to compile in Pd mode, which means it will have a right inlet when created without an argument diff --git a/externals/build/darwin/makefile b/externals/build/darwin/makefile index 4fcc983c..bb32bfba 100644 --- a/externals/build/darwin/makefile +++ b/externals/build/darwin/makefile @@ -1,14 +1,23 @@ -prefix=/tmp -#prefix=$(DESTDIR)/usr/local/lib/pd -EXTERNALS = $(shell ls -1 ../src | grep -e '.*\.c$$') +CWD := $(shell pwd) -all: $(EXTERNALS:.c=.pd_darwin) +# these are setup to be overridden by the packages/Makefile +SRC_ROOT_DIR = $(CWD)/../../.. +INSTALL_PREFIX = build +BUILDLAYOUT_DIR = $(CWD)/../.. + +all: externals .SUFFIXES: .pd_darwin -#PDEXECUTABLE = /usr/local/bin/pd -PDEXECUTABLE = ../../../pd/bin/pd +include $(BUILDLAYOUT_DIR)/Makefile.buildlayout + +BUILD_SRC = $(EXTERNALS_SRC)/build/src +BUILD_DARWIN_SRC = $(EXTERNALS_SRC)/build/darwin + +EXTERNALS = $(shell ls -1 $(BUILD_SRC) | grep -e '.*\.c$$') + +PDEXECUTABLE = $(PD_SRC)/bin/pd ## These generally need gcc-3.3 # Generic PowerPC @@ -24,93 +33,28 @@ OPTIM_FLAGS = -mpowerpc-gpopt -mcpu=750 CFLAGS = -DPD -DUNIX -DMACOSX -Dunix $(OPTIM_FLAGS) \ -Wall -W -Wno-unused -Wno-parentheses -Wno-switch -Wno-shadow -INCLUDES = -I. -I.. -I../../../pd/src -I../include -I/sw/include +INCLUDES = -I$(PD_SRC)/src -I/sw/include LDFLAGS = -bundle -bundle_loader $(PDEXECUTABLE) -L/sw/lib -%.pd_darwin: ../src/%.c - $(CC) $(CFLAGS) $(INCLUDES) -o "$*.o" -c "../src/$*.c" - $(CC) $(LDFLAGS) -o "$*.pd_darwin" "$*.o" -lc -lm \ - `test -f $*.libs && cat $*.libs` \ - `test -f ../src/$*.libs && cat ../src/$*.libs` - chmod a-x "$*.pd_darwin" - rm -f "$*.o" - -clean: - -rm *.pd_darwin *~ - -rm -rf root *.pkg - -install-doc: - test -d $(prefix)/doc/5.reference || mkdir -p $(prefix)/doc/5.reference - cd ../doc && make all - install -m444 ../doc/*.* $(prefix)/doc/5.reference - -install-abstractions: - test -d $(prefix)/extra || mkdir -p $(prefix)/extra - install -m444 \ - ../../vbap/graph-to-aziele.pd \ - $(prefix)/extra - -install: install-doc - test -d $(prefix)/extra || mkdir -p $(prefix)/extra - install -m644 *.pd_darwin $(prefix)/extra +externals: $(EXTERNALS:.c=.pd_darwin) +%.pd_darwin: $(BUILD_SRC)/%.c + $(CC) $(CFLAGS) $(INCLUDES) -o "$(BUILD_DARWIN_SRC)/$*.o" \ + -c "$(BUILD_SRC)/$*.c" + $(CC) $(LDFLAGS) -o "$(BUILD_DARWIN_SRC)/$*.pd_darwin" \ + "$(BUILD_DARWIN_SRC)/$*.o" -lc -lm \ + `test -f $(BUILD_DARWIN_SRC)/$*.libs && \ + cat $(BUILD_DARWIN_SRC)/$*.libs` \ + `test -f $(BUILD_SRC)/$*.libs && \ + cat $(BUILD_SRC)/$*.libs` + chmod a-x "$(BUILD_DARWIN_SRC)/$*.pd_darwin" + rm -f "$(BUILD_DARWIN_SRC)/$*.o" -EXTERNALS_VERSION := $(shell date +20%y.%m.%d) -PACKAGE_PREFIX = pd-externals -PACKAGE_NAME = $(PACKAGE_PREFIX)-$(EXTERNALS_VERSION) +#------------------------------------------------------------------------------ +# CLEAN TARGETS +#------------------------------------------------------------------------------ -darwin_pkg_license: - # generate HTML version of License - echo "<HTML><BODY><FONT SIZE=\"-1\">" > License.html - cat ../../creb/COPYING | sed -e 's/^$$/\<P\>/g' >> License.html - echo "</FONT></BODY></HTML>" >> License.html - -darwin_pkg_welcome: -# generate Welcome.html from ../README.txt - -darwin_pkg_clean: - -sudo rm -Rf installroot/ $(PACKAGE_PREFIX)*.pkg/ - -rm -f $(PACKAGE_PREFIX)-*.info 1 License.html Welcome.???* - -# install into MSP's default: /usr/local/lib - -darwin_pkg: DESTDIR = installroot -darwin_pkg: prefix = $(DESTDIR)/pd -darwin_pkg: all install darwin_pkg_license darwin_pkg_welcome -# set up installroot dir -# test -d installroot/pd/doc/5.reference/ || mkdir -p installroot/pd/doc/5.reference/ -# test -d installroot/pd/extra || mkdir -p installroot/pd/extra -# install -m644 --group=staff *.pd_darwin installroot/pd/extra - cp -f pd-externals.info $(PACKAGE_NAME).info -# delete cruft - -find installroot -name .DS_Store -delete - -sudo rm -Rf installroot/*/*/CVS installroot/*/*/*/CVS installroot/*/*/*/*/CVS - -rm -f 1 -# set proper permissions - sudo chown -R root:staff installroot - package installroot $(PACKAGE_NAME).info -d . -ignoreDSStore -# install pkg docs - install -m 644 License.html $(PACKAGE_NAME).pkg/Contents/Resources - sudo chown -R root:staff $(PACKAGE_NAME).pkg/Contents/Resources - - -# install into MacOS X style path: /Library/Pd - -darwin_altpkg: all darwin_pkg_clean darwin_pkg_license darwin_pkg_welcome - test -d installroot/Help || mkdir -p installroot/Help - cp -r ../doc/* installroot/Help - test -d installroot/Externals || mkdir -p installroot/Externals - install -m644 --group=staff *.pd_darwin installroot/Externals - sed -e 's/\/usr\/local\/lib/\/Library\/Pd/' pd-externals.info \ - | sed -e 's/MSP standard paths/MacOS X-style Paths/' \ - > $(PACKAGE_NAME)-alt.info - # delete cruft - -sudo find installroot -name .DS_Store -delete - -sudo rm -Rf installroot/*/*/CVS installroot/*/*/*/CVS installroot/*/*/*/*/CVS - -rm -f 1 - # set proper permissions - sudo chown -R root:staff installroot - package installroot $(PACKAGE_NAME)-alt.info -d . -ignoreDSStore - # install pkg docs - install -m 644 License.html $(PACKAGE_NAME)-alt.pkg/Contents/Resources - sudo chown -R root:staff $(PACKAGE_NAME)-alt.pkg/Contents/Resources +clean: + -rm -rf root *.pkg + -rm $(BUILD_DARWIN_SRC)/*~ + rm $(BUILD_DARWIN_SRC)/*.pd_darwin |