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