summaryrefslogtreecommitdiff
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..4ce05bc
--- /dev/null
+++ b/makefile
@@ -0,0 +1,24 @@
1include config.mk
2
3SIMPLE=bin/simple
4SIMPLE_OBJ_FILES=obj/simple.o
5
6release: $(SIMPLE)
7release: CFLAGS+=-DNDEBUG -O2
8
9debug: $(SIMPLE)
10debug: CFLAGS+=-g
11
12$(SIMPLE): $(SIMPLE_OBJ_FILES) | bin
13 cc $(LDFLAGS) $^ -o $@
14
15obj/%.o: src/%.c | obj
16 cc $(CFLAGS) -c $< -o $@
17
18bin obj:
19 mkdir -p $@
20
21clean:
22 rm -rf bin obj
23
24.PHONY: release debug clean