forked from mod-audio/mod-ttymidi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (18 loc) · 773 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
DESTDIR ?=
PREFIX = /usr/local
CC ?= gcc
CFLAGS += -std=gnu99 -Wall -Wextra -Wshadow -Werror -fvisibility=hidden
LDFLAGS += -Wl,--no-undefined
all: ttymidi ttymidi.so
ttymidi: src/ttymidi.c src/mod-semaphore.h
$(CC) $< $(CFLAGS) $(shell pkg-config --cflags --libs jack) $(LDFLAGS) -lpthread -o $@
ttymidi.so: src/ttymidi.c src/mod-semaphore.h
$(CC) $< $(CFLAGS) $(shell pkg-config --cflags --libs jack) $(LDFLAGS) -fPIC -lpthread -shared -o $@
install: ttymidi ttymidi.so
install -m 755 ttymidi $(DESTDIR)$(PREFIX)/bin/
install -m 755 ttymidi.so $(DESTDIR)$(shell pkg-config --variable=libdir jack)/jack/
clean:
rm -f ttymidi ttymidi.so
uninstall:
rm $(DESTDIR)$(PREFIX)/bin/ttymidi
rm $(DESTDIR)$(shell pkg-config --variable=libdir jack)/jack/ttymidi.so