diff options
Diffstat (limited to 'src/grapes/test/Makefile')
-rw-r--r-- | src/grapes/test/Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/grapes/test/Makefile b/src/grapes/test/Makefile new file mode 100644 index 0000000..ddcc36f --- /dev/null +++ b/src/grapes/test/Makefile @@ -0,0 +1,30 @@ +.PHONY: clean, mrproper + +CC = gcc +CFLAGS = -nostdlib -nostartfiles -nodefaultlibs -fno-builtin -fno-stack-protector -Wall -Wextra + +LD = ld +LDFLAGS = -T ../link.ld + +Objects = main.o +Outfile = test + +all: $(Outfile) + echo "* Done with $(Outfile)" + +rebuild: mrproper all + +$(Outfile): $(Objects) + echo "* Linking $@..." + $(LD) $(LDFLAGS) -o $@ $^ + +%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ + +clean: + echo "* Removing objects..." + rm $(Objects) + +mrproper: clean + rm $(Outfile) + |