Add octave scripts for examples into track list.
[Faustine.git] / interpretor / preprocessor / faust-0.9.47mr3 / examples / Makefile.sccompile
1 # Makefile to produce supercollider plugins with Faust:
2 # 'foo.dsp' -> 'foo.so|scx' and 'foo.sc'
3 # These two files (scsynth plugin and sclang extension), can be copied to
4 # $HOME/share/SuperCollider/Extensions (Linux) or
5 # $HOME/Library/Application Support/SuperCollider/Extensions (Mac OS X)
6 #
7 # The shell script <faust>/tools/faust2appls/faust2supercollider
8 # needs to be installed somewhere in the user's search path.
9
10 system := $(shell uname -s)
11 ifeq ($(system), Darwin)
12 EXT := scx
13 else
14 EXT := so
15 endif
16
17 dspsrc := $(wildcard *.dsp)
18 libsrc := $(wildcard *.lib)
19 incsrc := $(wildcard *.h)
20 allsrc := $(dspsrc) $(libsrc) $(incsrc)
21
22 ifeq ($(DEST),)
23 DEST := ./supercolliderdir
24 endif
25
26 F2SC = faust2supercollider -sd
27
28 ### allocate a unique directory for staging
29 TMP := $(shell mktemp -d -t F2SC.XXXXXX)
30 ### --------------------------------------------
31
32 # NOTE: Some source files need others, so best to copy all together:
33 all : $(allsrc) $(DEST) $(TMP)
34 cp -i $(allsrc) $(TMP) || echo "Cannot copy temp source to $(TMP)"
35 (cd $(TMP); for i in $(dspsrc); do $(F2SC) $$i; done)
36 mv $(TMP)/*.sc $(TMP)/*.$(EXT) $(DEST)
37 rm -rf $(TMP)
38
39 $(DEST):
40 mkdir -p $(DEST)
41
42 $(TMP):
43 mkdir -p $(TMP)