aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: d1e8ab0dafbaef9ba61de02bc330396ed4d05301 (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
CFLAGS:=-Wall -O2 -ggdb

pkgmodules:=glib-2.0 libpulse-mainloop-glib sndfile x11 xi
includes:=$(shell pkg-config --cflags $(pkgmodules))
libs:=$(shell pkg-config --libs $(pkgmodules))
objs:=main.o x11.o audio.o key.o

all: coveraudiod

coveraudiod: $(objs)
	$(CC) -o $@ $+ $(libs)

$(objs): %.o: %.c
	$(CC) -std=c99 $(includes) $(CFLAGS) -o $@ -c $<

clean:
	rm -f *.o coveraudiod

install: coveraudiod
	install coveraudiod $(DESTDIR)/usr/bin
	install -d $(DESTDIR)/usr/share/coveraudiod
	install *.wav $(DESTDIR)/usr/share/coveraudiod/

.PHONY: all clean install