summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8ddfc99..2a5996c 100644
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,17 @@ out = cnetbench
std = c99
warnings = -Wall -Wpedantic
cc = cc
+obj = obj/
all:
- $(cc) $(dbg) $(warnings) -std=$(std) src/main.c -o $(out)
+ if [[ ! -d $(obj) ]]; then mkdir $(obj); fi
+ $(cc) $(dbg) $(warnings) -std=$(std) -c src/test.c -o $(obj)test.o
+ $(cc) $(dbg) $(warnings) -std=$(std) -c src/common.c -o $(obj)common.o
+ $(cc) $(dbg) $(warnings) -std=$(std) src/main.c $(obj)/* -o $(out)
debug:
make all dbg="-g"
+
+clean:
+ rm -rf $(obj)/*.o
+ rm -f $(out)

Generated by cgit