aboutsummaryrefslogtreecommitdiff
path: root/pd/extra/expr~/makefile
blob: a5d4c88b4200f53466b96d33423692e1bc2eadc0 (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

current: expr.pd_linux expr~.pd_linux fexpr~.pd_linux \
     ../expr.pd_linux ../expr~.pd_linux ../fexpr~.pd_linux

install: install_linux

clean: clean_linux

clobber: clobber_linux

PDEXTERN=/usr/local/lib/pd/externs

# ----------------------- NT -----------------------

pd_nt: expr.dll

NTOBJ =  vexp.obj vexp_fun.obj vexp_if.obj

PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
VC="C:\Program Files\Microsoft Visual Studio\Vc98"

PDNTINCLUDE = /I. /I..\..\src /I$(VC)\include

PDNTLDIR = $(VC)\lib
PDNTLIB = $(PDNTLDIR)\libc.lib \
	$(PDNTLDIR)\oldnames.lib \
	$(PDNTLDIR)\kernel32.lib \
	..\..\bin\pd.lib 

.c.obj:
	cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c

expr.dll: $(NTOBJ)
	link /dll /export:expr_setup /export:expr_tilde_setup \
	    /export:fexpr_tilde_setup $(NTOBJ) $(PDNTLIB)
	ren vexp.dll expr.dll
	copy expr.dll ..\expr.dll
	copy expr.dll ..\expr~.dll
	copy expr.dll ..\fexpr~.dll
	copy help-expr.pd ..\help-expr.pd

# ----------------------- IRIX 5.x -----------------------

pd_irix5: 

.SUFFIXES: .pd_irix5

SGICFLAGS5 = -o32 -DPD -DSGI -O2


SGIINCLUDE =  -I/usr/people/msp/pd/pd/src

.c.pd_irix5:
	$(CC) $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c
	ld -elf -shared -rdata_shared -o $*.pd_irix5 $*.o
	rm $*.o

# ----------------------- IRIX 6.x -----------------------

pd_irix6: 

.SUFFIXES: .pd_irix6

SGICFLAGS6 = -DPD -DSGI -n32 \
	-OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -OPT:cray_ivdep=true \
	-Ofast=ip32

SGICFLAGS5 = -DPD -O2 -DSGI

SGIINCLUDE =  -I/usr/people/msp/pd/pd/src

.c.pd_irix6:
	$(CC) $(SGICFLAGS6) $(SGIINCLUDE) -o $*.o -c $*.c
	ld -elf -shared -rdata_shared -o $*.pd_irix6 $*.o
	rm $*.o

# ----------------------- LINUX i386 -----------------------

LINUXOBJ =  vexp.pd_linux_o vexp_fun.pd_linux_o vexp_if.pd_linux_o
.SUFFIXES: .pd_linux_o

LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \
    -Wall -W -Wshadow -Wstrict-prototypes -Werror \
    -Wno-unused -Wno-parentheses -Wno-switch

LINUXINCLUDE =  -I../../src

.c.pd_linux_o:
	$(CC) -g $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.pd_linux_o -c $*.c

expr.pd_linux: $(LINUXOBJ)
	ld -export_dynamic  -shared -o expr.pd_linux $(LINUXOBJ) -lc -lm
	strip --strip-unneeded expr.pd_linux

expr~.pd_linux: expr.pd_linux
	-ln -s expr.pd_linux expr~.pd_linux

fexpr~.pd_linux: expr.pd_linux
	-ln -s expr.pd_linux fexpr~.pd_linux

../expr.pd_linux: expr.pd_linux
	-ln -s expr~/expr.pd_linux ../expr.pd_linux

../expr~.pd_linux: expr.pd_linux
	-ln -s expr~/expr.pd_linux ../expr~.pd_linux

../fexpr~.pd_linux: expr.pd_linux
	-ln -s expr~/expr.pd_linux ../fexpr~.pd_linux

install_linux:
	install expr.pd_linux $(PDEXTERN)
	rm -f $(PDEXTERN)/expr~.pd_linux
	rm -f $(PDEXTERN)/fexpr~.pd_linux
	cd $(PDEXTERN); \
	-ln -s expr.pd_linux expr~.pd_linux
	-ln -s expr.pd_linux fexpr~.pd_linux


linux_clean:
	rm -f *.pd_linux_o *.o

linux_clobber: clean
	rm -f expr.pd_linux

# ----------------------- MAC OSX -----------------------

pd_darwin: expr.pd_darwin expr~.pd_darwin fexpr~.pd_darwin
MACOSXOBJ =  vexp.pd_darwin_o vexp_fun.pd_darwin_o vexp_if.pd_darwin_o
.SUFFIXES: .pd_darwin_o

MACOSXCFLAGS = -DMACOSX -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \
    -Wno-unused -Wno-parentheses -Wno-switch

MACOSXINCLUDE =  -I../../src

.c.pd_darwin_o:
	$(CC) -g $(MACOSXCFLAGS) $(MACOSXINCLUDE) -o $*.pd_darwin_o -c $*.c

expr.pd_darwin: $(MACOSXOBJ)
	$(CC) -bundle -undefined suppress  -flat_namespace \
		-o expr.pd_darwin $(MACOSXOBJ)  -lm
	rm -f ../expr.pd_darwin
	-ln -s expr~/expr.pd_darwin ..

expr~.pd_darwin: expr.pd_darwin
	-ln -s expr.pd_darwin expr~.pd_darwin
	rm -f ../expr~.pd_darwin
	-ln -s expr~/expr~.pd_darwin ..

fexpr~.pd_darwin: expr.pd_darwin
	-ln -s expr.pd_darwin fexpr~.pd_darwin
	rm -f ../fexpr~.pd_darwin
	-ln -s expr~/fexpr~.pd_darwin ..

install_darwin:
	install expr.pd_darwin $(PDEXTERN)
	rm -f $(PDEXTERN)/expr~.pd_darwin
	rm -f $(PDEXTERN)/fexpr~.pd_darwin
	cd $(PDEXTERN); \
	-ln -s expr.pd_darwin expr~.pd_darwin; \
	-ln -s expr.pd_darwin fexpr~.pd_darwin

darwin_clean:
	rm -f *.pd_darwin_o *.o

darwin_clobber: clean
	rm -f expr.pd_darwin