diff options
Diffstat (limited to 'Makefile.sccompile')
-rw-r--r-- | Makefile.sccompile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Makefile.sccompile b/Makefile.sccompile new file mode 100644 index 0000000..9357afb --- /dev/null +++ b/Makefile.sccompile @@ -0,0 +1,30 @@ +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 $< |