diff options
-rw-r--r-- | Makefile | 134 | ||||
-rw-r--r-- | pd-unauthorized.info | 16 |
2 files changed, 109 insertions, 41 deletions
@@ -1,50 +1,21 @@ -# -# Currently you have to "make prep" before doing any other makes. -# This is ugly and a bad hack and will change. -Hans <hans@eds.org -# -# (I think I need to emulate ../build/darwin/makefile ) EXT=pd_darwin -INSTALL_PREFIX=/usr/local CC=gcc +# This is Miller's default install location +INSTALL_PREFIX=/usr/local/lib/pd + # find all files to compile -TARGETS=$(subst .tk,.tk2c,$(wildcard *.tk)) $(subst .c,.$(EXT),$(wildcard *.c)) +TARGETS=$(subst .tk,.tk2c,$(wildcard */*.tk)) $(subst .c,.$(EXT),$(wildcard */*.c)) current: $(EXT) .SUFFIXES: .pd_linux .pd_darwin .pd_irix5 .pd_irix6 .dll .tk .tk2c -# ----------------------- prep ----------------------- -# copy all of the files into the root dir for compiling - -prep: - cp */*.c */*.h */*.cc */*.tk . - rm grid*.* mp*.* - -# ----------------------- Mac OSX ----------------------- - -pd_darwin: $(TARGETS) - - -DARWINCFLAGS = -DPD -DUNIX -DMACOSX -DICECAST -O2 -Wall -W -Wshadow -Wstrict-prototypes \ - -Wno-unused -Wno-parentheses -Wno-switch - -.c.osx: - $(CC) $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c - -.tk.tk2c: - ./tk2c.bash < $*.tk > $*.tk2c - -.c.pd_darwin: - $(CC) $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c - $(CC) -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o - -rm $*.o - # ----------------------- NT ----------------------- -pd_nt: prep $(NAME).dll +pd_nt: $(NAME).dll PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo VC="C:\Program Files\Microsoft Visual Studio\Vc98" @@ -67,7 +38,7 @@ PDNTLIB = $(PDNTLDIR)\libc.lib \ # ----------------------- IRIX 5.x ----------------------- -pd_irix5: prep $(NAME).pd_irix5 +pd_irix5: $(NAME).pd_irix5 SGICFLAGS5 = -o32 -DPD -DUNIX -DIRIX -O2 @@ -83,7 +54,7 @@ SGIINCLUDE = -I../../src # ----------------------- IRIX 6.x ----------------------- -pd_irix6: prep $(NAME).pd_irix6 +pd_irix6: $(NAME).pd_irix6 SGICFLAGS6 = -n32 -DPD -DUNIX -DIRIX -DN32 -woff 1080,1064,1185 \ -OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -OPT:cray_ivdep=true \ @@ -99,13 +70,13 @@ SGICFLAGS6 = -n32 -DPD -DUNIX -DIRIX -DN32 -woff 1080,1064,1185 \ # ----------------------- LINUX i386 ----------------------- -pd_linux: prep $(NAME).pd_linux +pd_linux: $(NAME).pd_linux LINUXCFLAGS = -DPD -DUNIX -DICECAST -O2 -funroll-loops -fomit-frame-pointer \ -Wall -W -Wno-shadow -Wstrict-prototypes -g \ -Wno-unused -Wno-parentheses -Wno-switch -Werror -LINUXINCLUDE = -I../../src -I/usr/local/src/pd/src +LINUXINCLUDE = -I../../src -I../../pd/src .c.o: $(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c @@ -117,11 +88,92 @@ LINUXINCLUDE = -I../../src -I/usr/local/src/pd/src strip --strip-unneeded $*.pd_linux rm $*.o +# ----------------------- Mac OSX ----------------------- + +pd_darwin: $(TARGETS) + +# I added these defines since Darwin doesn't have this signals. I do +# not know whether the objects will work, but they will compile. +# -D__APPLE__ -DMSG_NOSIGNAL=0 -DSOL_TCP=0 +# I got this from here: http://www.holwegner.com/forum/viewtopic.php?t=4 +# <hans@eds.org> +DARWINCFLAGS = -DPD -DUNIX -DMACOSX -DICECAST \ + -D__APPLE__ -DMSG_NOSIGNAL=0 -DSOL_TCP=0 \ + -O2 -Wall -W -Wshadow -Wstrict-prototypes -Wno-unused -Wno-parentheses -Wno-switch + +DARWINLINKFLAGS = -bundle -undefined suppress -flat_namespace + +DARWININCLUDE = -I../../src -I../../pd/src -I/sw/include + +.c.osx: + $(CC) $(DARWINCFLAGS) $(DARWININCLUDE) -o $*.o -c $*.c + +.tk.tk2c: + ./tk2c.bash < $*.tk > $*.tk2c + +.c.pd_darwin: + $(CC) $(DARWINCFLAGS) $(DARWININCLUDE) -o $*.o -c $*.c + $(CC) $(DARWINLINKFLAGS) -o $*.pd_darwin $*.o + chmod a-x "$*.pd_darwin" + -rm $*.o + +# %.pd_darwin: %.c +# $(CC) $(DARWINCFLAGS) $(DARWININCLUDE) -o "$*.o" -c "$*.c" +# $(CC) $(DARWINLINKFLAGS) -o "$*.pd_darwin" "$*.o" -lc -lm +# chmod a-x "$*.pd_darwin" +# rm -f "$*.o" + +# added by Hans-Christoph Steiner <hans@eds.org> +# to generate MacOS X packages + +PACKAGE_PREFIX = pd-unauthorized +PACKAGE_VERSION = $(shell date +20%y.%m.%d) +PACKAGE_NAME = $(PACKAGE_PREFIX)-$(PACKAGE_VERSION) + +darwin_pkg_license: + # generate HTML version of License + echo "<HTML><BODY><FONT SIZE="-1">" > License.html + sed -e 's/^$$/\<P\>/g' COPYING >> License.html + echo "</FONT></BODY></HTML>" >> License.html + +darwin_pkg_clean: + -sudo rm -Rf installroot/ $(PACKAGE_PREFIX)*.pkg/ + -rm -f $(PACKAGE_PREFIX)-*.info 1 License.html + +# install into MSP's default: /usr/local/lib + +darwin_pkg: pd_darwin darwin_pkg_clean darwin_pkg_license +# set up installroot dir + test -d installroot/pd/doc/5.reference || mkdir -p installroot/pd/doc/5.reference + install -m644 --group=staff */*.pd installroot/pd/doc/5.reference + install -m644 --group=staff */*.txt installroot/pd/doc/5.reference + install -m644 --group=staff */*.pls installroot/pd/doc/5.reference + cp -Rf blinkenlights/blm installroot/pd/doc/5.reference + test -d installroot/pd/extra || mkdir -p installroot/pd/extra + install -m644 */*.pd_darwin --group=staff installroot/pd/extra + cp -f pd-unauthorized.info $(PACKAGE_NAME).info +# delete cruft + -find installroot -name .DS_Store -delete + -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: - cp */*.pd ../../doc/5.reference + cp */*.pd $(INSTALL_PREFIX)/doc/5.reference clean: - -rm -f *.?~ *.o *.pd_* *.dll *.tk2c core so_locations - -rm -f ./*.c ./*.h ./*.cc ./*.tk +# delete emacs backup files + -rm -f */*.?~ */*.~?.?.~ +# delete compile products + -rm -f *.o *.pd_* *.dll *.tk2c core so_locations + -rm -f */*.?~ */*.o */*.pd_* */*.dll */*.tk2c */.*.swp */core so_locations +# delete autoconf/automake product + -rm -Rf */autom4te.cache + diff --git a/pd-unauthorized.info b/pd-unauthorized.info new file mode 100644 index 0000000..f78d4bd --- /dev/null +++ b/pd-unauthorized.info @@ -0,0 +1,16 @@ +Title Unauthorized Externals for Pd +Version MSP standard paths +Description Yves Degoyon's Unauthorized Externals +DefaultLocation /usr/local/lib +DeleteWarning + +### Package Flags + +NeedsAuthorization YES +Required NO +Relocatable YES +RequiresReboot NO +UseUserMask YES +OverwritePermissions NO +InstallFat NO +RootVolumeOnly NO |