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.
This commit is contained in:
snow flurry 2020-11-17 13:31:23 -08:00
parent 02b23c4187
commit 82157919e9

23
Makefile Normal file
View file

@ -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