aboutsummaryrefslogtreecommitdiff
path: root/common.mk
blob: 19a7dcd01511749fc9a83dcf86a899d4c5b85b8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
TOOLPRE:=arm-none-eabi-
CC:=$(TOOLPRE)gcc -ffreestanding -march=armv5te -mabi=aapcs-linux -mthumb
LD:=$(TOOLPRE)ld
#CC:=clang -target arm-none-eabi -ffreestanding -march=armv5te -mabi=aapcs-linux -mthumb
#LD:=ld.lld -m armelf
CFLAGS:=-O2 -Wall -Wextra
.PHONY:	all clean
LDFLAGS:=-Ttext 0xa0200000 -e start

$(TARGET):	$(OBJS)
	$(LD) $(LDFLAGS) -o $@ $^

clean:
	rm -f *.o $(TARGET)