aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.in
blob: 03e256e288d114b59e941f8081242b4f749ccaf7 (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

EXT=o
LIBS = -lm -lc
LIBOSC = ../libOSC/@LIBOSC@

CFLAGS = @CFLAGS@
INCLUDES = @INCLUDES@
LDFLAGS = @LDFLAGS@

prefix=$(DESTDIR)/usr

SOURCES = OSC-pattern-match.c  OSC.c  dumpOSC.c htmsocket.c  OSCroute.c  sendOSC.c
TARGETS = $(SOURCES:.c=.o)
EXTS=sendOSC.@pd_suffix@ dumpOSC.@pd_suffix@ OSCroute.@pd_suffix@ OSC.@pd_suffix@

# ----------------------- autoconf -----------------------

all: $(EXTS)

sendOSC.@pd_suffix@: sendOSC.o htmsocket.o
	cc $(LDFLAGS) -o sendOSC.@pd_suffix@ $? -lc -lm $(LIBOSC)

dumpOSC.@pd_suffix@: dumpOSC.o
	cc $(LDFLAGS) -o dumpOSC.@pd_suffix@ $? -lc -lm

OSCroute.@pd_suffix@: OSCroute.o OSC-pattern-match.o
	cc $(LDFLAGS) -o OSCroute.@pd_suffix@ $? -lc -lm

OSC.@pd_suffix@: OSC.o sendOSC.o dumpOSC.o OSCroute.o htmsocket.o OSC-pattern-match.o
	cc $(LDFLAGS) -o OSC.@pd_suffix@ $? -lc -lm $(LIBOSC)

$(TARGETS): %.o : %.c
	cc $(CFLAGS) $(INCLUDES) -c -o $*.o $*.c

# ----------------------------------------------------------

install-doc:
	@test -d $(prefix)/lib/pd/doc/5.reference || mkdir -p $(prefix)/lib/pd/doc/5.reference
	cp -r ../doc/* $(prefix)/lib/pd/doc/5.reference/

install: install-doc
	@test -d $(prefix)/lib/pd/extra || mkdir -p $(prefix)/lib/pd/extra
	install -m644 *.pd_linux $(prefix)/lib/pd/extra

clean:
	rm -rf *.$(EXT) *.@pd_suffix@