aboutsummaryrefslogtreecommitdiff
path: root/externals/iem/Make.include
blob: aaca607a99c8d58bd28d9224f5294d2effbcd516 (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
current: all

PD_DEFINES = -DPD -DUNIX

#################################
# path to private Pd-headers 
PDSOURCE ?= /usr/local/src/pd/src

# path to iemlib.h
IEMLIB_INCLUDE = ../../include

#define to true if private Pd-header g_canvas.h is in out search-path
PD_DEFINES += -DHAVE_G_CANVAS_H 
#################################


.SUFFIXES: .pd_linux

EXT = pd_linux

STRIP = strip

PD_LDFLAGS = --export-dynamic -shared $(LD_FLAGS)
PD_LIB = -lm -lc $(LIB)

#select either the DBG and OPT compiler flags below:

DBG_CFLAGS=-W -Wno-parentheses -Wno-switch -Wno-unused
CFLAGS=-O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
PD_CFLAGS = $(PD_DEFINES) -fPIC -fno-stack-protector $(DBG_CFLAGS) $(CFLAGS)

PD_INCLUDES = -I. -I$(IEMLIB_INCLUDE) -I$(PDSOURCE) -I../../../../pd/src

# the sources
#SRC = $(sort $(filter %.c, $(wildcard *.c)))
	
OBJ = $(SRC:.c=.o) 

#
#  ------------------ targets ------------------------------------
#

clean:
	-rm -f ../../lib/$(TARGET).$(EXT) $(TARGET).$(EXT)
	-rm -f *.o

all: $(OBJ)
	@echo :: $(OBJ)
	$(LD) $(PD_LDFLAGS) -o $(TARGET).$(EXT) *.o $(PD_LIB)
	$(STRIP) --strip-unneeded $(TARGET).$(EXT)
	-cp $(TARGET).$(EXT) ../../lib/

$(OBJ) : %.o : %.c
	touch $*.c
	$(CC) $(PD_CFLAGS) $(PD_INCLUDES) -c -o $*.o $*.c