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:
parent
02b23c4187
commit
82157919e9
23
Makefile
Normal file
23
Makefile
Normal 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
|
Loading…
Reference in a new issue