diff options
Diffstat (limited to 'apps/plugins/pdbox/PDa/src/makefile')
-rw-r--r-- | apps/plugins/pdbox/PDa/src/makefile | 354 |
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 @@ | |||
1 | PREFIX = /usr/ | ||
2 | EXT = pd_linux | ||
3 | |||
4 | # pd specific | ||
5 | |||
6 | VPATH = ../obj:./ | ||
7 | OBJ_DIR = ../obj | ||
8 | BIN_DIR = ../bin | ||
9 | |||
10 | BROOT=/usr | ||
11 | X11LIB = $(BROOT)/X11R6/lib | ||
12 | |||
13 | DEFINES = -DPD -DUNIX | ||
14 | |||
15 | pd-gui_INCLUDES = -I$(BROOT)/include/tcl8.4 -I$(BROOT)/X11R6/include | ||
16 | pd-gui_LIBS = -ltk8.4 -ltcl8.4 -lX11 -ldl | ||
17 | pd-gui_LDFLAGS = -L$(X11LIB) | ||
18 | pd-gui_DEFINES = $(DEFINES) | ||
19 | |||
20 | pd_LIBS = -lm -lpthread -ldl | ||
21 | pd_LDFLAGS = -Wl,-export-dynamic | ||
22 | pd_DEFINES = $(DEFINES) -DINSTALL_PREFIX=\"$(PREFIX)\" \ | ||
23 | -DFIXEDPOINT -DUSEAPI_OSS -DDL_OPEN | ||
24 | |||
25 | extra_DEFINES = $(DEFINES) -DFIXEDPOINT | ||
26 | extra_INCLUDES = -I../src | ||
27 | extra_LDFLAGS = -shared | ||
28 | |||
29 | # IPOD toolchain | ||
30 | |||
31 | ifeq ($(CC), arm-elf-gcc) | ||
32 | pd_LDFLAGS += -elf2flt | ||
33 | pd_LIBS = -lm -lpthread | ||
34 | pd_DEFINES = $(DEFINES) -DINSTALL_PREFIX=\"$(PREFIX)\" \ | ||
35 | -DFIXEDPOINT -DUSEAPI_OSS -D__linux__ -Dfork=getpid | ||
36 | extra_DEFINES += -D__linux__ -Dfork=getpid | ||
37 | endif | ||
38 | |||
39 | # BLACKFIN toolchain | ||
40 | |||
41 | ifeq ($(CC), bfin-uclinux-gcc) | ||
42 | pd_LIBS = -lm -lpthread | ||
43 | pd_DEFINES = $(DEFINES) -DINSTALL_PREFIX=\"$(PREFIX)\" \ | ||
44 | -DFIXEDPOINT -DUSEAPI_OSS -D__linux__ | ||
45 | extra_DEFINES += -D__linux__ | ||
46 | endif | ||
47 | |||
48 | # the sources | ||
49 | |||
50 | pd_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 | |||
65 | pd_SRC += d_imayer_fft.c m_fixed.c | ||
66 | |||
67 | pd_OBJ = $(pd_SRC:.c=.o) | ||
68 | |||
69 | pd-gui_SRC = t_main.c t_tkcmd.c | ||
70 | pd-gui_OBJ = $(pd-gui_SRC:.c=.o) | ||
71 | |||
72 | extra_SRC = $(shell ls ../intern/*.c) $(shell ls ../extra/*.c) | ||
73 | extra_OBJ = $(extra_SRC:.c=.o) | ||
74 | extra_EXT = $(extra_SRC:.c=.pd_linux) | ||
75 | |||
76 | # | ||
77 | # ------------------ targets ------------------------------------ | ||
78 | # | ||
79 | |||
80 | all: $(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 | |||
88 | pd: $(BIN_DIR)/pd | ||
89 | pd-gui: $(BIN_DIR)/pd-gui | ||
90 | pd-watchdog: $(BIN_DIR)/pd-watchdog | ||
91 | |||
92 | static: | ||
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 | |||
97 | extra: $(extra_EXT) | ||
98 | |||
99 | ipod: | ||
100 | make CC=arm-elf-gcc static | ||
101 | |||
102 | blackfin: | ||
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 | |||
136 | INSTDIR = $(DESTDIR)/$(PREFIX) | ||
137 | |||
138 | install: 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 | |||
170 | clean: | ||
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 | |||
178 | PREFIX = /usr/ | ||
179 | EXT = pd_linux | ||
180 | |||
181 | # pd specific | ||
182 | |||
183 | VPATH = ../obj:./ | ||
184 | OBJ_DIR = ../obj | ||
185 | BIN_DIR = ../bin | ||
186 | |||
187 | BROOT=/usr | ||
188 | X11LIB = $(BROOT)/X11R6/lib | ||
189 | |||
190 | DEFINES = -DPD -DUNIX | ||
191 | |||
192 | pd-gui_INCLUDES = -I$(BROOT)/include/tcl8.4 -I$(BROOT)/X11R6/include | ||
193 | pd-gui_LIBS = -ltk8.4 -ltcl8.4 -lX11 -ldl | ||
194 | pd-gui_LDFLAGS = -L$(X11LIB) | ||
195 | pd-gui_DEFINES = $(DEFINES) | ||
196 | |||
197 | pd_LIBS = -lm -lpthread -ldl | ||
198 | pd_LDFLAGS = -Wl,-export-dynamic | ||
199 | pd_DEFINES = $(DEFINES) -DINSTALL_PREFIX=\"$(PREFIX)\" \ | ||
200 | -DFIXEDPOINT -DUSEAPI_OSS -DDL_OPEN | ||
201 | |||
202 | extra_DEFINES = $(DEFINES) -DFIXEDPOINT | ||
203 | extra_INCLUDES = -I../src | ||
204 | extra_LDFLAGS = -shared | ||
205 | |||
206 | # IPOD toolchain | ||
207 | |||
208 | ifeq ($(CC), arm-elf-gcc) | ||
209 | pd_LDFLAGS += -elf2flt | ||
210 | pd_LIBS = -lm -lpthread | ||
211 | pd_DEFINES = $(DEFINES) -DINSTALL_PREFIX=\"$(PREFIX)\" \ | ||
212 | -DFIXEDPOINT -DUSEAPI_OSS -D__linux__ -Dfork=getpid | ||
213 | extra_DEFINES += -D__linux__ -Dfork=getpid | ||
214 | endif | ||
215 | |||
216 | # BLACKFIN toolchain | ||
217 | |||
218 | ifeq ($(CC), bfin-uclinux-gcc) | ||
219 | pd_LIBS = -lm -lpthread | ||
220 | pd_DEFINES = $(DEFINES) -DINSTALL_PREFIX=\"$(PREFIX)\" \ | ||
221 | -DFIXEDPOINT -DUSEAPI_OSS -D__linux__ | ||
222 | extra_DEFINES += -D__linux__ | ||
223 | endif | ||
224 | |||
225 | # the sources | ||
226 | |||
227 | pd_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 | |||
242 | pd_SRC += d_imayer_fft.c m_fixed.c | ||
243 | |||
244 | pd_OBJ = $(pd_SRC:.c=.o) | ||
245 | |||
246 | pd-gui_SRC = t_main.c t_tkcmd.c | ||
247 | pd-gui_OBJ = $(pd-gui_SRC:.c=.o) | ||
248 | |||
249 | extra_SRC = $(shell ls ../intern/*.c) $(shell ls ../extra/*.c) | ||
250 | extra_OBJ = $(extra_SRC:.c=.o) | ||
251 | extra_EXT = $(extra_SRC:.c=.pd_linux) | ||
252 | |||
253 | # | ||
254 | # ------------------ targets ------------------------------------ | ||
255 | # | ||
256 | |||
257 | all: $(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 | |||
265 | pd: $(BIN_DIR)/pd | ||
266 | pd-gui: $(BIN_DIR)/pd-gui | ||
267 | pd-watchdog: $(BIN_DIR)/pd-watchdog | ||
268 | |||
269 | static: | ||
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 | |||
274 | extra: $(extra_EXT) | ||
275 | |||
276 | ipod: | ||
277 | make CC=arm-elf-gcc static | ||
278 | |||
279 | blackfin: | ||
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 | |||
313 | INSTDIR = $(DESTDIR)/$(PREFIX) | ||
314 | |||
315 | install: 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 | |||
347 | clean: | ||
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 | |||