SRC=$(wildcard *.c) OBJ=$(SRC:%.c=objects/%.o) CFLAGS=-static -nostdlib -fno-stack-protector -Wno-implicit-function-declaration -fno-builtin -g default_target: smash objects/%.o: %.c @echo Building $< @-mkdir -p $$(dirname $@) @gcc -c $< -o $@ ${CFLAGS} smash: ${OBJ} @echo Buliding Smash @gcc ${OBJ} ../lib/slib.a -o smash ${CFLAGS} clean: @echo Cleaning Up Smash @rm -r objects smash