]> www.average.org Git - pulsecounter.git/blobdiff - linux/Makefile
fix config parser
[pulsecounter.git] / linux / Makefile
index c23a47b6eeface90a477be7235c1bb76bfe7091e..bbf694c8322dd050ce5c384446cd54a62ab597a1 100644 (file)
@@ -1,16 +1,23 @@
-CFLAGS += -I$(BLUEZ) `pkg-config --cflags glib-2.0`
+CFLAGS += -g -I$(BLUEZ) `pkg-config --cflags glib-2.0` \
+       `pkg-config mariadb --cflags`
 LDLIBS = $(BLUEZ)/lib/.libs/libbluetooth-internal.a \
        $(BLUEZ)/src/.libs/libshared-glib.a \
-       `pkg-config --libs glib-2.0`
+       `pkg-config --libs glib-2.0` \
+       `pkg-config mariadb --libs`
 
 all: pulsecounter
 
-pulsecounter: pulsecounter.o \
+pulsecounter.o: pulsecounter.c dbstore.h
+
+dbstore.o: dbstore.c dbstore.h
+
+pulsecounter: pulsecounter.o dbstore.o \
        $(BLUEZ)/attrib/att.o $(BLUEZ)/attrib/gatt.o \
        $(BLUEZ)/attrib/gattrib.o $(BLUEZ)/btio/btio.o \
        $(BLUEZ)/attrib/utils.o $(BLUEZ)/src/log.o
        $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
 
-
-#      $(BLUEZ)/attrib/interactive.o \
-#      $(BLUEZ)/client/display.o
+testconf: dbstore.c dbstore.h
+       $(CC) -g `pkg-config --cflags glib-2.0` `pkg-config mariadb --cflags` \
+               -DTEST_CONFIG $< `pkg-config --libs glib-2.0` \
+               `pkg-config mariadb --libs` -o $@