headphoned 1.7 "What Kate Does" released
[headphoned] / makefile
1 OBJS = src/headphoned.o
2 PROG = headphoned
3 CFLAGS += `pkg-config --cflags glib-2.0 gconf-2.0 libosso dbus-1` -Os -Wall
4 LDFLAGS += `pkg-config --libs glib-2.0 gconf-2.0 libosso dbus-1`
5
6 DESTDIR ?= 
7 PREFIX ?= /usr
8
9 ifdef DEBUG
10   CFLAGS += -DHEADPHONED_DEBUG
11 endif
12
13 all: $(PROG)
14
15 src/headphoned.o: src/headphoned.c src/config.h
16
17 $(PROG): $(OBJS)
18         $(CC) $(LDFLAGS) $(LIBS) $^ -o $@
19         strip $@
20
21 install: $(PROG)
22         install $(PROG) $(DESTDIR)$(PREFIX)/sbin/$(PROG)
23         install $(PROG).launch $(DESTDIR)$(PREFIX)/sbin/$(PROG).launch
24         mkdir -p $(DESTDIR)/etc/$(PROG)
25         mkfifo $(DESTDIR)/etc/$(PROG)/mplayer-input
26         chown user:users $(DESTDIR)/etc/$(PROG)/mplayer-input
27         mkdir -p $(DESTDIR)/etc/event.d/
28         install upstart/$(PROG) $(DESTDIR)/etc/event.d/
29
30 clean:
31         rm -f $(PROG) $(OBJS)
32
33 .PHONY: all install clean
34 .DEFAULT: all
35