blob: 38c296a04a3bc4d457f19538d6c7ef2424282490 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
# Makefile mods by Olaf Matthes for use with GCC 3.3
#
# This makefile is made for r10000. You can change r10000 to your
# processor type if you have problems. Just change and type
# 'make'
#
# You will need to change the tck/tk paths if you want to recompile
# The GUI part.
# compile with GCC as n32 binary
EXECUTABLE=../bin/pd-n32
XF1=-mabi=n32 -mips4 -DN32 -funroll-loops -fomit-frame-pointer
# compile with GCC as o32 binary
#EXECUTABLE=../bin/pd-o32
#XF1=-mcpu=r4000 -mips3 -funroll-loops -fomit-frame-pointer
CC=gcc
OBJ_DIR = ../obj
BIN_DIR = ../bin
PDEXEC = $(BIN_DIR)/pd
EXT= pd_irix6
GUINAME= pd-gui
INSTALL_PREFIX = /usr/local
GFLAGS = -DINSTALL_PREFIX=\"$(INSTALL_PREFIX)\"
MANDIR = ${prefix}/man
MORECFLAGS = -DIRIX -DDL_OPEN -DUSEAPI_SGI -I/usr/X11R6/include -Wno-error
INCLUDE = -I. -I../tk/unix/include -I../tcl/unix/include
GINCLUDE = $(INCLUDE)
GLIB = ../tk/unix/lib/libtk8.4.a ../tcl/unix/lib/libtcl8.4.a -lm -lX11
LDFLAGS = $(XF1)
LIB = -laudio -lmd -lm -lpthread
OPT_CFLAGS = -O3
WARN_CFLAGS = -Wall -W -Werror -Wno-unused \
-Wno-parentheses -Wno-switch
ARCH_CFLAGS = -DPD -DUNIX
CFLAGS = $(ARCH_CFLAGS) $(WARN_CFLAGS) $(OPT_CFLAGS) $(MORECFLAGS) $(XF1)
# the sources
SYSSRC = s_midi_sgi.c s_audio_sgi.c
SRC = g_canvas.c g_graph.c g_text.c g_rtext.c g_array.c g_template.c g_io.c \
g_scalar.c g_traversal.c g_guiconnect.c g_readwrite.c g_editor.c \
g_all_guis.c g_bang.c g_hdial.c g_hslider.c g_mycanvas.c g_numbox.c \
g_toggle.c g_vdial.c g_vslider.c g_vumeter.c \
m_pd.c m_class.c m_obj.c m_atom.c m_memory.c m_binbuf.c \
m_conf.c m_glob.c m_sched.c \
s_main.c s_inter.c s_file.c s_print.c \
s_loader.c s_path.c s_entry.c s_audio.c s_midi.c \
d_ugen.c d_ctl.c d_arithmetic.c d_osc.c d_filter.c d_dac.c d_misc.c \
d_math.c d_fft.c d_mayer_fft.c d_fftroutine.c d_array.c d_global.c \
d_delay.c d_resample.c \
x_arithmetic.c x_connective.c x_interface.c x_midi.c x_misc.c \
x_time.c x_acoustics.c x_net.c x_qlist.c x_gui.c d_soundfile.c \
$(SYSSRC)
OBJ = $(SRC:.c=.o)
GSRC = t_main.c t_tkcmd.c
GOBJ = $(GSRC:.c=.o)
#
# ------------------ targets ------------------------------------
#
.PHONY: pd gui pd-watchdog all
all: $(PDEXEC) $(BIN_DIR)/pd-watchdog $(BIN_DIR)/$(GUINAME) $(BIN_DIR)/pdsend \
$(BIN_DIR)/pdreceive $(BIN_DIR)/pd.tk externs
bin: $(PDEXEC) $(BIN_DIR)/pd-watchdog $(BIN_DIR)/$(GUINAME) $(BIN_DIR)/pdsend \
$(BIN_DIR)/pdreceive $(BIN_DIR)/pd.tk
.c.o:
gcc $(CFLAGS) $(GFLAGS) $(INCLUDE) -c -o $(OBJ_DIR)/$*.o $*.c
#$(OBJ) : %.o : %.c
# $(CC) $(CFLAGS) $(GFLAGS) $(INCLUDE) -c -o $(OBJ_DIR)/$*.o $*.c
#$(GOBJ) : %.o : %.c
# $(CC) $(CFLAGS) $(GFLAGS) $(GINCLUDE) -c -o $(OBJ_DIR)/$*.o $*.c
pd: $(PDEXEC)
gui: $(BIN_DIR)/$(GUINAME)
pd-watchdog: $(BIN_DIR)/pd-watchdog
$(BIN_DIR)/pd-watchdog: s_watchdog.c
gcc -O2 $(STRIPFLAG) -o $(BIN_DIR)/pd-watchdog s_watchdog.c
$(BIN_DIR)/pdsend: u_pdsend.c
gcc $(CFLAGS) $(STRIPFLAG) -o $(BIN_DIR)/pdsend u_pdsend.c
$(BIN_DIR)/pdreceive: u_pdreceive.c
gcc $(CFLAGS) $(STRIPFLAG) -o $(BIN_DIR)/pdreceive u_pdreceive.c
$(PDEXEC): $(OBJ)
cd ../obj; $(CC) $(LDFLAGS) $(DBG_CFLAGS) -o $(PDEXEC) $(OBJ) \
$(LIB)
$(BIN_DIR)/pd-gui: $(GOBJ) $(GSRC)
cd ../obj; $(CC) $(INCLUDE) -o $(BIN_DIR)/$(GUINAME) $(GOBJ) \
$(GLIB)
$(BIN_DIR)/pd.tk: u_main.tk
echo set pd_nt 2 > $(BIN_DIR)/pd.tk
grep -v "set pd_nt" < u_main.tk >> $(BIN_DIR)/pd.tk
INSTDIR = $(DESTDIR)/$(INSTALL_PREFIX)
MANINSTDIR = $(DESTDIR)/$(MANDIR)
install: all
install -d $(INSTDIR)/lib/pd/bin
install $(BIN_DIR)/$(GUINAME) $(INSTDIR)/lib/pd/bin/$(GUINAME)
install $(BIN_DIR)/pd-watchdog $(INSTDIR)/lib/pd/bin/pd-watchdog
install -m644 $(BIN_DIR)/pd.tk $(INSTDIR)/lib/pd/bin/pd.tk
install -d $(INSTDIR)/bin
install -m755 $(PDEXEC) $(INSTDIR)/bin/pd
install -m 755 $(BIN_DIR)/pdsend $(INSTDIR)/bin/pdsend
install -m 755 $(BIN_DIR)/pdreceive $(INSTDIR)/bin/pdreceive
install -d $(INSTDIR)/lib/pd/extra
install -d $(INSTDIR)/lib/pd/externs
install -m 644 $(EXTERNS) $(INSTDIR)/lib/pd/extra
cp -r ../doc $(INSTDIR)/lib/pd/
install -d $(INSTDIR)/include
install -m644 m_pd.h $(INSTDIR)/include/m_pd.h
install -d $(MANINSTDIR)/man1
gzip < ../man/pd.1 > $(MANINSTDIR)/man1/pd.1.gz
chmod 644 $(MANINSTDIR)/man1/pd.1.gz
gzip < ../man/pdsend.1 > $(MANINSTDIR)/man1/pdsend.1.gz
chmod 644 $(MANINSTDIR)/man1/pdsend.1.gz
gzip < ../man/pdreceive.1 > $(MANINSTDIR)/man1/pdreceive.1.gz
chmod 644 $(MANINSTDIR)/man1/pdreceive.1.gz
local-clean:
-rm -f ../obj/* $(BIN_DIR)/pd $(BIN_DIR)/$(GUINAME) $(BIN_DIR)/pdsend \
$(BIN_DIR)/pdreceive $(BIN_DIR)/pd-watchdog m_stamp.c
-rm -f *~
-(cd ../doc/6.externs; rm -f *.pd_linux)
-rm -f makefile.dependencies
touch makefile.dependencies
chmod 666 makefile.dependencies
extra-clean:
-rm -f `find ../extra/ -name "*.pd_*"`
-rm -f tags
clean: extra-clean local-clean
distclean: clean
rm -rf config.cache config.log config.status makefile tags \
autom4te-*.cache
echo all: > makefile
echo -e "\t./configure" >> makefile
echo -e "\tmake" >> makefile
tags: $(SRC) $(GSRC); ctags *.[ch]
depend:
$(CC) $(INCLUDE) $(CFLAGS) -M $(SRC) > makefile.dependencies
uninstall:
-rm -r $(INSTDIR)/lib/pd
-rm $(INSTDIR)/bin/pd
-rm $(INSTDIR)/bin/pdsend
-rm $(INSTDIR)/bin/pdreceive
-rm $(INSTDIR)/include/m_pd.h
-rm $(MANINSTDIR)/man/man1/pd.1.gz
-rm $(MANINSTDIR)/man/man1/pdsend.1.gz
-rm $(MANINSTDIR)/man/man1/pdreceive.1.gz
include makefile.dependencies
|