BUILD_DIR ?= ./build CXXFLAGS := $(CXXFLAGS) LFLAGS := -fPIC -shared $(LFLAGS) scbuilddir := $(BUILD_DIR)/Supercollider extdir := $(scbuilddir)/Extensions dspsrc := $(wildcard *.dsp) scfiles := $(addprefix $(extdir)/, $(dspsrc:.dsp=.sc)) sofiles := $(addprefix $(extdir)/, $(dspsrc:.dsp=.so)) archfile := /usr/share/faust/supercollider.cpp scincludes := -I/usr/include/SuperCollider/plugin_interface -I/usr/include/SuperCollider/common all: $(sofiles) $(scfiles) %.cpp: %.dsp faust -a $(archfile) $< -o $@ $(extdir)/%.so: %.cpp mkdir -p $(extdir) $(CXX) $(CXXFLAGS) $(scincludes) $(OPTFLAGS) $(LFLAGS) $< -o $@ $(extdir)/%.sc: %.dsp.xml mkdir -p $(extdir) faust2sc --prefix="" $< --output=$@ %.dsp.xml: %.dsp faust --xml -o /dev/null $<