diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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) |