]> mj.ucw.cz Git - ursary.git/blobdiff - Makefile
Changed name of my sound card
[ursary.git] / Makefile
index aaf7d56de2f87c7787a2454ce7d14f7c75161c79..a1bdabe2b33ea50d44fcd335cc678b10621cd087 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,32 @@
-LIBUSB_CFLAGS := $(shell pkg-config --cflags libusb-1.0)
-LIBUSB_LIBS := $(shell pkg-config --libs libusb-1.0)
+# PC=PKG_CONFIG_PATH=/home/mj/src/libucw/run/lib/pkgconfig pkg-config
+PC=PKG_CONFIG_PATH=/opt/lib/pkgconfig pkg-config
 
-LIBPULSE_CFLAGS := $(shell pkg-config --cflags libpulse)
-LIBPULSE_LIBS := $(shell pkg-config --libs libpulse)
+LIBUSB_CFLAGS := $(shell $(PC) --cflags libusb-1.0)
+LIBUSB_LIBS := $(shell $(PC) --libs libusb-1.0)
 
-LIBUCW_PKG := /home/mj/src/libucw/run/lib/pkgconfig
-LIBUCW_CFLAGS := $(shell PKG_CONFIG_PATH=$(LIBUCW_PKG) pkg-config --cflags libucw)
-LIBUCW_LIBS := $(shell PKG_CONFIG_PATH=$(LIBUCW_PKG) pkg-config --libs libucw)
+LIBPULSE_CFLAGS := $(shell $(PC) --cflags libpulse)
+LIBPULSE_LIBS := $(shell $(PC) --libs libpulse)
+
+LIBUCW_CFLAGS := $(shell $(PC) --cflags libucw)
+LIBUCW_LIBS := $(shell $(PC) --libs libucw)
 
 CFLAGS=-O2 -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wredundant-decls -std=gnu99 $(LIBUCW_CFLAGS) $(LIBUSB_CFLAGS) $(LIBPULSE_CFLAGS) -g2
 LDLIBS=$(LIBUCW_LIBS) $(LIBUSB_LIBS) $(LIBPULSE_LIBS)
 
-all: ut
+all: ursaryd
+
+ursaryd: ursaryd.o mpd.o nocturn.o pulse.o pulse-ucw.o
 
-ut: ut.o pulse-ucw.o
+ursaryd.o: ursaryd.c ursaryd.h
+mpd.o: mpd.c ursaryd.h
+nocturn.o: nocturn.c ursaryd.h
+pulse.o: pulse.c ursaryd.h
+pulse-ucw.o: pulse-ucw.c ursaryd.h
 
 clean:
        rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name .depend -or -name .#*`
+       rm -f ursaryd
+
+install: all
+       install -m 755 ursaryd /usr/local/sbin/
+       install -m 755 burrow-ursary.service /etc/systemd/system/