| 1 |
LIB := $(shell faust --libdir) |
| 2 |
LIB_OPT := /opt/local/lib |
| 3 |
INC := $(shell faust --includedir) |
| 4 |
|
| 5 |
DESTDIR ?= |
| 6 |
PREFIX ?= /usr/local |
| 7 |
|
| 8 |
LLVM := `llvm-config --link-static --ldflags --libs all --system-libs` |
| 9 |
|
| 10 |
prefix := $(DESTDIR)$(PREFIX) |
| 11 |
|
| 12 |
all: interp-test interp-test-c interp-machine-test |
| 13 |
|
| 14 |
interp-test: interp-test.cpp $(LIB)/libfaust.a |
| 15 |
$(CXX) -std=c++11 -O3 interp-test.cpp -I $(INC) -L$(LIB) -L$(LIB_OPT) $(LIB)/libfaust.a $(LLVM) -o interp-test |
| 16 |
|
| 17 |
|
| 18 |
interp-test1: interp-test.cpp $(LIB)/libfaust.a |
| 19 |
$(CXX) -std=c++11 -O3 interp-test.cpp -I $(INC) -L$(LIB_OPT) $(LIB)/libfaust.a $(LIB)/libmir.a -o interp-test1 |
| 20 |
|
| 21 |
|
| 22 |
interp-test2: interp-test.cpp |
| 23 |
$(CXX) -std=c++11 -O3 interp-test.cpp -I $(INC) -L$(LIB) -lfaust -o interp-test2 |
| 24 |
|
| 25 |
interp-test-c: interp-test.c $(LIB)/libfaust.a |
| 26 |
$(CXX) -O3 interp-test.c -I $(INC) -L$(LIB) -L$(LIB_OPT) $(LIB)/libfaust.a $(LLVM) -o interp-test-c |
| 27 |
|
| 28 |
interp-machine-test: interp-machine-test.cpp $(LIB)/libfaustmachine.a foo.fbc |
| 29 |
$(CXX) -std=c++11 -O3 interp-machine-test.cpp -I $(INC) -L$(LIB_OPT) $(LIB)/libfaustmachine.a -o interp-machine-test |
| 30 |
|
| 31 |
foo.fbc: |
| 32 |
faust -lang interp foo.dsp -o foo.fbc |
| 33 |
|
| 34 |
install: |
| 35 |
([ -e interp-test ]) && cp interp-test $(prefix)/bin |
| 36 |
([ -e interp-machine-test ]) && cp interp-machine-test $(prefix)/bin |
| 37 |
|
| 38 |
test: interp-test interp-machine-test |
| 39 |
./interp-test foo.dsp |
| 40 |
./interp-machine-test foo.fbc |
| 41 |
|
| 42 |
clean: |
| 43 |
rm -f interp-test interp-test-c interp-machine-test foo.fbc |
| 44 |
|