libmqtt/Makefile.linux
Johannes Schriewer fb938637cc Compile in DEBUG mode for now
Note to self: Modify makefile to output two libs, one debug, one release
2018-07-28 20:38:41 +02:00

29 lines
477 B
Text

SRCS=src/mqtt.c src/packet.c src/protocol.c src/debug.c platform/linux.c
OBJS=$(SRCS:%.c=%.o)
TARGET=libmqtt.a
PLATFORM_FLAGS=-DMAX_BUFFER_SIZE=256 -DDEBUG=1
AR=ar
CC=clang
CFLAGS=-g -Os -Wall -pthread -I./platform -I./src $(PLATFORM_FLAGS)
all: $(TARGET)
test: $(TARGET)
$(MAKE) -C tests
$(TARGET): $(OBJS)
$(AR) -cr $(TARGET) $(OBJS)
%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
mqtt.o: mqtt.h
clean:
$(MAKE) -C tests clean
rm -f $(TARGET)
rm -f $(OBJS)
rm -rf docs/