#==============================================================================#
#
# Centralized cross-platform build system
#
# see for instructions: http://puredata.org/docs/developer/build
#
#
#==============================================================================#
CWD := $(shell pwd)
cvs_root_dir := $(shell cd $(CWD)/.. && pwd)
DESTDIR = $(CWD)/build
BUILDLAYOUT_DIR = $(CWD)
## default target
all: pd abstractions doc gem externals
@echo "Complete build succeeded!"
include $(BUILDLAYOUT_DIR)/Makefile.buildlayout
#==============================================================================#
#
# GET VERSIONS FOR RELEVANT SOFTWARE
#
#==============================================================================#
CYCLONE_MAJOR_VERSION := $(shell grep CYCLONE_VERSION \
$(externals_src)/miXed/cyclone/build_counter | cut -d ' ' -f 3 | \
cut -d '"' -f 2)
CYCLONE_RELEASE := $(shell grep CYCLONE_RELEASE \
$(externals_src)/miXed/cyclone/build_counter | cut -d ' ' -f 3 | \
cut -d '"' -f 2)
CYCLONE_BUILD := $(shell grep CYCLONE_BUILD \
$(externals_src)/miXed/cyclone/build_counter | cut -d ' ' -f 3 | \
cut -d '"' -f 2)
CYCLONE_VERSION := $(CYCLONE_MAJOR_VERSION) $(CYCLONE_RELEASE) $(CYCLONE_BUILD)
GEM_VERSION := $(shell grep "GEM_VERSION" $(gem_src)/src/Base/GemVersion.h | \
sed -n 's|.*GEM_VERSION = "\(.*\)".*|\1|p')
MAXLIB_VERSION := $(shell grep "define VERSION" \
$(externals_src)/maxlib/maxlib.c | cut -d '"' -f 2)
OSC_VERSION := $(shell grep "define VERSION" $(externals_src)/OSCx/src/OSC.c | \
cut -d '"' -f 2)
PDP_VERSION := $(shell grep PDP_VERSION= $(externals_src)/pdp/configure.ac | \
cut -d '=' -f 2)
PIDIP_VERSION := $(shell grep _VERSION= $(externals_src)/pidip/configure.ac | \
cut -d '"' -f 2)
PMPD_VERSION := $(shell grep "define VERSION" \
$(externals_src)/pmpd/src/pmpd.c | cut -d '"' -f 2)
TOXY_MAJOR_VERSION := $(shell grep TOXY_VERSION \
$(externals_src)/miXed/toxy/build_counter | cut -d ' ' -f 3 | \
cut -d '"' -f 2)
TOXY_RELEASE := $(shell grep TOXY_RELEASE \
$(externals_src)/miXed/toxy/build_counter | cut -d ' ' -f 3 | \
cut -d '"' -f 2)
TOXY_BUILD := $(shell grep TOXY_BUILD \
$(externals_src)/miXed/toxy/build_counter | cut -d ' ' -f 3 | \
cut -d '"' -f 2)
TOXY_VERSION := $(TOXY_MAJOR_VERSION) $(TOXY_RELEASE) $(TOXY_BUILD)
ZEXY_VERSION := $(shell grep VERSION $(externals_src)/zexy/src/zexy.h | \
grep -v _VERSION | cut -d ' ' -f 3 | cut -d '"' -f 2)
# these are sent to all of the various Makefiles so that they all copy their
# output to the same directory tree
DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \
cvs_root_dir=$(cvs_root_dir) \
DESTDIR=$(DESTDIR) \
prefix=$(prefix) \
libpddir=$(libpddir) \
OPT_CFLAGS="$(OPT_CFLAGS)" \
UNAME=$(UNAME)
#==============================================================================#
#
# BUILD TARGETS
#
#==============================================================================#
#------------------------------------------------------------------------------
# abstractions
abstractions:
#------------------------------------------------------------------------------
# doc
doc:
#------------------------------------------------------------------------------
# externals
externals:
$(MAKE) -C $(externals_src) $(DEST_PATHS)
#------------------------------------------------------------------------------
# pd
ifeq ($(OS_NAME),darwin)
PD_CONFIGURE_FLAGS = --enable-jack
else
ifeq ($(OS_NAME),linux)
PD_CONFIGURE_FLAGS = --enable-jack --enable-alsa
else
PD_CONFIGURE_FLAGS =
endif
endif
PD_BUILD_FLAGS =
# Pd needs autoconf 2.5x, which is labeled differently on different machines
#PD_AUTOCONF := ${shell ( test -x "`which autoconf-2.59`" && echo autoconf-2.59 ) || echo autoconf }
PD_AUTOCONF = autoconf
$(pd_src)/src/configure: $(pd_src)/src/configure.in
cd $(pd_src)/src/ && \
if [ -f acinclude.m4 ] ; then aclocal ; fi && \
$(PD_AUTOCONF) && \
if grep -q AC_CONFIG_HEADERS configure.in ; then autoheader ; fi
# this is not used yet because MinGW doesn't use ./configure && make yet
#$(pd_src)/src/makefile: $(pd_src)/src/makefile.in
# cd $(pd_src)/src/ && ./configure $(PD_CONFIGURE_FLAGS)
# this line has the "-" to support the current makefile.mingw hack
pd: $(pd_src)/src/configure
-cd $(pd_src)/src && ./configure $(PD_CONFIGURE_FLAGS) && \
make OPT_CFLAGS="" depend && \
make $(DEST_PATHS) $(PD_BUILD_FLAGS)
pd++:
# the next line doesn't work?
# echo $$MACOSX_DEPLOYMENT_TARGET=10.3
-cd $(pd_src) && scons app_pkg=yes desire=no prefix=$(DESTDIR)\
portaudiopath=../../../../dev/portaudio \
portmidipath=../../../../dev/portmidi \
atomic=yes threadedsf=no debug=yes install
#==============================================================================#
#
# INSTALL TARGETS
#
#==============================================================================#
# this is used for installing into a pre-build Pd binary
extended_install: abstractions_install doc_install extensions_install \
gem_install externals_install readme_install welcome_install \
license_install noncvs_install
#------------------------------------------------------------------------------
# install
install: pd_install extended_install
@echo "Complete install succeeded!"
#------------------------------------------------------------------------------
# install_devel
devel_install: pd_devel_install
@echo "Complete install succeeded!"
#------------------------------------------------------------------------------
# abstractions_install
abstractions_install:
$(MAKE) -C $(abstractions_src) $(DEST_PATHS) install
#------------------------------------------------------------------------------
# doc_install
doc_install:
$(MAKE) -C $(doc_src) $(DEST_PATHS) install
#------------------------------------------------------------------------------
# extensions_install
extensions_install:
$(MAKE) -C $(extensions_src) $(DEST_PATHS) install
#------------------------------------------------------------------------------
# externals_install
externals_install:
$(MAKE) -C $(externals_src) $(DEST_PATHS) install
#------------------------------------------------------------------------------
# gem_install
GEM_NAME = Gem
$(gem_src)/src/configure:
make -C $(gem_src)/src configure
# each platform currently needs a custom ./configure, so this is commented out
# until the ./configure defaults work on all three platforms
#$(gem_src)/src/Make.config: $(gem_src)/src/Make.config.in
# cd $(gem_src)/src && ./configure --with-pd=$(pd_src)
$(gem_src)/src/Gem.dll:
$(gem_src)/src/Gem.pd_linux: $(gem_src)/src/configure
# always run aclocal/autoconf until "configure" is deleted from CVS
cd $(gem_src)/src && aclocal
cd $(gem_src)/src && autoconf
cd $(gem_src)/src && ./configure \
--without-ffmpeg --with-pd=$(pd_src) --disable-NV
$(MAKE) -C $(gem_src)/src
$(gem_src)/src/Gem.pd_darwin:
# always run aclocal/autoconf until "configure" is deleted from CVS
cd $(gem_src)/src && aclocal
cd $(gem_src)/src && autoconf
cd $(gem_src)/src && ./configure \
--without-x --without-ImageMagick \
--without-tiff --without-jpeg --without-mpeg --without-mpeg3 \
--without-ieee1394 --without-aviplay --without-avifile --without-ffmpeg \
--with-ftgl-includes=/sw/include --with-ftgl-libs=/sw/lib \
--with-pd=$(pd_src)
$(MAKE) -C $(gem_src)/src
gem: $(gem_src)/src/Gem.$(EXTENSION)
gem_install: gem $(helpdir)
install -d $(helpdir)/$(GEM_NAME)
install -p $(gem_src)/help/*.* $(helpdir)/$(GEM_NAME)
install -p $(gem_src)/abstractions/*-help.pd $(helpdir)/$(GEM_NAME)
install -d $(objectsdir)/$(GEM_NAME)
ifneq ($(OS_NAME),windows)
install -p $(gem_src)/src/Gem.$(EXTENSION) $(objectsdir)/$(GEM_NAME)/
endif
# kludge to get helpfiles working since the HELPSYMBOL stuff changed
install -p $(gem_src)/help/*.* $(objectsdir)/$(GEM_NAME)/
install -p $(shell ls -1 $(gem_src)/abstractions/*.* | \
grep -v '\-help.pd') $(objectsdir)/$(GEM_NAME)
install -d $(manualsdir)/$(GEM_NAME)
install -p $(gem_src)/doc/*.* $(manualsdir)/$(GEM_NAME)
install -d $(manualsdir)/$(GEM_NAME)/manual
install -p $(gem_src)/doc/manual/*.* $(manualsdir)/$(GEM_NAME)/manual
for dir in $(shell ls -1 $(gem_src)/examples | grep -v CVS); do \
echo "installing $$dir"; \
install -d $(examplesdir)/$(GEM_NAME)/$$dir ; \
install -p $(gem_src)/examples/$$dir/*.* $(examplesdir)/$(GEM_NAME)/$$dir ;\
done
#------------------------------------------------------------------------------
# noncvs_install
# this is for including pre-compiled binaries in a build
noncvs_install:
-install -p $(packages_src)/noncvs/$(OS_NAME)/bin/*.* $(bindir)
-install -p $(packages_src)/noncvs/$(OS_NAME)/doc/5.reference/*.* $(helpdir)
-install -p $(packages_src)/noncvs/$(OS_NAME)/extra/*.* $(objectsdir)
-test -d $(packages_src)/noncvs/$(OS_NAME)/gripd && \
install -d $(DESTDIR)$(prefix)/gripd
-install -p $(packages_src)/noncvs/$(OS_NAME)/gripd/*.* \
$(DESTDIR)$(prefix)/gripd
#------------------------------------------------------------------------------
# pd_install
PD_NAME=Pd
pd_install: pd
$(MAKE) -C $(pd_src)/src $(DEST_PATHS) $(PD_BUILD_FLAGS) install
install -d $(manualsdir)/$(PD_NAME)
install -p $(pd_src)/src/notes.txt $(manualsdir)/$(PD_NAME)
#==============================================================================#
#
# GENERATE TEXT FILES FOR PACKAGE
#
#==============================================================================#
LICENSE_FILE = $(manualsdir)/$(PD_NAME)/License.html
license_install:
# generate HTML version of License
install -d $(manualsdir)/$(PD_NAME)
-rm $(LICENSE_FILE)
touch $(LICENSE_FILE)
echo "" >> "$(LICENSE_FILE)"
echo "(Parts of this package can be used under " >> "$(LICENSE_FILE)"
echo "Pd"s BSD license ) " >> "$(LICENSE_FILE)"
echo "" >> "$(LICENSE_FILE)"
cat "$(externals_src)/creb/COPYING" | sed -e 's/^$$/\/g' >> "$(LICENSE_FILE)"
echo "
" >> $(LICENSE_FILE)
# Pd's license file
install -p "$(pd_src)/LICENSE.txt" "$(manualsdir)/$(PD_NAME)/Pd-LICENSE.txt"
WELCOME_FILE = $(manualsdir)/$(PD_NAME)/Welcome.html
welcome_install:
install -d $(manualsdir)/$(PD_NAME)
-rm $(WELCOME_FILE)
touch $(WELCOME_FILE)
echo "" >> $(WELCOME_FILE)
echo " " >> $(WELCOME_FILE)
echo "" >> $(WELCOME_FILE)
echo "
" >> $(WELCOME_FILE)
echo "
" >> $(WELCOME_FILE)
echo "Version $(PD_VERSION) " >> $(WELCOME_FILE)
echo "written by Miller S. Puckette
" >> $(WELCOME_FILE)
echo "" >> $(WELCOME_FILE)
echo "`grep -A9 ACKNOWLEDG $(pd_src)/README.txt`
" >> $(WELCOME_FILE)
echo " " >> $(WELCOME_FILE)
echo "" >> $(WELCOME_FILE)
README_FILE = $(manualsdir)/$(PD_NAME)/ReadMe.html
readme_install:
install -d $(manualsdir)/$(PD_NAME)
echo $(CYCLONE_RELEASE)
-rm $(README_FILE)
touch $(README_FILE)
echo "" >> $(README_FILE)
echo "" >> $(README_FILE)
echo " " >> $(README_FILE)
echo " " >> $(README_FILE)
echo "" >> $(README_FILE)
echo "" >> $(README_FILE)
echo "Pure Data $(PD_VERSION) " >> $(README_FILE)
echo "Pd is a real-time, graphical programming language for media processing. It provides an environment for audio analysis, synthesis, and processing, with a rich set of multimedia capabilities. You can get Pd for Linux, Windows, MacOS X, BSD, or IRIX.
" >> $(README_FILE)
echo "For more information, go to: http://puredata.org
" >> $(README_FILE)
echo "Installation " >> $(README_FILE)
ifeq ($(OS_NAME),linux)
echo "
" >> $(README_FILE)
echo "
" >> $(README_FILE)
endif
ifeq ($(OS_NAME),darwin)
echo "To install Pd, drag the $(PD_APP_NAME).app into your /Applications folder or to the shortcut in the disk image. (You might need to put the old one in the trash before copying this one to /Applications )
" >> $(README_FILE)
echo "By default, most of the included libraries are loaded at startup. To change this, set your own preferences in the Startup... Preferences pane usings the Save all settings button. If you want to start with a blank set of preferences, run this command in the Terminal.app:
touch ~/Library/Preferences/org.puredata.pd.plist
(~
means your home folder )
The Preferences panels in Pd are currently buggy, so you might have better luck with the Apple utilities: defaults read org.puredata.pd
, or, Property List Editor , which is freely available as part of XCode or the Server Tools .
" >> $(README_FILE)
echo "If you want to use PDP on Mac OS X 10.4/Tiger or 10.3/Panther, you will need to install X11 (X11 comes installed with 10.5/Leopard). It comes on the install CD/DVD that your computer came with. For more detail, see How to install X11 in OS X or How do I install Pd on MacOS X? ." >> $(README_FILE)
endif
ifeq ($(OS_NAME),windows)
echo "To install, run the installer.
" >> $(README_FILE)
echo "To make sure that all of the included libraries are loaded when Pd runs, " >> $(README_FILE)
echo "double-click C:\Program Files\pd\pd-settings.reg
to import the settings to the registry. WARNING: this will overwrite any existing Pd preferences!
" >> $(README_FILE)
endif
echo "License " >> $(README_FILE)
echo "" >> $(README_FILE)
echo 'This package is released under the GNU GPL . The Pd core and some other included code is originally available with a BSD license from the Pd CVS on SourceForge.' >> $(README_FILE)
echo "
" >> $(README_FILE)
echo "Installing Externals, Objects, and Help files " >> $(README_FILE)
echo "" >> $(README_FILE)
echo "If you would like to install other externals, objects, help files, etc. there are special folders that Pd-extended uses." >> $(README_FILE)
echo "
" >> $(README_FILE)
echo "User-specific " >> $(README_FILE)
ifeq ($(OS_NAME),darwin)
echo "~/Library/Pd " >> $(README_FILE)
endif
ifeq ($(OS_NAME),linux)
echo "~/pd/ " >> $(README_FILE)
endif
ifeq ($(OS_NAME),windows)
echo "%UserProfile%\Application Data\Pd " >> $(README_FILE)
endif
echo "Global " >> $(README_FILE)
ifeq ($(OS_NAME),darwin)
echo "/Library/Pd " >> $(README_FILE)
endif
ifeq ($(OS_NAME),linux)
echo "/usr/share/pd " >> $(README_FILE)
endif
ifeq ($(OS_NAME),windows)
echo "%ProgramFiles%\Common Files\Pd " >> $(README_FILE)
endif
echo " " >> $(README_FILE)
echo "
" >> $(README_FILE)
echo "Patented Algorithms " >> $(README_FILE)
echo "" >> $(README_FILE)
echo "This package may contain software that is covered by patents in certain countries, like the U.S. and Germany. In order to use this software you must have the proper license. Below is a list of the known software packages that are covered by patents in some countries:" >> $(README_FILE)
echo "
" >> $(README_FILE)
echo "" >> $(README_FILE)
echo 'Please consider trying to get rid of software patents in your country: http://www.nosoftwarepatents.com
' >> $(README_FILE)
echo "Pure Data CVS Developers " >> $(README_FILE)
# this may seem whack, but it generates the list of developers from the SourceForge site:
curl 'http://sourceforge.net/project/memberlist.php?group_id=55736' | grep -A2 -e '' | sed 's|\(href="\)|target="w" \1http://sourceforge.net|' >> $(README_FILE)
echo "" >> $(README_FILE)
echo "" >> $(README_FILE)
echo "Many others not listed have contributed their time and effort, this is just a list of the current developers in the SourceForge project. But really, every Pd user is a developer and is encouraged to contribute to the CVS repository." >> $(README_FILE)
echo "
" >> $(README_FILE)
echo "Included Versions " >> $(README_FILE)
echo "These externals are all included from the Pd CVS repository:
" >> $(README_FILE)
echo "" >> $(README_FILE)
echo "pure data: $(PD_VERSION) " >> $(README_FILE)
echo " cyclone: $(CYCLONE_VERSION)" >> $(README_FILE)
echo " gem: $(GEM_VERSION)" >> $(README_FILE)
echo " iemlib: `date +20%y.%m.%d`" >> $(README_FILE)
echo " maxlib: $(MAXLIB_VERSION)" >> $(README_FILE)
echo " osc: $(OSC_VERSION)" >> $(README_FILE)
echo " pmpd: $(PMPD_VERSION)" >> $(README_FILE)
echo " pd-abstractions: `date +20%y.%m.%d`" >> $(README_FILE)
echo " pd-doc: `date +20%y.%m.%d`" >> $(README_FILE)
echo " pd-externals: `date +20%y.%m.%d`" >> $(README_FILE)
echo " pddp: `date +20%y.%m.%d`" >> $(README_FILE)
echo " pdp: $(PDP_VERSION)" >> $(README_FILE)
echo " pidip: $(PIDIP_VERSION)" >> $(README_FILE)
echo " toxy: $(TOXY_VERSION)" >> $(README_FILE)
echo " unauthorized: `date +20%y.%m.%d`" >> $(README_FILE)
echo " zexy: $(ZEXY_VERSION)" >> $(README_FILE)
echo " " >> $(README_FILE)
echo "(this package was built on `date`) " >> $(README_FILE)
echo "" >> $(README_FILE)
#==============================================================================#
#
## FINAL ASSEMBLY
#
#==============================================================================#
#----------------------------------------------------------------------------
# DOC_FORMAT
doc_format:
# clean out cruft files
-find $(DESTDIR) -name .DS_Store -delete
-find $(DESTDIR) -name '*.*.bak' -delete
# run script to move help-*.pd files to *-help.pd according to the standard
cd $(helpdir) && \
$(scripts_src)/convert-help-to-standard.sh
#----------------------------------------------------------------------------
# STRIP_HACK
# not all of the build systems are stripping the externals, so strip them here.
# Gem, xsample, and some other things don't like to be stripped
strip_hack:
$(STRIP) $(objectsdir)/*/*.$(EXTENSION)
$(STRIP) $(objectsdir)/[A-FH-Za-wyz]*.$(EXTENSION)
#==============================================================================#
#
# DEVELOPER TARGETS
#
#==============================================================================#
devsymlinks: devsymlinks_$(OS_NAME)
devsymlinks_windows:
devsymlinks_linux:
TCLTK_VERSION=8.4
devsymlinks_darwin: devsymlinks_clean
# this makes /usr/local symlinks to the Tcl/Tk frameworks so that ./configure
# can find them.
# headers
test -e /Library/Frameworks/Tcl.framework/Versions/$(TCLTK_VERSION)/Headers/tcl.h && \
sudo ln -s \
/Library/Frameworks/Tcl.framework/Versions/$(TCLTK_VERSION)/Headers/tcl.h \
/usr/local/include/tcl.h
test -e /Library/Frameworks/Tcl.framework/Versions/$(TCLTK_VERSION)/Headers/tclDecls.h && \
sudo ln -s \
/Library/Frameworks/Tcl.framework/Versions/$(TCLTK_VERSION)/Headers/tclDecls.h \
/usr/local/include/tclDecls.h
test -e /Library/Frameworks/Tcl.framework/Versions/$(TCLTK_VERSION)/Headers/tclPlatDecls.h && \
sudo ln -s \
/Library/Frameworks/Tcl.framework/Versions/$(TCLTK_VERSION)/Headers/tclPlatDecls.h \
/usr/local/include/tclPlatDecls.h
# libs
test -e /Library/Frameworks/Tcl.framework/tclConfig.sh && \
sudo ln -s /Library/Frameworks/Tcl.framework/tclConfig.sh /usr/local/lib
test -e /Library/Frameworks/Tcl.framework/Versions/$(TCLTK_VERSION)/Tcl && \
sudo ln -s \
/Library/Frameworks/Tcl.framework/Versions/$(TCLTK_VERSION)/Tcl \
/usr/local/lib/libtcl$(TCLTK_VERSION).dylib
test -e /Library/Frameworks/Tcl.framework/Versions/$(TCLTK_VERSION)/libtclstub$(TCLTK_VERSION).a && \
sudo ln -s \
/Library/Frameworks/Tcl.framework/Versions/$(TCLTK_VERSION)/libtclstub$(TCLTK_VERSION).a \
/usr/local/lib/libtclstub$(TCLTK_VERSION).a
test -e /usr/local/lib/libtcl$(TCLTK_VERSION).dylib && \
sudo ln -s /usr/local/lib/libtcl$(TCLTK_VERSION).dylib /usr/local/lib/libtcl.dylib
# headers
test -e /Library/Frameworks/Tk.framework/Versions/$(TCLTK_VERSION)/Headers/tk.h && \
sudo ln -s \
/Library/Frameworks/Tk.framework/Versions/$(TCLTK_VERSION)/Headers/tk.h \
/usr/local/include/tk.h
test -e /Library/Frameworks/Tk.framework/Versions/$(TCLTK_VERSION)/Headers/tkDecls.h && \
sudo ln -s \
/Library/Frameworks/Tk.framework/Versions/$(TCLTK_VERSION)/Headers/tkDecls.h \
/usr/local/include/tkDecls.h
test -e /Library/Frameworks/Tk.framework/Versions/$(TCLTK_VERSION)/Headers/tkIntXlibDecls.h && \
sudo ln -s \
/Library/Frameworks/Tk.framework/Versions/$(TCLTK_VERSION)/Headers/tkIntXlibDecls.h \
/usr/local/include/tkIntXlibDecls.h
test -e /Library/Frameworks/Tk.framework/Versions/$(TCLTK_VERSION)/Headers/tkMacOSX.h && \
sudo ln -s \
/Library/Frameworks/Tk.framework/Versions/$(TCLTK_VERSION)/Headers/tkMacOSX.h \
/usr/local/include/tkMacOSX.h
test -e /Library/Frameworks/Tk.framework/Versions/$(TCLTK_VERSION)/Headers/tkPlatDecls.h && \
sudo ln -s \
/Library/Frameworks/Tk.framework/Versions/$(TCLTK_VERSION)/Headers/tkPlatDecls.h \
/usr/local/include/tkPlatDecls.h
# libs
test -e /Library/Frameworks/Tk.framework/tkConfig.sh && \
sudo ln -s /Library/Frameworks/Tk.framework/tkConfig.sh /usr/local/lib
test -e /Library/Frameworks/Tk.framework/Versions/$(TCLTK_VERSION)/Tk && \
sudo ln -s /Library/Frameworks/Tk.framework/Versions/$(TCLTK_VERSION)/Tk \
/usr/local/lib/libtk$(TCLTK_VERSION).dylib
test -e /Library/Frameworks/Tk.framework/Versions/$(TCLTK_VERSION)/libtkstub$(TCLTK_VERSION).a && \
sudo ln -s \
/Library/Frameworks/Tk.framework/Versions/$(TCLTK_VERSION)/libtkstub$(TCLTK_VERSION).a \
/usr/local/lib/libtkstub$(TCLTK_VERSION).a
test -e /usr/local/lib/libtk$(TCLTK_VERSION).dylib && \
sudo ln -s /usr/local/lib/libtk$(TCLTK_VERSION).dylib /usr/local/lib/libtk.dylib
devsymlinks_clean:
-sudo rm -f /usr/local/include/tcl*.h /usr/local/include/tk*.h
-sudo rm -f /usr/local/lib/tclConfig.sh /usr/local/lib/tkConfig.sh
-sudo rm -f /usr/local/lib/libtcl*.dylib /usr/local/lib/libtk*.dylib
-sudo rm -f /usr/local/lib/libtclstub*.a /usr/local/lib/libtkstub*.a
set_version:
# change Pd's version number to reflect the extended build
# this needs the complete_version_defines patch to work
cd $(pd_src)/src/ && \
sed 's|^\(#define PD_TEST_VERSION "\).*"|\1$(PD-EXTENDED_VERSION)"|' m_pd.h > \
m_pd.h.tmp && mv m_pd.h.tmp m_pd.h
unset_version:
# change the version number back to the original
# this needs the complete_version_defines patch to work
cd $(pd_src)/src && \
sed 's|^\(#define PD_TEST_VERSION ".*\)$(PD-EXTENDED_VERSION_PREFIX).*"|\1"|' \
m_pd.h > m_pd.h.tmp && \
mv m_pd.h.tmp m_pd.h
patch_pd:
@echo pd_src $(pd_src)
# apply all platform-neutral patches
for patch in $(shell ls -1 $(CWD)/patches/*.patch); do \
echo "Applying $$patch"; \
cd $(pd_src)/src/ && patch -p0 < $$patch; \
done
# apply all platform-specific patches (is broken on MINGW/Windows)
ifneq ($(OS_NAME),windows)
for patch in $(shell ls -1 $(CWD)/patches/$(OS_NAME)/*.patch); do \
echo "Applying $$patch"; \
cd $(pd_src)/src/ && patch -p0 < $$patch; \
done
endif
-rm -f -- $(pd_src)/src/configure $(pd_src)/src/makefile
@echo " "
@echo "patching completed."
unpatch_pd:
# apply all platform-specific patches (is broken on MINGW/Windows)
ifneq ($(OS_NAME),windows)
for patch in $(shell ls -1r $(CWD)/patches/$(OS_NAME)/*.patch); do \
echo "Applying $$patch"; \
cd $(pd_src)/src/ && patch -p0 -R < $$patch; \
done
endif
# apply all platform-neutral patches
for patch in $(shell ls -1r $(CWD)/patches/*.patch); do \
echo "Applying $$patch"; \
cd $(pd_src)/src/ && patch -p0 -R < $$patch; \
done
-rm -f -- $(pd_src)/src/configure $(pd_src)/src/makefile \
$(pd_src)/src/makefile.dependencies
@echo " "
@echo "unpatching completed."
patch: patch_pd set_version
unpatch: unset_version unpatch_pd
patch_pd_devel:
@echo pd_src $(pd_src)
# apply all platform-neutral patches
for patch in $(shell ls -1 $(CWD)/patches/*.patch); do \
echo "Applying $$patch"; \
cd $(pd_src)/src/ && patch -p0 < $$patch; \
done
# apply all platform-specific patches
for patch in $(shell ls -1 $(CWD)/patches/$(OS_NAME)/*.patch); do \
echo "Applying $$patch"; \
cd $(pd_src)/src/ && patch -p0 < $$patch; \
done
-rm -f -- $(pd_src)/src/configure $(pd_src)/src/makefile
# change Pd's version number to reflect the extended build
# this needs the complete_version_defines patch to work
cd $(pd_src)/src/ && \
sed 's|^\(#define PD_TEST_VERSION "\).*"|\1$(PD-EXTENDED_VERSION)"|' m_pd.h > \
m_pd.h.tmp && mv m_pd.h.tmp m_pd.h
@echo " "
@echo "patching completed."
unpatch_pd_devel:
# change the version number back to the original
# this needs the complete_version_defines patch to work
cd $(pd_src)/src && \
sed 's|^\(#define PD_TEST_VERSION ".*\)$(PD-EXTENDED_VERSION)"|\1"|' \
m_pd.h > m_pd.h.tmp && \
mv m_pd.h.tmp m_pd.h
# apply all platform-specific patches
for patch in $(shell ls -1r $(CWD)/patches/$(OS_NAME)/*.patch); do \
echo "Applying $$patch"; \
cd $(pd_src)/src/ && patch -p0 -R < $$patch; \
done
# apply all platform-neutral patches
for patch in $(shell ls -1r $(CWD)/patches/*.patch); do \
echo "Applying $$patch"; \
cd $(pd_src)/src/ && patch -p0 -R < $$patch; \
done
-rm -f -- $(pd_src)/src/configure $(pd_src)/src/makefile
@echo " "
@echo "unpatching completed."
#==============================================================================#
#
# CLEAN TARGETS
#
#==============================================================================#
abstractions_clean:
-$(MAKE) -C $(abstractions_src) $(DEST_PATHS) clean
doc_clean:
externals_clean:
-$(MAKE) -C $(externals_src) $(DEST_PATHS) clean
gem_clean:
-$(MAKE) -C $(gem_src)/src clean
pd_clean:
-$(MAKE) $(pd_src)/src $(DEST_PATHS) clean
# these targets are all from Makefile.buildlayout: install_clean cruft_clean
clean: abstractions_clean doc_clean externals_clean gem_clean \
pd_clean
echo "Complete clean finished."
distclean: cruft_clean
$(MAKE) -C $(abstractions_src) distclean
$(MAKE) -C $(doc_src) distclean
$(MAKE) -C $(extensions_src) distclean
$(MAKE) -C $(externals_src) distclean
-$(MAKE) -C $(pd_src) distclean
test_locations:
@echo "PD_VERSION: $(PD_VERSION)"
@echo "PD-EXTENDED_VERSION: $(PD-EXTENDED_VERSION)"
@echo "CWD $(CWD)"
@echo "DESTDIR $(DESTDIR)"
@echo "PREFIX $(prefix)"
@echo "BINDIR $(bindir)"
@echo "LIBDIR $(libdir)"
@echo "OBJECTSDIR $(objectsdir)"
@echo "PDDOCDIR $(pddocdir)"
@echo "LIBPDDIR $(libpddir)"
@echo "LIBPDBINDIR $(libpdbindir)"
@echo "HELPDIR $(helpdir)"
@echo "MANUALSDIR $(manualsdir)"
@echo "EXAMPLESDIR $(examplesdir)"