out = cnetbench std = c99 warnings = -Wall -Wpedantic cc = cc obj = obj/ all: 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)