Debian Codegraph @

tools/faust2pd/examples/seqdemo/Makefile

raw symbols SCIP
1 DLL = .pd_linux
2 shared = -shared
3
4 # Try to guess the host system type and figure out platform specifics.
5 host = $(shell ../../config.guess)
6 ifneq "$(findstring -mingw,$(host))" ""
7 # Windows
8 DLL = .dll
9 PDLIB = -Wl,--enable-auto-import -lpd
10 endif
11 ifneq "$(findstring -darwin,$(host))" ""
12 # OSX
13 DLL = .pd_darwin
14 shared = -dynamiclib -Wl,-undefined -Wl,dynamic_lookup
15 endif
16 ifneq "$(findstring x86_64-,$(host))" ""
17 # 64 bit, needs -fPIC flag
18 EXTRA_CFLAGS += -fPIC
19 endif
20 ifneq "$(findstring x86,$(host))" ""
21 # architecture-specific options for x86 and x86_64
22 EXTRA_CFLAGS += -msse -ffast-math
23 endif
24
25 EXTRA_CFLAGS += -I ../../pd
26
27 dspsrc := $(wildcard *.dsp)
28 cppsrc := $(dspsrc:.dsp=.cpp)
29 mods := $(dspsrc:%.dsp=%~$(DLL))
30 svg := $(dspsrc:.dsp=.svg)
31 xml := $(dspsrc:.dsp=.dsp.xml)
32 pd := $(dspsrc:.dsp=.pd)
33 libs := $(wildcard *.lib)
34
35 ARCH = ../../../../architecture/puredata.cpp
36 #FAUST2PD = faust2pd
37 FAUST2PD = ../../faust2pd
38 # faust2pd options (the -s forces additional number controls for each slider)
39 # a number of other options are supported, run faust2pd -h for help
40 F2PDFLAGS = -s
41
42 all: $(mods) $(pd)
43
44 cpp: $(cppsrc)
45
46 svg: $(svg)
47
48 xml: $(xml)
49
50 %~$(DLL): %.cpp
51 $(CXX) $(shared) $(EXTRA_CFLAGS) $(CFLAGS) -Dmydsp=$(@:%~$(DLL)=%) $(LDFLAGS) $< -o $@ $(PDLIB)
52
53 %.cpp: %.dsp
54 faust $(VEC) -a $(ARCH) $< -o $@
55
56 %.svg: %.dsp
57 faust -svg $< -o /dev/null >/dev/null
58
59 %.dsp.xml: %.dsp
60 faust -xml $< -o /dev/null
61
62 # synths
63
64 NVOICES = 2
65
66 organ.pd: organ.dsp.xml
67 $(FAUST2PD) $(F2PDFLAGS) -n $(NVOICES) $<
68
69 subtractive.pd: subtractive.dsp.xml
70 $(FAUST2PD) $(F2PDFLAGS) -n $(NVOICES) $<
71
72 karplusplus.pd: karplusplus.dsp.xml
73 $(FAUST2PD) $(F2PDFLAGS) -n $(NVOICES) $<
74
75 # other dsps (effect units)
76
77 %.pd: %.dsp.xml
78 $(FAUST2PD) $(F2PDFLAGS) $<
79
80 clean:
81 rm -f $(mods) *~ *.a *.o
82
83 distclean:
84 rm -f $(mods) $(cppsrc) *~ *.a *.o
85
86 clean-cpp:
87 rm -f $(cppsrc)
88
89 clean-xml:
90 rm -f $(xml)
91
92 clean-pd:
93 rm -f $(pd)
94
95 clean-svg:
96 rm -rf *-svg
97
98 realclean:
99 rm -f $(mods) $(cppsrc) $(xml) $(pd) *~ *.a *.o
100 rm -rf *-svg