summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile11
1 files changed, 5 insertions, 6 deletions
diff --git a/makefile b/makefile
index 2365415..03e0931 100644
--- a/makefile
+++ b/makefile
@@ -1,17 +1,16 @@
1include config.mk 1include config.mk
2 2
3BINARY=bin/client 3SUBSCRIBE=bin/subscribe
4 4
5SRC_FILES=$(wildcard src/*.c) 5SUBSCRIBE_OBJ_FILES=obj/subscribe.o obj/mqtt.o
6OBJ_FILES=$(patsubst src/%.c,obj/%.o,$(SRC_FILES))
7 6
8release: $(BINARY) 7release: $(SUBSCRIBE)
9release: CFLAGS+=-DNDEBUG -O2 8release: CFLAGS+=-DNDEBUG -O2
10 9
11debug: $(BINARY) 10debug: $(SUBSCRIBE)
12debug: CFLAGS+=-g 11debug: CFLAGS+=-g
13 12
14$(BINARY): $(OBJ_FILES) | bin 13$(SUBSCRIBE): $(SUBSCRIBE_OBJ_FILES) | bin
15 cc $(LDFLAGS) $^ -o $@ 14 cc $(LDFLAGS) $^ -o $@
16 15
17obj/%.o: src/%.c src/config.h | obj 16obj/%.o: src/%.c src/config.h | obj