diff --git a/Makefile b/Makefile index fd5e209..2d29e8b 100644 --- a/Makefile +++ b/Makefile @@ -253,19 +253,24 @@ endif # Faust: compile the libfaust dynamic library with 'make world && sudo make install' >>>>>>> Document Faust setup in Makefile. ifeq ($(FAUST), 1) +libfaust := dep/faust/build/lib/libfaust.a SOURCES += src/FaustEngine.cpp -FLAGS += -I/use/local/include +OBJECTS += $(libfaust) +DEPS += $(libfaust) +LDFLAGS += dep/faust/build/lib/libfaust.a -# Using LLVM -LDFLAGS += -L/usr/local/lib -lfaust + +# Test using LLVM +#LDFLAGS += -L/usr/local/lib -lfaust # Test using MIR #LDFLAGS += -L/usr/local/lib -lfaust dep/lib/mir-gen.o dep/lib/mir.o -DEPS += $(faust) -OBJECTS += $(faust) -DISTRIBUTABLES += faust_libraries -FAUST_MAKE_FLAGS += prefix="$(DEP_PATH)" +$(libfaust): + cd dep && git clone "https://github.com/grame-cncm/faust.git" + cd dep/faust && git submodule update --init --recursive && cp -rf libraries/* ../../res/faust + cd dep/faust && make -C build cmake BACKENDS=interp.cmake TARGETS=interp.cmake && make -C build + endif include $(RACK_DIR)/plugin.mk diff --git a/faust_libraries/rack.lib b/res/faust/rack.lib similarity index 100% rename from faust_libraries/rack.lib rename to res/faust/rack.lib diff --git a/src/FaustEngine.cpp b/src/FaustEngine.cpp index 2542cc4..9f34aea 100644 --- a/src/FaustEngine.cpp +++ b/src/FaustEngine.cpp @@ -38,7 +38,7 @@ using namespace std; #define kBufferSize 64 -//#define MIR +#define MIR #ifdef MIR #include @@ -208,7 +208,7 @@ class FaustEngine : public ScriptEngine { fDSP(nullptr), fInputs(nullptr), fOutputs(nullptr), - fDSPLibraries(rack::asset::plugin(pluginInstance, "faust_libraries")) + fDSPLibraries(rack::asset::plugin(pluginInstance, "res/faust")) {} ~FaustEngine()