-
Notifications
You must be signed in to change notification settings - Fork 2
/
makefile.include
82 lines (59 loc) · 2.16 KB
/
makefile.include
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
current: pd_nt
# ----------------------- Windows -----------------------
pd_nt: $(NAME).dll
.SUFFIXES: .dll
PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo
VC="C:\Program Files\Microsoft Visual Studio\Vc98"
PDNTINCLUDE = /I. /I..\pd\src /I..\..\pd\src /I..\..\..\pd\src /I$(VC)\include
PDNTLDIR = $(VC)\lib
PDNTLIB = $(PDNTLDIR)\libc.lib \
$(PDNTLDIR)\oldnames.lib \
$(PDNTLDIR)\kernel32.lib \
..\..\bin\pd.lib
.c.dll:
cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
link /dll /export:$(CSYM)_setup $*.obj $(PDNTLIB)
# ----------------------- LINUX i386 and ia64 -----------------------
l_i386: $(NAME).l_i386
l_ia64: $(NAME).l_ia64
l_arm: $(NAME).l_arm
.SUFFIXES: .l_i386 .l_ia64 .l_arm
LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \
-Wall -W -Wshadow -Wstrict-prototypes \
-Wno-unused -Wno-unused-parameter -Wno-parentheses -Wno-switch $(CFLAGS)
UNIXINCLUDE = -I../pd/src -I../../pd/src -I../../../pd/src \
-I../../../../pd/src -I../../../../../pd/src
LINUXINCLUDE = $(UNIXINCLUDE)
.c.l_i386:
$(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -m32 -o $*.o -c $*.c
$(CC) -m32 -shared -o $*.l_i386 $*.o -lc -lm
strip --strip-unneeded $*.l_i386
rm -f $*.o
.c.l_ia64:
cc $(LINUXCFLAGS) $(LINUXINCLUDE) -fPIC -o $*.o -c $*.c
ld -shared -o $*.l_ia64 $*.o -lc -lm
strip --strip-unneeded $*.l_ia64
rm $*.o
.c.l_arm:
$(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) --fast-math -o $*.o -c $*.c
$(CC) --fast-math -shared -o $*.l_arm $*.o -lc -lm
strip --strip-unneeded $*.l_arm
rm -f $*.o
# ----------------------- Mac OSX -----------------------
d_ppc: $(NAME).d_ppc
d_fat: $(NAME).d_fat
.SUFFIXES: .d_ppc .d_fat
DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \
-Wno-unused -Wno-parentheses -Wno-switch
.c.d_ppc:
$(CC) $(DARWINCFLAGS) $(UNIXINCLUDE) -o $*.o -c $*.c
$(CC) -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o
rm -f $*.o
.c.d_fat:
$(CC) -arch i386 -arch ppc $(DARWINCFLAGS) $(UNIXINCLUDE) -o $*.o -c $*.c
$(CC) -arch i386 -arch ppc -bundle -undefined suppress -flat_namespace \
-o $*.d_fat $*.o
rm -f $*.o
# ----------------------------------------------------------
clean:
rm -f *.o *.pd_* *.d_ppc *.d_fat *.l_i386 *.l_ia64 *.dll