From 82157919e9b756c6d53d078f2a0b9fd4c361b28d Mon Sep 17 00:00:00 2001 From: snow flurry Date: Tue, 17 Nov 2020 13:31:23 -0800 Subject: [PATCH] Add Makefile This only works with BSD make. Not sure if I'm going to keep it like that or convert it to a GNU Makefile. --- Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a1d26b2 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +CC := gcc +.ifdef DEBUG +CFLAGS := -DDEBUG -ggdb +.else +CFLAGS := +.endif + +.PHONY: all +all: config.o corrupt.o dosfs.o main.o + $(CC) $(CFLAGS) -o fk98 obj/config.o obj/corrupt.o obj/dosfs.o obj/main.o + +.PHONY: clean +clean: + rm -r ${.CURDIR}/obj + rm ${.CURDIR}/fk98 + +.SUFFIXES: .o +.PATH: src +.c.o: obj + $(CC) $(CFLAGS) -o obj/${.TARGET} -c ${.IMPSRC} + +obj: + mkdir obj