Headphoned 1.6 with support for Bluetooth headsets
[headphoned] / makefile
index 2905814..cdbc7f9 100644 (file)
--- a/makefile
+++ b/makefile
@@ -6,15 +6,30 @@ LDFLAGS += `pkg-config --libs glib-2.0 gconf-2.0 libosso dbus-1`
 DESTDIR ?= 
 PREFIX ?= /usr
 
+ifdef DEBUG
+  CFLAGS += -DHEADPHONED_DEBUG
+endif
+
+all: $(PROG)
+
+src/headphoned.o: src/headphoned.c src/config.h
+
 $(PROG): $(OBJS)
        $(CC) $(LDFLAGS) $(LIBS) $^ -o $@
        strip $@
 
 install: $(PROG)
        install $(PROG) $(DESTDIR)$(PREFIX)/sbin/$(PROG)
+       install $(PROG).launch $(DESTDIR)$(PREFIX)/sbin/$(PROG).launch
+       mkdir -p $(DESTDIR)/etc/$(PROG)
+       mkfifo $(DESTDIR)/etc/$(PROG)/mplayer-input
+       chown user:users $(DESTDIR)/etc/$(PROG)/mplayer-input
+       mkdir -p $(DESTDIR)/etc/event.d/
+       install upstart/$(PROG) $(DESTDIR)/etc/event.d/
 
 clean:
        rm -f $(PROG) $(OBJS)
 
-.PHONY: install clean
+.PHONY: all install clean
+.DEFAULT: all