blob: 1d93cdcd71781e09c1866bc24d4289e93b678519 (
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
|
VPATH = ../obj:./
INSTDIR = ..
OBJ_DIR = $(INSTDIR)/src
BIN_DIR = $(INSTDIR)/bin
PDEXEC = pd.exe
GUINAME= pdtcl.dll
DLLWRAP= dllwrap
GFLAGS = -DINSTALL_PREFIX=\"$(INSTDIR)\"
MORECFLAGS = -g
PADIR = $(INSTDIR)/portaudio
INCPA = -I$(PADIR) -I$(PADIR)/pa_common -I$(PADIR)/pablio -I../lib/asio
INCLUDE =
GINCLUDE = $(INCLUDE) -I../tcl/include
LDFLAGS = -lpthreadGC -lwsock32 -lportaudio -lwinmm /lib/tcl85.lib /lib/tk85.lib
LIB = -lm
OPT_CFLAGS =
WARN_CFLAGS = -Wall -W -Wstrict-prototypes \
-Wno-unused-parameter -Wno-parentheses -Wno-switch
ARCH_CFLAGS = -DPD -DPD_INTERNAL -DMSW -DUSEAPI_MMIO -DUSEAPI_PORTAUDIO \
CFLAGS += $(ARCH_CFLAGS) $(WARN_CFLAGS) $(OPT_CFLAGS) $(MORECFLAGS)
# the sources
SYSSRC += s_audio_pa.c s_audio_mmio.c s_midi_mmio.c
PASRC = $(PADIR)/pa_common/pa_lib.c $(PADIR)/pa_common/pa_trace.c \
$(PADIR)/pablio/pablio_pd.c $(PADIR)/pablio/ringbuffer_pd.c
GSRC = t_main.c t_tkcmd.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_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 g_vslider.c g_vdial.c $(SYSSRC)
SRSRC = u_pdsend.c u_pdreceive.c
OBJ = $(SRC:.c=.o)
GOBJ = $(GSRC:.c=.o)
SROBJ = $(SRSRC:.c=.o)
PAOBJ = $(PASRC:.c=.o)
OBJC = $(OBJ) $(PAOBJ)
#
# ------------------ targets ------------------------------------
#
.PHONY: all
all: $(OBJ_DIR)/$(GUINAME) $(OBJ_DIR)/$(PDDLL) $(OBJ_DIR)/$(PDEXEC) \
$(OBJ_DIR)/pdsend.exe $(OBJ_DIR)/pdreceive.exe $(OBJ_DIR)/pd.tk
$(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
$(SROBJ) : %.o : %.c
$(CC) $(CFLAGS) $(GFLAGS) $(INCLUDE) -c -o $(OBJ_DIR)/$*.o $*.c
$(PAOBJ) : %.o : %.c
$(CC) $(CFLAGS) $(GFLAGS) $(INCPA) -c -o $(OBJ_DIR)/$*.o $*.c
$(OBJ_DIR)/pdsend.exe: u_pdsend.o
cd $(OBJ_DIR); $(CC) $(CFLAGS) $(STRIPFLAG) -o pdsend.exe u_pdsend.o $(LDFLAGS)
$(OBJ_DIR)/pdreceive.exe: u_pdreceive.o
cd $(OBJ_DIR); $(CC) $(CFLAGS) $(STRIPFLAG) -o pdreceive.exe u_pdreceive.o $(LDFLAGS)
$(OBJ_DIR)/$(PDEXEC): s_entry.o
cd $(OBJ_DIR); $(CC) -o $(PDEXEC) s_entry.o $(LIB) pd.a $(LDFLAGS)
$(OBJ_DIR)/$(PDDLL): $(OBJC)
cd $(OBJ_DIR); $(DLLWRAP) --export-all-symbols --output-def pd.def \
--output-lib=pd.a --dllname=pd.dll $(OBJC) pdtcl.a $(LDFLAGS)
$(OBJ_DIR)/$(GUINAME): t_tkcmd.o
cd $(OBJ_DIR); $(DLLWRAP) --export-all-symbols --output-def pdtcl.def \
--output-lib=pdtcl.a --dllname=$(GUINAME) t_tkcmd.o $(LDFLAGS)
$(OBJ_DIR)/pd.tk: u_main.tk
echo set pd_nt 1 > $(OBJ_DIR)/pd.tk
grep -v "set pd_nt" < u_main.tk >> $(OBJ_DIR)/pd.tk
install: all
install -d $(INSTDIR)/bin
install $(OBJ_DIR)/pd*.exe $(BIN_DIR)
install $(OBJ_DIR)/pd*.dll $(BIN_DIR)
install -m644 $(OBJ_DIR)/pd.tk $(BIN_DIR)/pd.tk
install -m644 ../extra/*/*.pd $(INSTDIR)/doc/5.reference/
clean:
-rm -f $(OBJ_DIR)/*.o $(OBJ_DIR)/*.a $(OBJ_DIR)/*.def
-rm -f $(OBJ_DIR)/pd*.exe $(OBJ_DIR)/pd*.dll
-rm -f $(PADIR)/pablio/*.o $(PADIR)/pa_common/*.o
-rm -f $(OBJ_DIR)/pd.tk
-rm -f makefile.dependencies
touch makefile.dependencies
chmod 666 makefile.dependencies
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 $(INSTDIR)/bin/pd*.exe
-rm $(INSTDIR)/bin/pd*.dll
-rm $(INSTDIR)/bin/*.tk
include makefile.dependencies
|