aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-11-21 04:49:15 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-11-21 04:49:15 +0000
commit196343bb45dad2fd80851888184b8140c3e11adf (patch)
tree0f7b91a56c40b06b352be3eb13a11025e3946cdf
parentc67180156bb011ebe9a0524757052a28a6c62692 (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
-rw-r--r--abstractions/Makefile32
-rwxr-xr-xabstractions/Makefile.buildlayout7
-rw-r--r--abstractions/TODO2
-rw-r--r--externals/Makefile297
-rw-r--r--externals/Makefile.buildlayout7
-rw-r--r--externals/build/README16
-rw-r--r--externals/build/TODO3
-rw-r--r--externals/build/darwin/makefile126
8 files changed, 328 insertions, 162 deletions
diff --git a/abstractions/Makefile b/abstractions/Makefile
index a1a8769d..b38d74fd 100644
--- a/abstractions/Makefile
+++ b/abstractions/Makefile
@@ -2,20 +2,22 @@
#
# Centralized build system for "abstractions".
#
-# see README for instructions <hans@at.or.at>
+# see for instructions: http://puredata.org/docs/developer/build
+# <hans@at.or.at>
#
#==============================================================================#
CWD := $(shell pwd)
-# these are setup to be overridden by the packages/Makefile
+# these are designed to be overridden by the packages/Makefile
SRC_ROOT_DIR = $(CWD)/..
INSTALL_PREFIX = build
BUILDLAYOUT_DIR = $(CWD)
# default target
install: objects applications
- echo "abstractions install succeeded!"
+ @echo " "
+ @echo "abstractions install succeeded!"
include $(BUILDLAYOUT_DIR)/Makefile.buildlayout
@@ -67,6 +69,9 @@ objects_keyboardkeys:
install -d $(OBJECTS_DEST)/$(KEYBOARDKEYS_NAME)
install -p $(ABSTRACTIONS_SRC)/$(KEYBOARDKEYS_NAME)/abs/*.pd \
$(OBJECTS_DEST)/$(KEYBOARDKEYS_NAME)
+ $(SCRIPTS_SRC)/generate-libdir-metafile.sh $(OBJECTS_DEST) $(MEMENTO_NAME) \
+ --author "Andrey Savitsky" \
+ --description "objects for using keyboard keys for scrolling and selecting"
install -d $(HELP_DEST)/$(KEYBOARDKEYS_NAME)
install -p $(ABSTRACTIONS_SRC)/$(KEYBOARDKEYS_NAME)/doc/*-help.pd \
$(HELP_DEST)/$(KEYBOARDKEYS_NAME)
@@ -84,6 +89,8 @@ objects_la-kitchen:
install -d $(OBJECTS_DEST)/$(LA-KITCHEN_NAME)
install -p $(shell ls -1 $(ABSTRACTIONS_SRC)/La-kitchen/*.pd | \
grep -v '\-help.pd') $(OBJECTS_DEST)/$(LA-KITCHEN_NAME)
+ $(SCRIPTS_SRC)/generate-libdir-metafile.sh $(OBJECTS_DEST) $(LA-KITCHEN_NAME) \
+ --description "a collection of objects working with sensors"
install -d $(HELP_DEST)/$(LA-KITCHEN_NAME)
install -p $(ABSTRACTIONS_SRC)/La-kitchen/*-help.pd \
$(HELP_DEST)/$(LA-KITCHEN_NAME)
@@ -99,6 +106,10 @@ objects_memento:
install -d $(OBJECTS_DEST)/$(MEMENTO_NAME)
install -p $(shell ls -1 $(ABSTRACTIONS_SRC)/rradical/memento/*.pd | \
grep -v '\-help.pd') $(OBJECTS_DEST)/$(MEMENTO_NAME)
+ $(SCRIPTS_SRC)/generate-libdir-metafile.sh $(OBJECTS_DEST) $(MEMENTO_NAME) \
+ --author "Frank Barknecht" \
+ --license "GNU GPL" \
+ --description "a collection of objects for managing state saving"
install -d $(HELP_DEST)/$(MEMENTO_NAME)
install -p $(ABSTRACTIONS_SRC)/rradical/memento/*-help.pd \
$(HELP_DEST)/$(MEMENTO_NAME)
@@ -154,6 +165,9 @@ objects_nusmuk:
install -d $(OBJECTS_DEST)/$(NUSMUK_NAME)
install -p $(shell ls -1 $(ABSTRACTIONS_SRC)/nusmuk/*.pd | \
grep -v '\-help.pd') $(OBJECTS_DEST)/$(NUSMUK_NAME)
+ $(SCRIPTS_SRC)/generate-libdir-metafile.sh $(OBJECTS_DEST) $(NUSMUK_NAME) \
+ --author "Cyrille Henry" \
+ --description "a collection of objects for physical modelling"
install -d $(HELP_DEST)/$(NUSMUK_NAME)
install -p $(ABSTRACTIONS_SRC)/nusmuk/*-help.pd \
$(HELP_DEST)/$(NUSMUK_NAME)
@@ -210,14 +224,6 @@ devsymlinks_keyboardkeys:
#==============================================================================#
# the destination-specific clean targets are in Makefile.buildlayout
-clean: install_clean cruft_clean
+clean: install_clean
-#==============================================================================#
-#
-# LEGACY TARGETS
-#
-#==============================================================================#
-# this is a legacy clean target to get rid of cruft
-darwin_pkg_clean:
- -sudo rm -Rf installroot/ $(PKG_PREFIX)*.pkg/
- -rm -f $(PKG_NAME).info 1
+distclean: clean cruft_clean
diff --git a/abstractions/Makefile.buildlayout b/abstractions/Makefile.buildlayout
index a5a85e6d..d5b9e9f3 100755
--- a/abstractions/Makefile.buildlayout
+++ b/abstractions/Makefile.buildlayout
@@ -70,13 +70,18 @@ EXTERNALS_SRC = $(SRC_ROOT_DIR)/externals
FLEXT_SRC = $(SRC_ROOT_DIR)/externals/grill/flext
GEM_SRC = $(SRC_ROOT_DIR)/Gem
GEMLIBS_SRC = $(SRC_ROOT_DIR)/GemLibs
+PACKAGES_SRC = $(SRC_ROOT_DIR)/packages
PD_SRC = $(SRC_ROOT_DIR)/pd
SCRIPTS_SRC = $(SRC_ROOT_DIR)/scripts
# destinations
APPLICATIONS_DEST = $(DOCS_DEST)/examples
+BIN_DEST = $(INSTALL_PREFIX)/bin
DOCS_DEST = $(INSTALL_PREFIX)/doc
+INCLUDE_DEST = $(INSTALL_PREFIX)/include
+LIB_DEST = $(INSTALL_PREFIX)/lib
+MAN_DEST = $(INSTALL_PREFIX)/man
OBJECTS_DEST = $(INSTALL_PREFIX)/extra
HELP_DEST = $(DOCS_DEST)/5.reference
MANUALS_DEST = $(DOCS_DEST)/manuals
@@ -146,7 +151,7 @@ manuals_clean:
objects_clean:
-rm $(OBJECTS_DEST)/*/*/*.pd
-rm $(OBJECTS_DEST)/*/*.pd
- -rm $(OBJECTS_DEST)/*.pd
+ -rm $(OBJECTS_DEST)/*.pd
-rm $(OBJECTS_DEST)/*/*/*.$(EXTENSION)
-rm $(OBJECTS_DEST)/*/*.$(EXTENSION)
-rm $(OBJECTS_DEST)/*.$(EXTENSION)
diff --git a/abstractions/TODO b/abstractions/TODO
new file mode 100644
index 00000000..d78220d4
--- /dev/null
+++ b/abstractions/TODO
@@ -0,0 +1,2 @@
+
+- simplify Makefile, making just "install" with subsections for each subdir.
diff --git a/externals/Makefile b/externals/Makefile
index 56797d8e..3a94d519 100644
--- a/externals/Makefile
+++ b/externals/Makefile
@@ -16,7 +16,7 @@ INSTALL_PREFIX = $(CWD)/build
BUILDLAYOUT_DIR = $(CWD)
# default target
-all: objects
+default: all
.SUFFIXES: .$(EXTENSION)
@@ -36,40 +36,42 @@ DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \
#
#==============================================================================#
-objects: objects_$(OS_NAME)
+#------------------------------------------------------------------------------#
+# BUILD
+all: pre_all_$(OS_NAME)
+all: creb iemabs iemlib iemmatrix pdp pmpd 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
-# these targets are for platform-specific needs
-objects_darwin:
+# these targets are for platform-specific needs that run before objects:
+pre_all_darwin:
-objects_linux:
+pre_all_linux:
-objects_win:
+pre_all_win:
-objects_unknown:
+pre_all_unknown:
# this target is for "everything else"
+
+#------------------------------------------------------------------------------#
+# INSTALL
+install: $(OBJECTS_DEST) help_install objects_install unfiltered_install
+install: creb_install iemabs_install iemabs_install iemmatrix_install
+install: pdp_install pmpd_install vbap_install zexy_install
+ @echo " "
+ @echo "externals install succeeded!"
+
+objects_install:
+ install -p $(EXTERNALS_SRC)/build/$(OS_NAME)/*.$(EXTENSION) $(OBJECTS_DEST)
+
#==============================================================================#
#
# INSTALL TARGETS
#
#==============================================================================#
-IEMABS_NAME = iemabs
-IEMLIB_NAME = iemlib
-PMPD_NAME = pmpd
-applications_install: $(APPLICATIONS_DEST)
-# iemlib
- install -d $(APPLICATIONS_DEST)/$(IEMLIB_NAME)
- install -p $(EXTERNALS_SRC)/iemlib/examples/*.* \
- $(APPLICATIONS_DEST)/$(IEMLIB_NAME)
-# PMDP examples
- install -d $(APPLICATIONS_DEST)/$(PMPD_NAME)
- install -p $(EXTERNALS_SRC)/pmpd/exemples/*.pd \
- $(APPLICATIONS_DEST)/$(PMPD_NAME)
-
help_install: $(HELP_DEST)
#------------------------------------------------------------------------------#
@@ -108,7 +110,6 @@ help_install: $(HELP_DEST)
install -p \
$(EXTERNALS_SRC)/pdogg/*/*.pd \
$(EXTERNALS_SRC)/plugin~/*.pd \
- $(EXTERNALS_SRC)/pmpd/help/*.pd\
$(EXTERNALS_SRC)/rhythm_estimator/*.p? \
$(EXTERNALS_SRC)/signal/*/*.pd \
$(EXTERNALS_SRC)/sprinkler/sprinkler-help.pd \
@@ -119,20 +120,6 @@ help_install: $(HELP_DEST)
$(EXTERNALS_SRC)/zhzxh~/*.pd \
$(HELP_DEST)
#------------------------------------------------------------------------------#
-# IEMlib uses its own dir and since its not maintained in CVS
-# its best not to change the objects
- install -d $(HELP_DEST)/iemhelp
- install -p $(EXTERNALS_SRC)/iemlib/iemhelp/*.* $(HELP_DEST)/iemhelp
-#------------------------------------------------------------------------------#
-# zexy uses its own dir
- install -d $(HELP_DEST)/zexy
- install -p $(EXTERNALS_SRC)/zexy/zexy.pd $(HELP_DEST)
- install -p $(EXTERNALS_SRC)/zexy/examples/*.* $(HELP_DEST)/zexy
-#------------------------------------------------------------------------------#
-# iemmatrix uses its own dir
- install -d $(HELP_DEST)/iemmatrix
- install -p $(EXTERNALS_SRC)/iem/iemmatrix/doc/*.pd $(HELP_DEST)/iemmatrix
-#------------------------------------------------------------------------------#
# mjlib [prob] conflicts with cyclone's [prob] so filter it
install -p $(shell ls -1 $(EXTERNALS_SRC)/mjlib/doc/*.* | \
grep -v 'prob') $(HELP_DEST)
@@ -142,21 +129,51 @@ help_install: $(HELP_DEST)
grep -v 'split') $(HELP_DEST)
-manuals_install: $(MANUALS_DEST)
-# pmpd
- install -d $(MANUALS_DEST)/$(PMPD_NAME)
- install -p $(EXTERNALS_SRC)/pmpd/doc/pmpd.pdf/pmpd.pdf \
- $(MANUALS_DEST)/$(PMPD_NAME)
+
+#==============================================================================#
+#
+# PROJECT TARGETS
+#
+#==============================================================================#
-objects_install: objects
- install -p $(EXTERNALS_SRC)/build/$(OS_NAME)/*.$(EXTENSION) $(OBJECTS_DEST)
#------------------------------------------------------------------------------#
-# abstractions (i.e. objects written in Pd)
-# iemmatrix
- install -p $(shell ls -1 $(EXTERNALS_SRC)/iem/iemmatrix/abs/*.* | \
- grep -v '\-help.pd') $(OBJECTS_DEST)
-# IEMlib
+# TEMPLATE
+TEMPLATE_NAME=template
+template:
+
+
+template_install: template
+ install -d $(OBJECTS_DEST)/$(TEMPLATE_NAME)
+ install -d $(HELP_DEST)/$(TEMPLATE_NAME)
+ install -d $(MANUALS_DEST)/$(TEMPLATE_NAME)
+ install -d $(APPLICATIONS_DEST)/$(TEMPLATE_NAME)
+
+
+#------------------------------------------------------------------------------#
+# CREB
+CREB_NAME=creb
+creb:
+
+
+creb_install: creb
+ install -d $(OBJECTS_DEST)/$(CREB_NAME)
+ install -p $(EXTERNALS_SRC)/creb/abs/*.pd $(OBJECTS_DEST)/$(CREB_NAME)
+ install -d $(HELP_DEST)/$(CREB_NAME)
+ install -p -m0644 $(EXTERNALS_SRC)/creb/doc/examples/*.* \
+ $(HELP_DEST)/$(CREB_NAME)
+# install -d $(MANUALS_DEST)/$(CREB_NAME)
+# install -d $(APPLICATIONS_DEST)/$(CREB_NAME)
+
+
+
+#------------------------------------------------------------------------------#
+# IEMABS
+IEMABS_NAME=iemabs
+iemabs:
+
+
+iemabs_install: iemabs
# iemabs still has the help patches in the old help-*.pd style
install -d $(OBJECTS_DEST)/$(IEMABS_NAME)
install -p $(shell ls -1 $(EXTERNALS_SRC)/iemlib/iemabs/*.pd | \
@@ -169,14 +186,178 @@ objects_install: objects
install -d $(MANUALS_DEST)/$(IEMABS_NAME)
install -p $(EXTERNALS_SRC)/iemlib/iemabs/*.txt \
$(MANUALS_DEST)/$(IEMABS_NAME)
-# vbap
- install -p $(EXTERNALS_SRC)/vbap/graph-to-aziele.pd $(OBJECTS_DEST)
-install: $(OBJECTS_DEST) help_install applications_install objects_install
-install: manuals_install
- @echo "externals install succeeded!"
+#------------------------------------------------------------------------------#
+# IEMLIB
+IEMLIB_NAME=iemlib
+iemlib:
+
+
+iemlib_install: iemlib
+# install -d $(OBJECTS_DEST)/$(IEMLIB_NAME)
+# install -d $(HELP_DEST)/$(IEMLIB_NAME)
+ install -d $(HELP_DEST)/iemhelp
+ install -p $(EXTERNALS_SRC)/iemlib/iemhelp/*.* $(HELP_DEST)/iemhelp
+# install -d $(MANUALS_DEST)/$(IEMLIB_NAME)
+ install -d $(APPLICATIONS_DEST)/$(IEMLIB_NAME)
+ install -p $(EXTERNALS_SRC)/iemlib/examples/*.* \
+ $(APPLICATIONS_DEST)/$(IEMLIB_NAME)
+
+
+
+#------------------------------------------------------------------------------#
+# IEMMATRIX
+IEMMATRIX_NAME=iemmatrix
+iemmatrix:
+
+
+iemmatrix_install: iemmatrix
+ install -d $(OBJECTS_DEST)/$(IEMMATRIX_NAME)
+ install -p $(shell ls -1 $(EXTERNALS_SRC)/iem/iemmatrix/abs/*.* | \
+ grep -v '\-help.pd') $(OBJECTS_DEST)/$(IEMMATRIX_NAME)
+ install -d $(HELP_DEST)/$(IEMMATRIX_NAME)
+ install -p $(EXTERNALS_SRC)/iem/iemmatrix/doc/*.pd \
+ $(HELP_DEST)/$(IEMMATRIX_NAME)
+
+
+
+#------------------------------------------------------------------------------#
+# PDP
+PDP_NAME=pdp
+pdp:
+# cd $(EXTERNALS_SRC)/pdp && ./configure && $(MAKE)
+#TODO: compile pidip here
+#TODO: compile gem2pdp here
+
+pdp_install: pdp
+# install -d $(OBJECTS_DEST)/$(PDP_NAME)
+# install -p $(EXTERNALS_SRC)/pdp/*.pd_darwin $(OBJECTS_DEST)
+# install -p $(EXTERNALS_SRC)/pidip/*.pd_darwin $(OBJECTS_DEST)
+# install -p $(EXTERNALS_SRC)/gem2pdp/*.pd_darwin $(OBJECTS_DEST)
+ install -p $(EXTERNALS_SRC)/pdp/abstractions/*.pd $(OBJECTS_DEST)
+# install -d $(HELP_DEST)/$(PDP_NAME)
+ install -p $(EXTERNALS_SRC)/pdp/doc/objects/*.* $(HELP_DEST)
+ install -d $(MANUALS_DEST)/$(PDP_NAME)
+ install -p $(EXTERNALS_SRC)/pdp/doc/reference.txt $(MANUALS_DEST)/$(PDP_NAME)
+ install -p $(EXTERNALS_SRC)/pdp/doc/introduction/*.* \
+ $(MANUALS_DEST)/$(PDP_NAME)
+ install -d $(APPLICATIONS_DEST)/$(PDP_NAME)
+ install -p $(EXTERNALS_SRC)/pdp/doc/examples/*.* \
+ $(APPLICATIONS_DEST)/$(PDP_NAME)
+
+
+#------------------------------------------------------------------------------#
+# PMPD
+PMPD_NAME=pmpd
+pmpd:
+
+
+pmpd_install: pmpd
+ install -d $(OBJECTS_DEST)/$(PMPD_NAME)
+ install -d $(HELP_DEST)/$(PMPD_NAME)
+ install -p $(EXTERNALS_SRC)/pmpd/help/*.pd \
+ $(HELP_DEST)/$(PMPD_NAME)
+ install -d $(MANUALS_DEST)/$(PMPD_NAME)
+ install -d $(MANUALS_DEST)/$(PMPD_NAME)
+ install -p $(EXTERNALS_SRC)/pmpd/doc/pmpd.pdf/pmpd.pdf \
+ $(MANUALS_DEST)/$(PMPD_NAME)
+ install -d $(APPLICATIONS_DEST)/$(PMPD_NAME)
+ install -p $(EXTERNALS_SRC)/pmpd/exemples/*.pd \
+ $(APPLICATIONS_DEST)/$(PMPD_NAME)
+
+
+#------------------------------------------------------------------------------#
+# VBAP
+VBAP_NAME=vbap
+vbap:
+
+
+vbap_install: vbap
+ install -d $(OBJECTS_DEST)/$(VBAP_NAME)
+# install -d $(HELP_DEST)/$(VBAP_NAME)
+# install -d $(MANUALS_DEST)/$(VBAP_NAME)
+# install -d $(APPLICATIONS_DEST)/$(VBAP_NAME)
+ install -p $(EXTERNALS_SRC)/vbap/graph-to-aziele.pd \
+ $(OBJECTS_DEST)/$(VBAP_NAME)
+
+
+
+#------------------------------------------------------------------------------#
+# Zexy
+ZEXY_NAME = zexy
+zexy:
+# zexy's new build system doesn't work with CVS layout, and most of zexy is
+# included in the extrnals build system now anyway. But the abstractions
+# should still be included
+# cd $(EXTERNALS_SRC)/zexy/src && autoconf && ./configure && $(MAKE)
+
+
+zexy_install: zexy
+ install -d $(OBJECTS_DEST)/$(ZEXY_NAME)
+# install -p $(EXTERNALS_SRC)/zexy/src/*.pd_darwin $(OBJECTS_DEST)/$(ZEXY_NAME)
+ install -p $(shell ls -1 $(EXTERNALS_SRC)/zexy/abs/*.pd | \
+ grep -v '-help.pd' | sed 's/\([&<>|~]\)/\\\1/g') \
+ $(OBJECTS_DEST)/$(ZEXY_NAME)
+ install -d $(HELP_DEST)/$(ZEXY_NAME)
+ install -p $(EXTERNALS_SRC)/zexy/abs/*-help.pd $(HELP_DEST)/$(ZEXY_NAME)
+ install -p $(EXTERNALS_SRC)/zexy/zexy.pd $(HELP_DEST)
+ install -p $(EXTERNALS_SRC)/zexy/examples/*.* $(HELP_DEST)/$(ZEXY_NAME)
+
+
+
+#==============================================================================#
+#
+# UNFILTERED PROJECT TARGETS
+#
+#==============================================================================#
+# this is not yet organized into libdirs, but just leftover <hans@at.or.at>
+
+unfiltered_install:
+#----------------------------------------------------------------------------
+# hcs
+ install -p $(shell ls -1 $(EXTERNALS_SRC)/hcs/*.pd | \
+ grep -v '\-help.pd') $(OBJECTS_DEST)
+# hid
+ cd $(EXTERNALS_SRC)/hcs/hid && $(MAKE)
+ install -p $(EXTERNALS_SRC)/hcs/hid/hid.pd_darwin $(OBJECTS_DEST)
+ install -p $(shell ls -1 $(EXTERNALS_SRC)/hcs/hid/*.pd | \
+ grep -v '\-help.pd'| grep -v '\-list.pd') $(OBJECTS_DEST)
+# general
+ install -p $(EXTERNALS_SRC)/hcs/general/*.pd $(OBJECTS_DEST)
+# pan
+ install -p $(shell ls -1 $(EXTERNALS_SRC)/hcs/pan/*.pd | \
+ grep -v '\-help.pd') $(OBJECTS_DEST)
+#----------------------------------------------------------------------------
+# miXed
+ cd $(EXTERNALS_SRC)/miXed/toxy && $(MAKE)
+ cd $(EXTERNALS_SRC)/miXed/cyclone && $(MAKE)
+ cd $(EXTERNALS_SRC)/miXed/pddp && $(MAKE)
+ install -d $(OBJECTS_DEST)
+ install -p $(EXTERNALS_SRC)/miXed/bin/*.pd_darwin $(OBJECTS_DEST)
+ install -d $(HELP_DEST)/cyclone
+ install -p $(EXTERNALS_SRC)/miXed/test/*/*.* \
+ $(HELP_DEST)/cyclone
+ install -p $(EXTERNALS_SRC)/miXed/doc/*/*/*.* \
+ $(HELP_DEST)
+# install cyclist with pd
+ install -d $(INSTALL_PREFIX)/bin
+ install -p $(EXTERNALS_SRC)/miXed/bin/cyclist $(INSTALL_PREFIX)/bin
+#----------------------------------------------------------------------------
+# OSC
+ cd $(EXTERNALS_SRC)/OSCx && ./configure && $(MAKE)
+ install -p $(EXTERNALS_SRC)/OSCx/doc/*.* $(HELP_DEST)
+ install -p $(EXTERNALS_SRC)/OSCx/src/*.pd_darwin $(OBJECTS_DEST)
+#----------------------------------------------------------------------------
+# unauthorized
+ cd $(EXTERNALS_SRC)/unauthorized && $(MAKE)
+ install -p $(EXTERNALS_SRC)/unauthorized/*/*.pd_darwin $(OBJECTS_DEST)
+ install -p $(EXTERNALS_SRC)/unauthorized/*/*.pd $(HELP_DEST)
+ install -p $(EXTERNALS_SRC)/unauthorized/*/*.txt $(HELP_DEST)
+ install -p $(EXTERNALS_SRC)/unauthorized/*/*.pls $(HELP_DEST)
+ cp -Rfp $(EXTERNALS_SRC)/unauthorized/blinkenlights/blm $(HELP_DEST)
+
#==============================================================================#
#
@@ -188,5 +369,13 @@ install: manuals_install
devsymlinks:
-# FYI: clean targets are in Makefile.buildlayout
-clean: install_clean cruft_clean
+#==============================================================================#
+#
+# CLEAN TARGETS
+#
+#==============================================================================#
+
+# the destination-specific clean targets are in Makefile.buildlayout
+clean: install_clean
+
+distclean: clean cruft_clean
diff --git a/externals/Makefile.buildlayout b/externals/Makefile.buildlayout
index a5a85e6d..d5b9e9f3 100644
--- a/externals/Makefile.buildlayout
+++ b/externals/Makefile.buildlayout
@@ -70,13 +70,18 @@ EXTERNALS_SRC = $(SRC_ROOT_DIR)/externals
FLEXT_SRC = $(SRC_ROOT_DIR)/externals/grill/flext
GEM_SRC = $(SRC_ROOT_DIR)/Gem
GEMLIBS_SRC = $(SRC_ROOT_DIR)/GemLibs
+PACKAGES_SRC = $(SRC_ROOT_DIR)/packages
PD_SRC = $(SRC_ROOT_DIR)/pd
SCRIPTS_SRC = $(SRC_ROOT_DIR)/scripts
# destinations
APPLICATIONS_DEST = $(DOCS_DEST)/examples
+BIN_DEST = $(INSTALL_PREFIX)/bin
DOCS_DEST = $(INSTALL_PREFIX)/doc
+INCLUDE_DEST = $(INSTALL_PREFIX)/include
+LIB_DEST = $(INSTALL_PREFIX)/lib
+MAN_DEST = $(INSTALL_PREFIX)/man
OBJECTS_DEST = $(INSTALL_PREFIX)/extra
HELP_DEST = $(DOCS_DEST)/5.reference
MANUALS_DEST = $(DOCS_DEST)/manuals
@@ -146,7 +151,7 @@ manuals_clean:
objects_clean:
-rm $(OBJECTS_DEST)/*/*/*.pd
-rm $(OBJECTS_DEST)/*/*.pd
- -rm $(OBJECTS_DEST)/*.pd
+ -rm $(OBJECTS_DEST)/*.pd
-rm $(OBJECTS_DEST)/*/*/*.$(EXTENSION)
-rm $(OBJECTS_DEST)/*/*.$(EXTENSION)
-rm $(OBJECTS_DEST)/*.$(EXTENSION)
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