out = ircbot obj = obj/ warnings = -Wall -Wpedantic cc = cc all: if [ ! -d obj ]; then mkdir obj; fi $(cc) $(dbg) $(warnings) -c src/common.c -o $(obj)common.o #$(cc) $(dbg) $(warnings) -std=$(std) -c src/config.c -o $(obj)config.o $(cc) $(dbg) $(warnings) src/main.c $(obj)/* -o $(out) debug: make all dbg="-g" clean: rm -rvf $(obj)*.o