X-Git-Url: https://scm.cri.ensmp.fr/git/Faustine.git/blobdiff_plain/c7f552fd8888da2f0d8cfb228fe0f28d3df3a12c..b4b6f2ea75b9f0f3ca918f5b84016610bf7a4d4f:/interpretor/preprocessor/faust-0.9.47mr3/examples/Makefile.sccompile diff --git a/interpretor/preprocessor/faust-0.9.47mr3/examples/Makefile.sccompile b/interpretor/preprocessor/faust-0.9.47mr3/examples/Makefile.sccompile new file mode 100644 index 0000000..8decba2 --- /dev/null +++ b/interpretor/preprocessor/faust-0.9.47mr3/examples/Makefile.sccompile @@ -0,0 +1,43 @@ +# Makefile to produce supercollider plugins with Faust: +# 'foo.dsp' -> 'foo.so|scx' and 'foo.sc' +# These two files (scsynth plugin and sclang extension), can be copied to +# $HOME/share/SuperCollider/Extensions (Linux) or +# $HOME/Library/Application Support/SuperCollider/Extensions (Mac OS X) +# +# The shell script /tools/faust2appls/faust2supercollider +# needs to be installed somewhere in the user's search path. + +system := $(shell uname -s) +ifeq ($(system), Darwin) +EXT := scx +else +EXT := so +endif + +dspsrc := $(wildcard *.dsp) +libsrc := $(wildcard *.lib) +incsrc := $(wildcard *.h) +allsrc := $(dspsrc) $(libsrc) $(incsrc) + +ifeq ($(DEST),) + DEST := ./supercolliderdir +endif + +F2SC = faust2supercollider -sd + +### allocate a unique directory for staging +TMP := $(shell mktemp -d -t F2SC.XXXXXX) +### -------------------------------------------- + +# NOTE: Some source files need others, so best to copy all together: +all : $(allsrc) $(DEST) $(TMP) + cp -i $(allsrc) $(TMP) || echo "Cannot copy temp source to $(TMP)" + (cd $(TMP); for i in $(dspsrc); do $(F2SC) $$i; done) + mv $(TMP)/*.sc $(TMP)/*.$(EXT) $(DEST) + rm -rf $(TMP) + +$(DEST): + mkdir -p $(DEST) + +$(TMP): + mkdir -p $(TMP)