summaryrefslogtreecommitdiff
path: root/apps/plugins/pdbox/PDa/src/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/pdbox/PDa/src/makefile')
-rw-r--r--apps/plugins/pdbox/PDa/src/makefile354
1 files changed, 354 insertions, 0 deletions
diff --git a/apps/plugins/pdbox/PDa/src/makefile b/apps/plugins/pdbox/PDa/src/makefile
new file mode 100644
index 0000000000..6a28a95f34
--- /dev/null
+++ b/apps/plugins/pdbox/PDa/src/makefile
@@ -0,0 +1,354 @@
1PREFIX = /usr/
2EXT = pd_linux
3
4# pd specific
5
6VPATH = ../obj:./
7OBJ_DIR = ../obj
8BIN_DIR = ../bin
9
10BROOT=/usr
11X11LIB = $(BROOT)/X11R6/lib
12
13DEFINES = -DPD -DUNIX
14
15pd-gui_INCLUDES = -I$(BROOT)/include/tcl8.4 -I$(BROOT)/X11R6/include
16pd-gui_LIBS = -ltk8.4 -ltcl8.4 -lX11 -ldl
17pd-gui_LDFLAGS = -L$(X11LIB)
18pd-gui_DEFINES = $(DEFINES)
19
20pd_LIBS = -lm -lpthread -ldl
21pd_LDFLAGS = -Wl,-export-dynamic
22pd_DEFINES = $(DEFINES) -DINSTALL_PREFIX=\"$(PREFIX)\" \
23 -DFIXEDPOINT -DUSEAPI_OSS -DDL_OPEN
24
25extra_DEFINES = $(DEFINES) -DFIXEDPOINT
26extra_INCLUDES = -I../src
27extra_LDFLAGS = -shared
28
29# IPOD toolchain
30
31ifeq ($(CC), arm-elf-gcc)
32pd_LDFLAGS += -elf2flt
33pd_LIBS = -lm -lpthread
34pd_DEFINES = $(DEFINES) -DINSTALL_PREFIX=\"$(PREFIX)\" \
35 -DFIXEDPOINT -DUSEAPI_OSS -D__linux__ -Dfork=getpid
36extra_DEFINES += -D__linux__ -Dfork=getpid
37endif
38
39# BLACKFIN toolchain
40
41ifeq ($(CC), bfin-uclinux-gcc)
42pd_LIBS = -lm -lpthread
43pd_DEFINES = $(DEFINES) -DINSTALL_PREFIX=\"$(PREFIX)\" \
44 -DFIXEDPOINT -DUSEAPI_OSS -D__linux__
45extra_DEFINES += -D__linux__
46endif
47
48# the sources
49
50pd_SRC = g_canvas.c g_graph.c g_text.c g_rtext.c g_array.c g_template.c g_io.c \
51 g_scalar.c g_traversal.c g_guiconnect.c g_readwrite.c g_editor.c \
52 g_all_guis.c g_bang.c g_hdial.c g_hslider.c g_mycanvas.c g_numbox.c \
53 g_toggle.c g_vdial.c g_vslider.c g_vumeter.c \
54 m_pd.c m_class.c m_obj.c m_atom.c m_memory.c m_binbuf.c \
55 m_conf.c m_glob.c m_sched.c \
56 s_main.c s_inter.c s_file.c s_print.c \
57 s_loader.c s_path.c s_entry.c s_audio.c s_midi.c \
58 d_ugen.c d_arithmetic.c d_dac.c d_misc.c \
59 d_fft.c d_mayer_fft.c d_fftroutine.c d_global.c \
60 d_resample.c d_ctl.c d_soundfile.c \
61 x_arithmetic.c x_connective.c x_interface.c x_midi.c x_misc.c \
62 x_time.c x_acoustics.c x_net.c x_qlist.c x_gui.c \
63 s_midi_oss.c s_audio_oss.c
64
65pd_SRC += d_imayer_fft.c m_fixed.c
66
67pd_OBJ = $(pd_SRC:.c=.o)
68
69pd-gui_SRC = t_main.c t_tkcmd.c
70pd-gui_OBJ = $(pd-gui_SRC:.c=.o)
71
72extra_SRC = $(shell ls ../intern/*.c) $(shell ls ../extra/*.c)
73extra_OBJ = $(extra_SRC:.c=.o)
74extra_EXT = $(extra_SRC:.c=.pd_linux)
75
76#
77# ------------------ targets ------------------------------------
78#
79
80all: $(BIN_DIR)/pd \
81 $(BIN_DIR)/pd-gui \
82 $(BIN_DIR)/pd-watchdog \
83 $(BIN_DIR)/pdsend \
84 $(BIN_DIR)/pdreceive \
85 $(BIN_DIR)/pd.tk \
86 extra
87
88pd: $(BIN_DIR)/pd
89pd-gui: $(BIN_DIR)/pd-gui
90pd-watchdog: $(BIN_DIR)/pd-watchdog
91
92static:
93 make pd_SRC="$(pd_SRC) $(extra_SRC)" DEFINES="-DPD -DUNIX -DSTATIC" \
94 pd pd-gui pd-watchdog $(BIN_DIR)/pdsend \
95 $(BIN_DIR)/pdreceive $(BIN_DIR)/pd.tk
96
97extra: $(extra_EXT)
98
99ipod:
100 make CC=arm-elf-gcc static
101
102blackfin:
103 make CC=bfin-uclinux-gcc static
104
105$(pd_OBJ) : %.o : %.c
106 $(CC) $(CFLAGS) $(pd_DEFINES) $(pd_INCLUDES) -c -o $(OBJ_DIR)/$@ $+
107
108$(pd-gui_OBJ) : %.o : %.c
109 $(CC) $(CFLAGS) $(pd-gui_DEFINES) $(pd-gui_INCLUDES) -c -o $(OBJ_DIR)/$@ $+
110
111$(extra_OBJ) : %.o : %.c
112 $(CC) $(CFLAGS) $(extra_DEFINES) $(extra_INCLUDES) -c -o $@ $*.c
113
114$(extra_EXT) : %.$(EXT) : %.o
115 $(CC) -o $@ $(extra_LDFLAGS) $+
116
117$(BIN_DIR)/pd-watchdog: s_watchdog.c
118 $(CC) $(CFLAGS) $(DEFINES) -o $@ s_watchdog.c
119
120$(BIN_DIR)/pdsend: u_pdsend.c
121 $(CC) $(CFLAGS) $(DEFINES) -o $@ u_pdsend.c
122
123$(BIN_DIR)/pdreceive: u_pdreceive.c
124 $(CC) $(CFLAGS) $(DEFINES) -o $@ u_pdreceive.c
125
126$(BIN_DIR)/pd: $(pd_OBJ)
127 cd ../obj; $(CC) $(pd_LDFLAGS) -o $@ $(pd_OBJ) $(pd_LIBS)
128
129$(BIN_DIR)/pd-gui: $(pd-gui_OBJ)
130 cd ../obj; $(CC) -o $@ $(pd-gui_OBJ) $(pd-gui_LDFLAGS) $(pd-gui_LIBS)
131
132$(BIN_DIR)/pd.tk: u_main.tk
133 echo set pd_nt 0 > $(BIN_DIR)/pd.tk
134 grep -v "set pd_nt" < u_main.tk >> $@
135
136INSTDIR = $(DESTDIR)/$(PREFIX)
137
138install: all
139# Create the directory structure
140
141 install -d $(INSTDIR)/lib/pd/bin
142 install -d $(INSTDIR)/lib/pd/extra
143 install -d $(INSTDIR)/lib/pd/intern
144 install -d $(INSTDIR)/lib/pd/doc
145 install -d $(INSTDIR)/bin
146 install -d $(INSTDIR)/include
147
148 install $(BIN_DIR)/pd-gui $(INSTDIR)/lib/pd/bin/
149 install $(BIN_DIR)/pd-watchdog $(INSTDIR)/lib/pd/bin/
150 install -m 644 $(BIN_DIR)/pd.tk $(INSTDIR)/lib/pd/bin/
151 install -m 755 $(BIN_DIR)/pd $(INSTDIR)/bin/
152 install -m 755 $(BIN_DIR)/pdsend $(INSTDIR)/bin/pdsend
153 install -m 755 $(BIN_DIR)/pdreceive $(INSTDIR)/bin/pdreceive
154 cp -r ../doc/7.stuff $(INSTDIR)/lib/pd/doc
155 cp -r ../doc/5.reference $(INSTDIR)/lib/pd/doc
156 install -m 644 m_pd.h $(INSTDIR)/include/m_pd.h
157
158# Install the externals if possible
159 cp ../extra/*.pd_linux $(INSTDIR)/lib/pd/extra
160 cp ../intern/*.pd_linux $(INSTDIR)/lib/pd/intern
161
162# Install the ICON and desktop file
163 install -d $(INSTDIR)/share/pixmaps
164 install -d $(INSTDIR)/share/applications
165 cp ../ipkg/pd-icon.png $(INSTDIR)/share/pixmaps
166 cp ../ipkg/pd.desktop $(INSTDIR)/share/applications/
167
168
169
170clean:
171 -rm -f `find ../extra/ -name "*.pd_*"`
172 -rm -f tags
173 -rm -f ../obj/* $(BIN_DIR)/* ../extra/*.{o,$(EXT)} ../intern/*.{o,$(EXT)}
174 -rm -f *~
175 -rm -f $(BIN_DIR)/pdsend $(BIN_DIR)/pdreceive
176
177
178PREFIX = /usr/
179EXT = pd_linux
180
181# pd specific
182
183VPATH = ../obj:./
184OBJ_DIR = ../obj
185BIN_DIR = ../bin
186
187BROOT=/usr
188X11LIB = $(BROOT)/X11R6/lib
189
190DEFINES = -DPD -DUNIX
191
192pd-gui_INCLUDES = -I$(BROOT)/include/tcl8.4 -I$(BROOT)/X11R6/include
193pd-gui_LIBS = -ltk8.4 -ltcl8.4 -lX11 -ldl
194pd-gui_LDFLAGS = -L$(X11LIB)
195pd-gui_DEFINES = $(DEFINES)
196
197pd_LIBS = -lm -lpthread -ldl
198pd_LDFLAGS = -Wl,-export-dynamic
199pd_DEFINES = $(DEFINES) -DINSTALL_PREFIX=\"$(PREFIX)\" \
200 -DFIXEDPOINT -DUSEAPI_OSS -DDL_OPEN
201
202extra_DEFINES = $(DEFINES) -DFIXEDPOINT
203extra_INCLUDES = -I../src
204extra_LDFLAGS = -shared
205
206# IPOD toolchain
207
208ifeq ($(CC), arm-elf-gcc)
209pd_LDFLAGS += -elf2flt
210pd_LIBS = -lm -lpthread
211pd_DEFINES = $(DEFINES) -DINSTALL_PREFIX=\"$(PREFIX)\" \
212 -DFIXEDPOINT -DUSEAPI_OSS -D__linux__ -Dfork=getpid
213extra_DEFINES += -D__linux__ -Dfork=getpid
214endif
215
216# BLACKFIN toolchain
217
218ifeq ($(CC), bfin-uclinux-gcc)
219pd_LIBS = -lm -lpthread
220pd_DEFINES = $(DEFINES) -DINSTALL_PREFIX=\"$(PREFIX)\" \
221 -DFIXEDPOINT -DUSEAPI_OSS -D__linux__
222extra_DEFINES += -D__linux__
223endif
224
225# the sources
226
227pd_SRC = g_canvas.c g_graph.c g_text.c g_rtext.c g_array.c g_template.c g_io.c \
228 g_scalar.c g_traversal.c g_guiconnect.c g_readwrite.c g_editor.c \
229 g_all_guis.c g_bang.c g_hdial.c g_hslider.c g_mycanvas.c g_numbox.c \
230 g_toggle.c g_vdial.c g_vslider.c g_vumeter.c \
231 m_pd.c m_class.c m_obj.c m_atom.c m_memory.c m_binbuf.c \
232 m_conf.c m_glob.c m_sched.c \
233 s_main.c s_inter.c s_file.c s_print.c \
234 s_loader.c s_path.c s_entry.c s_audio.c s_midi.c \
235 d_ugen.c d_arithmetic.c d_dac.c d_misc.c \
236 d_fft.c d_mayer_fft.c d_fftroutine.c d_global.c \
237 d_resample.c d_ctl.c d_soundfile.c \
238 x_arithmetic.c x_connective.c x_interface.c x_midi.c x_misc.c \
239 x_time.c x_acoustics.c x_net.c x_qlist.c x_gui.c \
240 s_midi_oss.c s_audio_oss.c
241
242pd_SRC += d_imayer_fft.c m_fixed.c
243
244pd_OBJ = $(pd_SRC:.c=.o)
245
246pd-gui_SRC = t_main.c t_tkcmd.c
247pd-gui_OBJ = $(pd-gui_SRC:.c=.o)
248
249extra_SRC = $(shell ls ../intern/*.c) $(shell ls ../extra/*.c)
250extra_OBJ = $(extra_SRC:.c=.o)
251extra_EXT = $(extra_SRC:.c=.pd_linux)
252
253#
254# ------------------ targets ------------------------------------
255#
256
257all: $(BIN_DIR)/pd \
258 $(BIN_DIR)/pd-gui \
259 $(BIN_DIR)/pd-watchdog \
260 $(BIN_DIR)/pdsend \
261 $(BIN_DIR)/pdreceive \
262 $(BIN_DIR)/pd.tk \
263 extra
264
265pd: $(BIN_DIR)/pd
266pd-gui: $(BIN_DIR)/pd-gui
267pd-watchdog: $(BIN_DIR)/pd-watchdog
268
269static:
270 make pd_SRC="$(pd_SRC) $(extra_SRC)" DEFINES="-DPD -DUNIX -DSTATIC" \
271 pd pd-gui pd-watchdog $(BIN_DIR)/pdsend \
272 $(BIN_DIR)/pdreceive $(BIN_DIR)/pd.tk
273
274extra: $(extra_EXT)
275
276ipod:
277 make CC=arm-elf-gcc static
278
279blackfin:
280 make CC=bfin-uclinux-gcc static
281
282$(pd_OBJ) : %.o : %.c
283 $(CC) $(CFLAGS) $(pd_DEFINES) $(pd_INCLUDES) -c -o $(OBJ_DIR)/$@ $+
284
285$(pd-gui_OBJ) : %.o : %.c
286 $(CC) $(CFLAGS) $(pd-gui_DEFINES) $(pd-gui_INCLUDES) -c -o $(OBJ_DIR)/$@ $+
287
288$(extra_OBJ) : %.o : %.c
289 $(CC) $(CFLAGS) $(extra_DEFINES) $(extra_INCLUDES) -c -o $@ $*.c
290
291$(extra_EXT) : %.$(EXT) : %.o
292 $(CC) -o $@ $(extra_LDFLAGS) $+
293
294$(BIN_DIR)/pd-watchdog: s_watchdog.c
295 $(CC) $(CFLAGS) $(DEFINES) -o $@ s_watchdog.c
296
297$(BIN_DIR)/pdsend: u_pdsend.c
298 $(CC) $(CFLAGS) $(DEFINES) -o $@ u_pdsend.c
299
300$(BIN_DIR)/pdreceive: u_pdreceive.c
301 $(CC) $(CFLAGS) $(DEFINES) -o $@ u_pdreceive.c
302
303$(BIN_DIR)/pd: $(pd_OBJ)
304 cd ../obj; $(CC) $(pd_LDFLAGS) -o $@ $(pd_OBJ) $(pd_LIBS)
305
306$(BIN_DIR)/pd-gui: $(pd-gui_OBJ)
307 cd ../obj; $(CC) -o $@ $(pd-gui_OBJ) $(pd-gui_LDFLAGS) $(pd-gui_LIBS)
308
309$(BIN_DIR)/pd.tk: u_main.tk
310 echo set pd_nt 0 > $(BIN_DIR)/pd.tk
311 grep -v "set pd_nt" < u_main.tk >> $@
312
313INSTDIR = $(DESTDIR)/$(PREFIX)
314
315install: all
316# Create the directory structure
317
318 install -d $(INSTDIR)/lib/pd/bin
319 install -d $(INSTDIR)/lib/pd/extra
320 install -d $(INSTDIR)/lib/pd/intern
321 install -d $(INSTDIR)/lib/pd/doc
322 install -d $(INSTDIR)/bin
323 install -d $(INSTDIR)/include
324
325 install $(BIN_DIR)/pd-gui $(INSTDIR)/lib/pd/bin/
326 install $(BIN_DIR)/pd-watchdog $(INSTDIR)/lib/pd/bin/
327 install -m 644 $(BIN_DIR)/pd.tk $(INSTDIR)/lib/pd/bin/
328 install -m 755 $(BIN_DIR)/pd $(INSTDIR)/bin/
329 install -m 755 $(BIN_DIR)/pdsend $(INSTDIR)/bin/pdsend
330 install -m 755 $(BIN_DIR)/pdreceive $(INSTDIR)/bin/pdreceive
331 cp -r ../doc/7.stuff $(INSTDIR)/lib/pd/doc
332 cp -r ../doc/5.reference $(INSTDIR)/lib/pd/doc
333 install -m 644 m_pd.h $(INSTDIR)/include/m_pd.h
334
335# Install the externals if possible
336 cp ../extra/*.pd_linux $(INSTDIR)/lib/pd/extra
337 cp ../intern/*.pd_linux $(INSTDIR)/lib/pd/intern
338
339# Install the ICON and desktop file
340 install -d $(INSTDIR)/share/pixmaps
341 install -d $(INSTDIR)/share/applications
342 cp ../ipkg/pd-icon.png $(INSTDIR)/share/pixmaps
343 cp ../ipkg/pd.desktop $(INSTDIR)/share/applications/
344
345
346
347clean:
348 -rm -f `find ../extra/ -name "*.pd_*"`
349 -rm -f tags
350 -rm -f ../obj/* $(BIN_DIR)/* ../extra/*.{o,$(EXT)} ../intern/*.{o,$(EXT)}
351 -rm -f *~
352 -rm -f $(BIN_DIR)/pdsend $(BIN_DIR)/pdreceive
353
354