summaryrefslogtreecommitdiff
path: root/src/grapes/test/Makefile
blob: ddcc36f9721dcd1a5721ddc6784d73505b1bdd90 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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)