forked from michaelforney/oscmix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
89 lines (69 loc) · 1.61 KB
/
Makefile
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
.POSIX:
CC=cc -std=c11
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man
-include config.mk
ALSA?=y
ALSA_CFLAGS?=$$(pkg-config --cflags alsa)
ALSA_LDFLAGS?=$$(pkg-config --libs-only-L --libs-only-other alsa)
ALSA_LDLIBS?=$$(pkg-config --libs-only-l alsa)
GTK?=y
WEB?=n
BIN=oscmix $(BIN-y)
BIN-$(ALSA)+=alsarawio alsaseqio
BIN-$(WEB)+=wsdgram
TARGET=$(BIN) $(TARGET-y)
TARGET-$(GTK)+=gtk
TARGET-$(WEB)+=web
all: $(TARGET)
.PHONY: gtk
gtk:
$(MAKE) -C gtk
.PHONY: web
web:
$(MAKE) -C web
OSCMIX_OBJ=\
main.o\
osc.o\
oscmix.o\
socket.o\
sysex.o\
util.o\
device_ffucxii.o\
device_ff802.o
WSDGRAM_OBJ=\
wsdgram.o\
base64.o\
http.o\
sha1.o\
socket.o\
util.o
oscmix: $(OSCMIX_OBJ)
$(CC) $(LDFLAGS) -o $@ $(OSCMIX_OBJ) -l pthread -l m
wsdgram: $(WSDGRAM_OBJ)
$(CC) $(LDFLAGS) -o $@ $(WSDGRAM_OBJ) -l pthread
alsarawio: alsarawio.o
$(CC) $(LDFLAGS) -o $@ alsarawio.o
alsaseqio.o: alsaseqio.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(ALSA_CFLAGS) -c -o $@ alsaseqio.c
alsaseqio: alsaseqio.o
$(CC) $(LDFLAGS) $(ALSA_LDFLAGS) -o $@ alsaseqio.o $(ALSA_LDLIBS) -l pthread
tools/regtool.o: tools/regtool.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(ALSA_CFLAGS) -c -o $@ tools/regtool.c
tools/regtool: tools/regtool.o
$(CC) $(LDFLAGS) $(ALSA_LDFLAGS) -o $@ tools/regtool.o $(ALSA_LDLIBS)
.PHONY: install
install: $(BIN)
mkdir -p $(DESTDIR)$(BINDIR)
cp $(BIN) $(DESTDIR)$(BINDIR)/
mkdir -p $(DESTDIR)$(MANDIR)/man1
cp doc/oscmix.1 $(DESTDIR)$(MANDIR)/man1/
.PHONY: clean
clean:
rm -f oscmix $(OSCMIX_OBJ)\
wsdgram $(WSDGRAM_OBJ)\
alsarawio alsarawio.o\
alsaseqio alsaseqio.o
$(MAKE) -C gtk clean
$(MAKE) -C web clean