aboutsummaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
authorTakamichi Horikawa <myon@myon98.net>2021-12-04 13:41:35 +0900
committerTakamichi Horikawa <myon@myon98.net>2021-12-04 13:41:35 +0900
commit74fe5e24beb14b00ce3d69e5a3010c520d4bf8e5 (patch)
tree7977c7d2df8f02bdea1a2fc0dd50df000eb044e6 /common.mk
Initial: vram write test
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk14
1 files changed, 14 insertions, 0 deletions
diff --git a/common.mk b/common.mk
new file mode 100644
index 0000000..19a7dcd
--- /dev/null
+++ b/common.mk
@@ -0,0 +1,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)