-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
65 lines (44 loc) · 1.58 KB
/
Makefile
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# If RACK_DIR is not defined when calling the Makefile, default to two directories above
RACK_DIR ?= ../Rack-SDK
# FLAGS will be passed to both the C and C++ compiler
FLAGS +=
CFLAGS +=
CXXFLAGS +=
# Careful about linking to shared libraries, since you can't assume much about the user's environment and library search path.
# Static libraries are fine, but they should be added to this plugin's build system.
LDFLAGS +=
# Add .cpp files to the build
SOURCES += $(wildcard src/*.cpp)
# Add files to the ZIP package when running `make dist`
# The compiled plugin and "plugin.json" are automatically added.
DISTRIBUTABLES += res
DISTRIBUTABLES += $(wildcard LICENSE*)
# Include the Rack plugin Makefile framework
include $(RACK_DIR)/plugin.mk
all: faust $(TARGET)
@RACK_DIR=$(RACK_DIR) $(MAKE) -f $(RACK_DIR)/plugin.mk $@
clean: faust-clean
@RACK_DIR=$(RACK_DIR) $(MAKE) -f $(RACK_DIR)/plugin.mk $@
faust: src/faust_generated.cpp src/faust/main-svg/process.svg
faust-clean:
@echo
@echo "Cleaning files generated by Faust..."
rm -f src/faust_generated.cpp
rm -rf src/faust/main-svg/*
@echo "Done."
@echo
run: install
Rack
src/faust/main-svg/process.svg:
@echo
@echo "Generating Faust diagrams..."
faust2svg --simple-names --simplify-diagrams --fold-complexity 8 src/faust/main.dsp
@echo "Done."
@echo
src/faust_generated.cpp: $(wildcard src/faust/*.dsp) src/faust/architecture_rack.cpp
@echo
@echo "Compiling Faust files..."
faust -a src/faust/architecture_rack.cpp -o src/faust_generated.cpp -os -cn FaustDSP src/faust/main.dsp
@echo "Done."
.PHONY: clean dist
.DEFAULT_GOAL := all