gitignore update.
[Faustine.git] / interpretor / preprocessor / faust-0.9.47mr3 / examples / faust-stk / Makefile
1 # Directory containing Faust .lib and .cpp architecture files:
2 ck1 := /opt/local/lib/faust/music.lib
3 ck2 := /usr/local/lib/faust/music.lib
4 ck3 := $(FAUST_LIB_PATH)/faust/music.lib
5 LIB := $(if $(wildcard $(ck1)),/opt/local/lib,"")
6 LIB := $(if $(wildcard $(ck2)),/usr/local/lib,$(LIB))
7 LIB := $(if $(wildcard $(ck3)),$(FAUST_LIB_PATH),$(LIB))
8
9 ifeq ($(OSC),1)
10 OSCCTRL := "-DOSCCTRL -I$(LIB)/faust/osclib"
11 QTDEFS := "DEFINES += OSCCTRL"
12 OSCLIB := -L$(LIB)/faust/osclib -lOSCFaust -loscpack
13 endif
14
15 MYICCFLAGS := '-O3 -xT -ftz -fno-alias -fp-model fast=2 $(OSCCTRL)'
16
17 ifeq ($(system), Darwin)
18 MYGCCFLAGS := '-O3 -march=native -mfpmath=sse -msse -msse2 -msse3 -ffast-math $(OSCCTRL)'
19 else
20 MYGCCFLAGS := '-O3 -mfpmath=sse -msse -msse2 -msse3 -ffast-math $(OSCCTRL)'
21 endif
22
23 VSIZE := 256
24
25 SC_SOURCE_DIR = ../../supercollider
26
27 ifdef POLY
28 PDPOLY=$(POLY)
29 else
30 PDPOLY=2
31 endif
32
33 ifdef RADIO
34 PDRADIO=-r $(RADIO)
35 endif
36
37 MYF2PDFLAGS='-s -n $(PDPOLY) $(PDRADIO)'
38
39 all puredata:
40 install -d puredatadir
41 $(MAKE) DEST='puredatadir/' ARCH='puredata.cpp' LIB='-L$(LIB)' F2PDFLAGS=$(MYF2PDFLAGS) CXXFLAGS=$(MYGCCFLAGS) -f Makefile.pdcompile
42
43 pdpoly2 :
44 install -d puredatadir
45 $(MAKE) DEST='puredatadir/' ARCH='puredata.cpp' LIB='-L$(LIB)' F2PDFLAGS='-n 2 -s' -f Makefile.pdcompile
46
47 pdpoly4 :
48 install -d puredatadir
49 $(MAKE) DEST='puredatadir/' ARCH='puredata.cpp' LIB='-L$(LIB)' F2PDFLAGS='-n 4 -s' -f Makefile.pdcompile
50
51 pdpoly6 :
52 install -d puredatadir
53 $(MAKE) DEST='puredatadir/' ARCH='puredata.cpp' LIB='-L$(LIB)' F2PDFLAGS='-n 6 -s' -f Makefile.pdcompile
54
55 pdpoly8 :
56 install -d puredatadir
57 $(MAKE) DEST='puredatadir/' ARCH='puredata.cpp' LIB='-L$(LIB)' F2PDFLAGS='-n 8 -s' -f Makefile.pdcompile
58
59 test: ijackgtk ijackvec ijackomp gjackgtk gjackvec gjackomp
60
61 ijackgtk :
62 install -d ijackgtkdir
63 $(MAKE) DEST='ijackgtkdir/' ARCH='jack-gtk.cpp' LIB='-L$(LIB) `pkg-config --cflags --libs jack gtk+-2.0` -I/usr/local/include' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
64
65 ijackvec :
66 install -d ijackvecdir
67 $(MAKE) DEST='ijackvecdir/' ARCH='jack-gtk.cpp' VEC='-vec -lv 1 -vs $(VSIZE)' LIB='-L$(LIB) `pkg-config --cflags --libs jack gtk+-2.0` -I/usr/local/include' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
68
69 ijackomp :
70 install -d ijackompdir
71 $(MAKE) DEST='ijackompdir/' ARCH='jack-gtk.cpp' VEC='-vs $(VSIZE) -omp' LIB='-L$(LIB) `pkg-config --cflags --libs jack gtk+-2.0` -I/usr/local/include' CXX='icc' CXXFLAGS='-openmp '$(MYICCFLAGS) -f Makefile.compile
72
73 ijacksch :
74 install -d ijackschdir
75 $(MAKE) DEST='ijackschdir/' ARCH='jack-gtk.cpp' VEC='-sch -vs $(VSIZE)' LIB='-L$(LIB) `pkg-config --cflags --libs jack gtk+-2.0` -I/usr/local/include' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
76
77 gjackgtk :
78 install -d gjackgtkdir
79 $(MAKE) DEST='gjackgtkdir/' ARCH='jack-gtk.cpp' LIB='-L$(LIB) `pkg-config --cflags --libs jack gtk+-2.0` -I/usr/local/include' CXX='g++' CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
80
81 gjackvec :
82 install -d gjackvecdir
83 $(MAKE) DEST='gjackvecdir/' ARCH='jack-gtk.cpp' VEC='-vec -lv 1 -vs $(VSIZE)' LIB='-L$(LIB) `pkg-config --cflags --libs jack gtk+-2.0` -I/usr/local/include' CXX='g++' CXXFLAGS=$(MYGCCFLAGS) -f Makefile.compile
84
85 gjackomp :
86 install -d gjackompdir
87 $(MAKE) DEST='gjackompdir/' ARCH='jack-gtk.cpp' VEC='-vec -vs $(VSIZE) -omp' LIB='-L$(LIB) `pkg-config --cflags --libs jack gtk+-2.0` -I/usr/local/include' CXX='g++' CXXFLAGS='-fopenmp '$(MYGCCFLAGS) -f Makefile.compile
88
89 svg:
90 $(MAKE) -f Makefile.svgcompile
91
92 alsagtk :
93 install -d alsagtkdir
94 $(MAKE) DEST='alsagtkdir/' ARCH='alsa-gtk.cpp' LIB='-I$(LIB)/faust/ -lpthread -lasound `pkg-config --cflags --libs gtk+-2.0` $(OSCLIB)' CXXFLAGS=$(OSCCTRL) -f Makefile.compile
95
96 ialsagtk :
97 install -d ialsagtkdir
98 $(MAKE) DEST='ialsagtkdir/' ARCH='alsa-gtk.cpp' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
99
100 ialsavec :
101 install -d ialsavecdir
102 $(MAKE) DEST='ialsavecdir/' ARCH='alsa-gtk.cpp' VEC='-vec -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
103
104 ialsaomp :
105 install -d ialsaompdir
106 $(MAKE) DEST='ialsaompdir/' ARCH='alsa-gtk.cpp' VEC='-omp -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS='-openmp '$(MYICCFLAGS) -f Makefile.compile
107
108 ialsasch :
109 install -d ialsaschdir
110 $(MAKE) DEST='ialsaschdir/' ARCH='alsa-gtk.cpp' VEC='-sch -vs $(VSIZE)' LIB='-lpthread -lasound `pkg-config --cflags --libs gtk+-2.0`' CXX='icc' CXXFLAGS=$(MYICCFLAGS) -f Makefile.compile
111
112 jackgtk :
113 install -d jackgtkdir
114 $(MAKE) DEST='jackgtkdir/' ARCH='jack-gtk.cpp' LIB='-I$(LIB)/faust/ `pkg-config --cflags --libs jack gtk+-2.0` $(OSCLIB)' CXXFLAGS=$(OSCCTRL) -f Makefile.compile
115
116 msjackgtk :
117 install -d msjackgtkdir
118 $(MAKE) DEST='msjackgtkdir/' ARCH='ms-jack-gtk.cpp' LIB='-lMidiShare `pkg-config --cflags --libs jack gtk+-2.0`' -f Makefile.compile
119
120 jackqt :
121 install -d jackqtdir
122 $(MAKE) DEST='jackqtdir/' ARCH='jack-qt.cpp' LIB='-ljack $(OSCLIB)' DEFS=$(QTDEFS) CXXFLAGS=$(MYGCCFLAGS) -f Makefile.qtcompile
123
124 jackqtsch :
125 install -d jackqtschdir
126 $(MAKE) DEST='jackqtschdir/' ARCH='jack-qt.cpp' VEC='-sch -vs $(VSIZE)' LIB='-ljack' CXXFLAGS=$(MYGCCFLAGS) -f Makefile.qtcompile
127
128 netjackqt :
129 install -d netjackqtdir
130 $(MAKE) DEST='netjackqtdir/' ARCH='netjack-qt.cpp' LIB='-ljacknet $(OSCLIB)' DEFS=$(QTDEFS) CXXFLAGS=$(MYGCCFLAGS) -f Makefile.qtcompile
131
132 jackwt :
133 install -d jackwtdir
134 $(MAKE) DEST='jackwtdir/' ARCH='jack-wt.cpp' LIB='-I$(LIB)/faust/ -ljack -lwt -lwthttp -lboost_signals-mt $(OSCLIB)' DEFS=$(QTDEFS) -f Makefile.compile
135
136 paqt :
137 install -d paqtdir
138 $(MAKE) DEST='paqtdir/' ARCH='pa-qt.cpp' LIB='-lportaudio $(OSCLIB)' DEFS=$(QTDEFS) -f Makefile.qtcompile
139
140 caqt :
141 install -d caqtdir
142 $(MAKE) DEST='caqtdir/' ARCH='ca-qt.cpp' LIB='-framework CoreAudio -framework AudioUnit -framework CoreServices $(OSCLIB)' CXXFLAGS=$(MYGCCFLAGS) DEFS=$(QTDEFS) -f Makefile.qtcompile
143
144 oscioqt : OSCLIB = -L$(LIB)/faust/osclib -lOSCFaust -loscpack
145 oscioqt :
146 install -d oscioqtdir
147 $(MAKE) DEST='oscioqtdir/' ARCH='oscio-qt.cpp' LIB='-ljack $(OSCLIB)' DEFS=$(QTDEFS) -f Makefile.qtcompile
148
149 osciogtk : OSCLIB = -L$(LIB)/faust/osclib -lOSCFaust -loscpack
150 osciogtk :
151 install -d osciogtkdir
152 $(MAKE) DEST='osciogtkdir/' ARCH='oscio-gtk.cpp' LIB='-I$(LIB)/faust/ `pkg-config --cflags --libs jack gtk+-2.0` $(OSCLIB)' CXXFLAGS=-I$(LIB)/faust/osclib -f Makefile.compile
153
154 alsaqt :
155 install -d alsaqtdir
156 $(MAKE) DEST='alsaqtdir/' ARCH='alsa-qt.cpp' LIB='-lpthread -lasound $(OSCLIB)' DEFS=$(QTDEFS) -f Makefile.qtcompile
157
158 ladspa :
159 install -d ladspadir
160 $(MAKE) DEST='ladspadir/' ARCH='ladspa.cpp' LIB='-I$(LIB)/faust/' EXT='.so' CXXFLAGS=$(MYGCCFLAGS) -f Makefile.ladspacompile
161
162 ladspasch :
163 install -d ladspaschdir
164 $(MAKE) DEST='ladspaschdir/' ARCH='ladspa.cpp' VEC='-sch -vs $(VSIZE)' LIB='-I$(LIB)/faust/' EXT='.so' CXXFLAGS=$(MYGCCFLAGS) -f Makefile.ladspacompile
165
166 dssi :
167 install -d dssidir
168 $(MAKE) DEST='dssidir/' ARCH='dssi.cpp' LIB='-I$(LIB)/faust/' EXT='.so' CXXFLAGS=$(MYGCCFLAGS) -f Makefile.dssicompile
169
170 csound :
171 install -d csounddir
172 $(MAKE) DEST='csounddir/' -f Makefile.csound
173
174 csounddouble :
175 install -d csounddoubledir
176 $(MAKE) DEST='csounddoubledir/' VEC='-double' -f Makefile.csound
177
178 jackwx :
179 install -d jackwxdir
180 $(MAKE) DEST='jackwxdir/' ARCH='jack-wx.cpp' LIB='`pkg-config jack --cflags --libs` `wx-config --cflags --libs`' -f Makefile.compile
181
182 ossgtk :
183 install -d ossgtkdir
184 $(MAKE) DEST='ossgtkdir/' ARCH='oss-gtk.cpp' LIB='-lpthread `pkg-config gtk+-2.0 --cflags --libs`' -f Makefile.compile
185
186 osswx :
187 install -d osswxdir
188 $(MAKE) DEST='osswxdir/' ARCH='oss-wx.cpp' LIB='-lpthread `wx-config --cflags --libs`' -f Makefile.compile
189
190 pagtk :
191 install -d pagtkdir
192 $(MAKE) DEST='pagtkdir/' ARCH='pa-gtk.cpp' LIB='-I$(LIB)/faust/ -lpthread -lportaudio `pkg-config gtk+-2.0 --cflags --libs` $(OSCLIB)' CXXFLAGS=$(OSCCTRL) -f Makefile.compile
193
194 pawx :
195 install -d pawxdir
196 $(MAKE) DEST='pawxdir/' ARCH='pa-wx.cpp' LIB='-lpthread -lportaudio `wx-config --cflags --libs`' -f Makefile.compile
197
198 module :
199 install -d moduledir
200 $(MAKE) DEST='moduledir/' ARCH='module.cpp' LIB='-fPIC -shared' EXT='.so' -f Makefile.compile
201
202 bundle :
203 install -d bundledir
204 $(MAKE) DEST='bundledir/' ARCH='module.cpp' LIB='-I$(LIB)/faust/ -fPIC -bundle' EXT='.so' -f Makefile.compile
205
206 maxmsp msp :
207 install -d mspdir
208 $(MAKE) DEST='mspdir/' ARCH='max-msp.cpp' LIB='' -f Makefile.mspcompile
209
210 w32vstdir :
211 mkdir w32vstdir
212
213 w32vst : w32vstdir
214 $(MAKE) DEST='w32vstdir/' ARCH='vst2p4.cpp' LIB='' -f Makefile.w32vstcompile
215
216 vst :
217 install -d vstdir
218 $(MAKE) DEST='vstdir/' ARCH='vst.cpp' LIB='' -f Makefile.vstcompile
219
220 iphone :
221 install -d iphonedir
222 $(MAKE) DEST='iphonedir/' ARCH='iphone-cocoa.cpp' LIB='' -f Makefile.iphonecompile
223
224 iphonenet :
225 install -d iphonenetdir
226 $(MAKE) DEST='iphonenetdir/' ARCH='iphone-cocoa-net.cpp' LIB='' -f Makefile.iphonenetcompile
227
228 bench :
229 install -d benchdir
230 $(MAKE) DEST='benchdir/' ARCH='bench.cpp' LIB='' -f Makefile.compile
231
232 ibench :
233 install -d ibenchdir
234 $(MAKE) DEST='ibenchdir/' ARCH='parbench.cpp' LIB='' CXX='icc' CXXFLAGS='-O3 -xT -ftz -fno-alias -fp-model fast=2' -f Makefile.compile
235
236 ivecbench :
237 install -d ivecbenchdir
238 $(MAKE) DEST='ivecbenchdir/' ARCH='parbench.cpp' VEC='-vec -vs $(VSIZE)' LIB='' CXX='icc' CXXFLAGS='-O3 -xT -ftz -fno-alias -fp-model fast=2' -f Makefile.compile
239
240 ivecjack :
241 install -d ivecjackdir
242 $(MAKE) DEST='ivecjackdir/' ARCH='jack-gtk.cpp' VEC='-vec -vs $(VSIZE)' LIB='`pkg-config --cflags --libs jack gtk+-2.0`' CXX='icc' CXXFLAGS='-O3 -xT -ftz -fno-alias -fp-model fast=2' -f Makefile.compile
243
244 iparbench :
245 install -d iparbenchdir
246 $(MAKE) DEST='iparbenchdir/' ARCH='parbench.cpp' VEC='-vec -vs $(VSIZE) -omp' LIB='' CXX='icc' CXXFLAGS='-O3 -openmp -xT -ftz -fno-alias -fp-model fast=2' -f Makefile.compile
247
248 gparbench :
249 install -d gparbenchdir
250 $(MAKE) DEST='gparbenchdir/' ARCH='parbench.cpp' VEC='-vec -vs $(VSIZE) -omp' LIB='' CXX='g++' CXXFLAGS='-O3 -march=native -mfpmath=sse -msse -msse2 -msse3 -ffast-math' -f Makefile.compile
251
252 sndfile :
253 install -d sndfiledir
254 $(MAKE) DEST='sndfiledir/' ARCH='sndfile.cpp' LIB='-I$(LIB)/faust/ -lsndfile' -f Makefile.compile
255 CXXFLAGS=$(OSCCTRL)
256 plot :
257 install -d plotdir
258 $(MAKE) DEST='plotdir/' ARCH='plot.cpp' LIB='' -f Makefile.compile
259
260 matlabplot :
261 install -d matlabplotdir
262 $(MAKE) DEST='matlabplotdir/' ARCH='matlabplot.cpp' LIB='' -f Makefile.compile
263
264 q :
265 install -d qdir
266 $(MAKE) DEST='qdir/' ARCH='q.cpp' LIB='' -f Makefile.qcompile
267
268 supercollider sc:
269 install -d supercolliderdir
270 $(MAKE) DEST='supercolliderdir/' -f Makefile.sccompile
271
272 jackconsole :
273 install -d jackconsoledir
274 $(MAKE) DEST='jackconsoledir/' ARCH='jack-console.cpp' VEC='-vec -vs $(VSIZE)' LIB='-I$(LIB)/faust/ `pkg-config --cflags --libs jack ` $(OSCLIB)' CXXFLAGS=$(OSCCTRL) -f Makefile.compile
275
276 mathdoc :
277 $(MAKE) -f Makefile.mathdoc
278
279 help:
280 @echo "make alsagtk [OSC=1] : compile examples as ALSA applications with a GTK Graphical User Interface"
281 @echo "make alsaqt [OSC=1] : compile examples as ALSA applications with a QT4 Graphical User Interface"
282 @echo "make sndfile : compile examples as sound file processors with a Command line User Interface"
283 @echo "make jackconsole [OSC=1] : compile examples as JACK applications with a Command line User Interface"
284 @echo "make jackgtk [OSC=1] : compile examples as JACK applications with a GTK Graphical User Interface"
285 @echo "make jackqt [OSC=1] : compile examples as JACK applications with a QT4 Graphical User Interface"
286 @echo "make jackwx : compile examples as JACK applications with a wxWindows Graphical User Interface"
287 @echo "make ossgtk : compile examples as OSS applications with a GTK Graphical User Interface"
288 @echo "make osswx : compile examples as OSS applications with a wxWindows Graphical User Interface"
289 @echo "make pagtk [OSC=1] : compile examples as PortAudio applications with a GTK Graphical User Interface"
290 @echo "make paqt [OSC=1] : compile examples as PortAudio applications with a QT4 Graphical User Interface"
291 @echo "make pawx : compile examples as PortAudio applications with a wxWindows Graphical User Interface"
292 @echo "make caqt [OSC=1] : compile examples as CoreAudio applications with a QT4 Graphical User Interface"
293 @echo "make oscioqt : compile examples as OSC driven applications with a QT4 Graphical User Interface"
294 @echo "--------------------------------------------"
295 @echo "make ladspa : compile examples as LADSPA plugins"
296 @echo "make dssi : compile examples as DSSI plugins"
297 @echo "make csound : compile examples as CSOUND opcodes"
298 @echo "make csounddouble : compile examples as double precision CSOUND opcodes"
299 @echo "make maxmsp : compile examples as Max/MSP externals"
300 @echo "make vst : compile examples as native VST plugins"
301 @echo "make w32vst : crosscompile examples as windows VST plugins"
302 @echo "make iphone : compile examples for Apple iPhone/iPod"
303 @echo "make supercollider : compile examples as Supercollider plugins"
304 @echo "make puredata : compile examples as Puredata externals"
305 @echo "make q : compile examples as Q plugins"
306 @echo "--------------------------------------------"
307 @echo "make svg : generate the examples block-diagrams in SVG format "
308 @echo "make mathdoc : generate the examples math documentation in TEX and PDF formats "
309 @echo "make bench : compile examples as command line benchmarks "
310 @echo "make plot : compile examples as command line programs that print samples for plotting with, e.g., gnuplot"
311 @echo "make matlabplot : compile examples as command line programs that print samples in matlab input format"
312 @echo "--------------------------------------------"
313 @echo "make clean : remove all object files"
314
315 clean :
316 rm -rf *dir
317 rm -rf *-svg
318 $(MAKE) -f Makefile.mathdoc clean