blob: fbecf9792d79ef4f2a4f2a57b5f32401d18deff1 (
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
|
current: all
PDSOURCE = /usr/local/src/pd-0.37-4/src
.SUFFIXES: .pd_linux
EXT = pd_linux
LDFLAGS = -export-dynamic -shared
LIB = -ldl -lm -lpthread
#select either the DBG and OPT compiler flags below:
CFLAGS = -DPD -DUNIX -W -Werror -Wno-unused \
-Wno-parentheses -Wno-switch -O6 -funroll-loops -fomit-frame-pointer \
-DDL_OPEN -fPIC
INCLUDE = -I. -I$(PDSOURCE)
# the sources
SRC = $(sort $(filter %.c, $(wildcard *.c)))
OBJ = $(SRC:.c=.o)
#
# ------------------ targets ------------------------------------
#
clean:
-rm ../../lib/$(TARGET).$(EXT) $(TARGET).$(EXT)
-rm *.o
all: $(OBJ)
@echo :: $(OBJ)
ld $(LDFLAGS) -o $(TARGET).$(EXT) *.o $(LIB)
strip --strip-unneeded $(TARGET).$(EXT)
-cp $(TARGET).$(EXT) ../../lib
$(OBJ) : %.o : %.c
touch $*.c
cc $(CFLAGS) $(INCLUDE) -c -o $*.o $*.c
|