tic2mqtt/Makefile

25 lines
388 B
Makefile

SRCS = tic2mqtt.c tic.c mqtt.c homeassistant.c logger.c
OBJS = $(SRCS:%.c=%.o)
LIBS = -lmosquitto -ljson-c
CFLAGS += -Wall -Werror
DEPFLAGS = -MT $@ -MMD -MP -MF .$*.d
DEPS=$(SRCS:%.c=.%.d)
CFLAGS += $(DEPFLAGS)
all: tic2mqtt
tic2mqtt: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
clean:
rm -f tic2mqtt $(OBJS) $(DEPS)
$(OBJS): $(MAKEFILE_LIST)
-include $(DEPS)
.PHONY: all clean