tic2mqtt-c/Makefile
2021-08-21 15:15:21 +02:00

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