include comm.mk

CFLAGS += -D_GNU_SOURCE -lrt
CFLAGS += -std=c99

TARGET := AIVoiceSystem

OBJFILES = src/duerapp.o
OBJFILES += src/duerapp_alert.o
OBJFILES += src/duerapp_event.o
OBJFILES += src/duerapp_media.o
OBJFILES += src/duerapp_profile_config.o
OBJFILES += src/duerapp_recorder.o
OBJFILES += src/button.o

CFLAGS += $(shell pkg-config --cflags --libs gstreamer-1.0)
LDLIBS += -lm \
    -lrt \
    -lasound \
	-lwiringPi \
    $(shell pkg-config --cflags --libs gstreamer-1.0)

all: $(TARGET)

$(TARGET) : $(OBJFILES)
	$(CC) $(OBJFILES) $(CFLAGS) $(LDLIBS) -o $(TARGET)

clean:
	-rm -f *.o  $(TARGET) $(OBJFILES)