PolymorphicEngine
Barry Initial commit 646db1c (3 years, 5 months ago)diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..066fdbc --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +PRODUCT = poly_original + +CC=gcc +CFLAGS= +LFLAGS=-T script.ld + +C_SOURCES := $(shell find src -name '*.c') +OBJS = $(sort $(subst src/,build/,$(subst .c,.o,$(C_SOURCES)))) + +$(PRODUCT): $(OBJS) + @echo "LINKING $(PRODUCT)..." + @$(CC) -o $@ $^ $(LFLAGS) + +clean: + @echo "REMOVING OBJECT FILES..." + @touch build/main.o + @rm $(OBJS) + +build/%.o: src/%.c + @echo "COMPILING $<..." + @$(CC) -c $< -o $@ $(CFLAGS)