tic2mqtt-c/Makefile

25 lines
388 B
Makefile
Raw Permalink Normal View History

2021-08-04 12:24:08 +02:00
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