File: Makefile

package info (click to toggle)
faust 2.79.3%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 397,496 kB
  • sloc: cpp: 278,433; ansic: 116,164; javascript: 18,529; vhdl: 14,052; sh: 13,884; java: 5,900; objc: 3,852; python: 3,222; makefile: 2,655; cs: 1,672; lisp: 1,146; ruby: 954; yacc: 586; xml: 471; lex: 247; awk: 110; tcl: 26
file content (44 lines) | stat: -rw-r--r-- 1,518 bytes parent folder | download | duplicates (2)
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
LIB := $(shell faust --libdir)
LIB_OPT := /opt/local/lib
INC := $(shell faust --includedir)

DESTDIR ?=
PREFIX ?= /usr/local

LLVM := `llvm-config --link-static --ldflags --libs all --system-libs`

prefix := $(DESTDIR)$(PREFIX)

all: interp-test interp-test-c interp-machine-test

interp-test: interp-test.cpp $(LIB)/libfaust.a
	$(CXX) -std=c++11 -O3 interp-test.cpp -I $(INC) -L$(LIB) -L$(LIB_OPT) $(LIB)/libfaust.a $(LLVM) -o interp-test

# To test the Interp/MIR backend with static libfaust
interp-test1: interp-test.cpp $(LIB)/libfaust.a
	$(CXX) -std=c++11 -O3 interp-test.cpp -I $(INC) -L$(LIB_OPT) $(LIB)/libfaust.a $(LIB)/libmir.a -o interp-test1

# To test the Interp/MIR backend with dynamic libfaust
interp-test2: interp-test.cpp
	$(CXX) -std=c++11 -O3 interp-test.cpp -I $(INC) -L$(LIB) -lfaust -o interp-test2

interp-test-c: interp-test.c $(LIB)/libfaust.a
	$(CXX) -O3 interp-test.c -I $(INC) -L$(LIB) -L$(LIB_OPT) $(LIB)/libfaust.a $(LLVM) -o interp-test-c

interp-machine-test: interp-machine-test.cpp $(LIB)/libfaustmachine.a foo.fbc
	$(CXX) -std=c++11 -O3 interp-machine-test.cpp -I $(INC) -L$(LIB_OPT) $(LIB)/libfaustmachine.a -o interp-machine-test

foo.fbc:
	faust -lang interp foo.dsp -o foo.fbc
	
install: 
	([ -e interp-test ]) && cp interp-test $(prefix)/bin
	([ -e interp-machine-test ]) && cp interp-machine-test $(prefix)/bin

test: interp-test interp-machine-test
	./interp-test foo.dsp
	./interp-machine-test foo.fbc

clean:
	rm -f interp-test interp-test-c interp-machine-test foo.fbc