1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
# Makefile to produce supercollider plugins with Faust
# 'foo.dsp' -> 'foo.so' and 'foo.sc'
#
dspsrc := $(wildcard *.dsp)
scfiles := $(addprefix $(DEST), $(dspsrc:.dsp=.sc))
sofiles := $(addprefix $(DEST), $(dspsrc:.dsp=.so))
CXXFLAGS := `pkg-config --cflags libscsynth` $(CXXFLAGS)
LIB := -shared
###--------------------------------------------
### Will use faust2sc to create the class file
### only if it is installed
helper:=$(shell whereis faust2sc)
ifeq ($(helper),faust2sc:)
todo:=$(sofiles)
else
todo:=$(sofiles) $(scfiles)
endif
###--------------------------------------------
all : $(todo)
$(DEST)%.cpp: %.dsp
faust -a $(ARCH) $< -o $@
$(DEST)%.so: $(DEST)%.cpp
$(CXX) $(CXXFLAGS) $(OPTFLAGS) $(LIB) $< -o $@
$(DEST)%.sc : %.dsp.xml
faust2sc --prefix=Faust $< --output=$@
%.dsp.xml: %.dsp
faust --xml -o /dev/null $<
|