2 UCW_CFLAGS := $(shell $(PC) --cflags libucw)
3 UCW_LIBS := $(shell $(PC) --libs libucw)
4 USB_CFLAGS := $(shell $(PC) --cflags libusb-1.0)
5 USB_LIBS := $(shell $(PC) --libs libusb-1.0)
6 UCW_USB = ../../ucw-libusb
8 CFLAGS=-O2 -Wall -Wextra -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes $(UCW_CFLAGS) $(USB_CFLAGS) -I$(UCW_USB)
9 LDLIBS=$(UCW_LIBS) $(USB_LIBS) -lmosquitto
13 burrow-clock: burrow-clock.o usb-mainloop.o usb-helper.o
15 burrow-clock.o: burrow-clock.c $(UCW_USB)/usb-helper.h
17 %.o: $(UCW_USB)/%.c $(UCW_USB)/usb-mainloop.h $(UCW_USB)/usb-helper.h
18 $(CC) $(CFLAGS) -c -o $@ $<
21 install burrow-clock /usr/local/sbin/
24 rm -f burrow-clock *.o