-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
39 lines (24 loc) · 807 Bytes
/
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
-include .config
INSTALL ?= install
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
CFLAGS += -std=gnu1x -Wall -pedantic -O2
LDLIBS_OPUS ?= -lopus
LDLIBS_ASOUND ?= -lasound
LDLIBS += -lm -lrt -lpthread $(LDLIBS_OPUS) $(LDLIBS_ASOUND)
.PHONY: all install clean
all: mtx mrx mtrx
mtx: mtx.c common.c
mrx: mrx.c common.c
mtx_multi.o: mtx.c
$(CC) -c -Dmain=mtx_main $(CFLAGS) mtx.c -o mtx_multi.o
mrx_multi.o: mrx.c
$(CC) -c -Dmain=mrx_main $(CFLAGS) mrx.c -o mrx_multi.o
mtrx: multicall.c mtx_multi.o mrx_multi.o common.c
$(CC) $(CFLAGS) multicall.c mtx_multi.o mrx_multi.o common.c $(LDLIBS) -o mtrx
install: mtx mrx
$(INSTALL) -D -s mtx mrx -t $(DESTDIR)$(BINDIR)
install_multi: mtrx
$(INSTALL) -D -s mtrx -t $(DESTDIR)$(BINDIR)
clean:
rm -f mtx mrx mtrx mtx_multi.o mrx_multi.o