diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2003-08-31 05:21:37 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2003-08-31 05:21:37 +0000 |
commit | cb36f39856c1faa1729dffe5ebbc5a4a2101b507 (patch) | |
tree | 6fe2f2ff50835ff73fb3a37bc27c2726c86bf5b0 /src | |
parent | fb7ca734a3ef5622379596bcf659c52a28821aab (diff) |
created Makefile to auto-generate MacOS X pkgs
svn path=/trunk/externals/zexy/; revision=902
Diffstat (limited to 'src')
-rw-r--r-- | src/makefile.darwin | 270 |
1 files changed, 162 insertions, 108 deletions
diff --git a/src/makefile.darwin b/src/makefile.darwin index 1b64407..71cc2c9 100644 --- a/src/makefile.darwin +++ b/src/makefile.darwin @@ -1,108 +1,162 @@ -current: all
-
-
-# the ZEXY-EXTERNAL-makefile
-# everything is GnuGPL that should come with the zexy.tgz
-# NO WARRANTIES FOR ANYTHING
-# et cetera
-# 1999:forum::für::umläute:2001
-
-# make sure that the "m_pd.h" is somehow available either by putting it into this
-# directory, by adding it's path to the INCLUDE-path or by putting it into an
-# already included path, e.g. "/usr/local/include/"
-
-#these are the user adjustables : adjust them to fit into your system
-# PD will install to $(DESTDIR)$(INSTALLL_PREFIX)$(PDLIBDIR), which is /usr/local/lib/pd
-# by default
-DESTDIR =
-INSTALL_PREFIX = /usr/local
-PDLIBDIR = /pd
-#these were the user adjustables
-
-CC=gcc
-
-TARGETS = zexy \
- z_connective z_pack z_multiplex z_drip \
- z_makesymbol z_strings \
- z_index z_msgfile \
- z_stat z_average z_sort \
- z_tabread4 z_coordinates \
- z_datetime z_lp \
- z_matrix \
- z_noise z_testfun \
- z_multiline z_sigmatrix \
- z_nop z_zdelay \
- z_limiter z_quantize z_swap \
- z_sigbin z_sigaverage \
- z_dfreq z_sigzero z_pdf \
- z_sfplay z_sfrecord \
- z_sigpack \
- z_prime z_random
-
-# ----------------------- MACOSX ----------------------------
-.SUFFIXES: .pd_darwin
-
-
-MACOSXOBJECTS = $(TARGETS:%=%.o)
-ARCH = $(shell uname --machine)
-
-PD_DIR = $(DESTDIR)$(INSTALL_PREFIX)$(PDLIBDIR)
-
-ifeq (${ARCH},alpha)
-AFLAGS = -mieee -mcpu=ev56
-endif
-
-LINCLUDE =
-
-$(MACOSXOBJECTS): *.h
-
-CFLAGS = -O2 -DMACOSX -Dunix -g -Wall-W -Wno-unused \
- -Wno-parentheses -Wno-switch $(LINCLUDE) $(UCFLAGS) $(AFLAGS)
-
-MACOSXLINKFLAGS = -bundle -undefined suppress -flat_namespace
-
-everything: clean all install distclean
-
-distclean:
- touch dummy.o
- touch dummy.pd_darwin
- touch dummy~
- touch _dummy
- rm *.o *.pd_darwin *~ _*
-
-clean:
- touch dummy.o
- touch dummy.pd_darwin
- rm *.o *.pd_darwin
-
-all: $(MACOSXOBJECTS)
-
- @echo :: $(MACOSXOBJECTS)
-
- $(CC) $(MACOSXLINKFLAGS) -o zexy.pd_darwin *.o -lc -lm
-# strip -x zexy.pd_darwin
-
-.c.pd_darwin:
- $(CC) $(CFLAGS) -DPD $(INCLUDE) -c -o $*.o $*.c
-
-install: installdocs
- install -m 644 zexy.pd_darwin $(PD_DIR)/extra
-
-installdocs:
- install -d $(PD_DIR)/doc/5.reference/zexy
- install -m644 ../examples/*.* $(PD_DIR)/doc/5.reference/zexy
-
-darwin_package: all
- test -d ../installroot/pd/doc/5.reference || mkdir -p ../installroot/pd/doc/5.reference
- cp ../examples/* ../installroot/pd/doc/5.reference
- test -d ../installroot/pd/extra || mkdir -p ../installroot/pd/extra
- install -m644 --group=admin *.pd_darwin ../installroot/extra
- open ../darwin_package.pmsp
-
-darwin_altpackage: all
- test -d ../installroot/Help || mkdir -p ../installroot/Help
- -cp ../examples/* ../installroot/Help
- test -d ../installroot/Externals || mkdir -p ../installroot/Externals
- install -m644 *.pd_darwin --group=admin ../installroot/Externals
- open ../darwin_altpackage.pmsp
-
+current: all + + +# the ZEXY-EXTERNAL-makefile +# everything is GnuGPL that should come with the zexy.tgz +# NO WARRANTIES FOR ANYTHING +# et cetera +# 1999:forum::für::umläute:2001 + +# make sure that the "m_pd.h" is somehow available either by putting it into this +# directory, by adding it's path to the INCLUDE-path or by putting it into an +# already included path, e.g. "/usr/local/include/" + +#these are the user adjustables : adjust them to fit into your system +# PD will install to $(DESTDIR)$(INSTALLL_PREFIX)$(PDLIBDIR), which is /usr/local/lib/pd +# by default +DESTDIR = +INSTALL_PREFIX = /usr/local +PDLIBDIR = /pd +#these were the user adjustables + +CC=gcc + +TARGETS = zexy \ + z_connective z_pack z_multiplex z_drip \ + z_makesymbol z_strings \ + z_index z_msgfile \ + z_stat z_average z_sort \ + z_tabread4 z_coordinates \ + z_datetime z_lp \ + z_matrix \ + z_noise z_testfun \ + z_multiline z_sigmatrix \ + z_nop z_zdelay \ + z_limiter z_quantize z_swap \ + z_sigbin z_sigaverage \ + z_dfreq z_sigzero z_pdf \ + z_sfplay z_sfrecord \ + z_sigpack \ + z_prime z_random + +# ----------------------- MACOSX ---------------------------- +.SUFFIXES: .pd_darwin + + +MACOSXOBJECTS = $(TARGETS:%=%.o) +ARCH = $(shell uname --machine) + +PD_DIR = $(DESTDIR)$(INSTALL_PREFIX)$(PDLIBDIR) + +ifeq (${ARCH},alpha) +AFLAGS = -mieee -mcpu=ev56 +endif + +LINCLUDE = + +$(MACOSXOBJECTS): *.h + +CFLAGS = -O2 -DMACOSX -Dunix -g -Wall-W -Wno-unused \ + -Wno-parentheses -Wno-switch $(LINCLUDE) $(UCFLAGS) $(AFLAGS) + +MACOSXLINKFLAGS = -bundle -undefined suppress -flat_namespace + +everything: clean all install distclean + +distclean: + touch dummy.o + touch dummy.pd_darwin + touch dummy~ + touch _dummy + rm *.o *.pd_darwin *~ _* + +clean: + touch dummy.o + touch dummy.pd_darwin + rm *.o *.pd_darwin + +all: $(MACOSXOBJECTS) + + @echo :: $(MACOSXOBJECTS) + + $(CC) $(MACOSXLINKFLAGS) -o zexy.pd_darwin *.o -lc -lm +# strip -x zexy.pd_darwin + +.c.pd_darwin: + $(CC) $(CFLAGS) -DPD $(INCLUDE) -c -o $*.o $*.c + +install: installdocs + install -m 644 zexy.pd_darwin $(PD_DIR)/extra + +installdocs: + install -d $(PD_DIR)/doc/5.reference/zexy + install -m644 ../examples/*.* $(PD_DIR)/doc/5.reference/zexy + + +# added by Hans-Christoph Steiner <hans@eds.org> +# to generate MacOS X packages + +ZEXY_VERSION = $(shell grep VERSION zexy.h | cut -d ' ' -f 3 | cut -d '"' -f 2) + +PACKAGE_NAME = pd-zexy-$(ZEXY_VERSION) + +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 +# echo "<HTML><BODY><FONT SIZE="-1">" > ../Welcome.html +# head -11 ../README.txt >> ../Welcome.html +# sed -i -e 's/the zexy external/\<B\>the zexy external\<\/B\>/' ../Welcome.html +# sed -i -e 's/^$$/\<P\>/' ../Welcome.html +# echo "</FONT></BODY></HTML>" >> ../Welcome.html + head -11 ../README.txt >> Welcome.txt + +darwin_pkg_clean: + -sudo rm -Rf installroot/ $(PACKAGE_NAME)*.pkg/ + -rm -f ../$(PACKAGE_NAME)*.info 1 License.html Welcome.???* + + +# install into MSP's default: /usr/local/lib + +darwin_pkg: all darwin_pkg_clean darwin_pkg_license darwin_pkg_welcome +# set up installroot dir + test -d installroot/pd/doc/5.reference || mkdir -p installroot/pd/doc/5.reference + install -m644 --group=admin ../examples/*.* installroot/pd/doc/5.reference + test -d installroot/pd/extra || mkdir -p installroot/pd/extra + install -m644 --group=admin *.pd_darwin installroot/extra + cp -f ../pd-zexy.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 Welcome.txt $(PACKAGE_NAME).pkg/Contents/Resources + sudo chown -R root:staff $(PACKAGE_NAME).pkg/Contents/Resources + + +# install into MacOS X style paths: /Library/Pd + +darwin_altpkg: all darwin_pkg_clean darwin_pkg_license darwin_pkg_welcome +# set up installroot dir + test -d installroot/Help || mkdir -p installroot/Help + -cp ../examples/* installroot/Help + test -d installroot/Externals || mkdir -p installroot/Externals + install -m644 *.pd_darwin --group=admin installroot/Externals + sed -e 's/\/usr\/local\/lib/\/Library\/Pd/' ../pd-zexy.info \ + | sed -e 's/MSP standard paths/MacOS X-style Paths/' \ + > ../$(PACKAGE_NAME)-alt.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)-alt.info -d . -ignoreDSStore + # install pkg docs + install -m 644 License.html Welcome.txt $(PACKAGE_NAME)-alt.pkg/Contents/Resources + sudo chown -R root:staff $(PACKAGE_NAME)-alt.pkg/Contents/Resources |