]> mj.ucw.cz Git - ursary.git/blob - Makefile
Better IR control of lights
[ursary.git] / Makefile
1 # PC=PKG_CONFIG_PATH=/home/mj/src/libucw/run/lib/pkgconfig pkg-config
2 PC=PKG_CONFIG_PATH=/opt/lib/pkgconfig pkg-config
3
4 LIBUSB_CFLAGS := $(shell $(PC) --cflags libusb-1.0)
5 LIBUSB_LIBS := $(shell $(PC) --libs libusb-1.0)
6
7 LIBPULSE_CFLAGS := $(shell $(PC) --cflags libpulse)
8 LIBPULSE_LIBS := $(shell $(PC) --libs libpulse)
9
10 LIBUCW_CFLAGS := $(shell $(PC) --cflags libucw)
11 LIBUCW_LIBS := $(shell $(PC) --libs libucw)
12
13 CFLAGS=-O2 -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wno-sign-compare -Wredundant-decls -std=gnu99 $(LIBUCW_CFLAGS) $(LIBUSB_CFLAGS) $(LIBPULSE_CFLAGS) -g2
14 LDLIBS=$(LIBUCW_LIBS) $(LIBUSB_LIBS) $(LIBPULSE_LIBS) -lmosquitto
15
16 all: ursaryd
17
18 ursaryd: ursaryd.o mpd.o nocturn.o pulse.o pulse-ucw.o usb.o mqtt.o
19
20 ursaryd.o: ursaryd.c ursaryd.h usb.h
21 mpd.o: mpd.c ursaryd.h
22 nocturn.o: nocturn.c ursaryd.h usb.h
23 pulse.o: pulse.c ursaryd.h
24 pulse-ucw.o: pulse-ucw.c ursaryd.h
25 usb.o: usb.c ursaryd.h usb.h
26 mqtt.o: mqtt.c ursaryd.h
27
28 clean:
29         rm -f `find . -name "*~" -or -name "*.[oa]" -or -name "\#*\#" -or -name TAGS -or -name core -or -name .depend -or -name .#*`
30         rm -f ursaryd
31
32 install: all
33         install -m 755 ursaryd /usr/local/sbin/
34         # install -m 755 burrow-ursary.service /etc/systemd/system/