summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>2020-11-25 09:30:16 -0500
committerhuderlem <huderlem@gmail.com>2020-12-30 20:22:56 -0600
commit293e28b85ddfa9acef28bbfb9c0c5f6faee7e831 (patch)
tree7e37a4546eda5d4f232f5cc76825d4682cd599c2
parent74e171579e0bbefbd72b83f3764fe504464bbdbe (diff)
Add support for building agbcc without devkitPro
-rw-r--r--libc/Makefile6
-rw-r--r--libgcc/Makefile7
2 files changed, 13 insertions, 0 deletions
diff --git a/libc/Makefile b/libc/Makefile
index 48bfa40..c377f1a 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -1,4 +1,10 @@
+ifneq (,$(wildcard $(DEVKITARM)/base_tools))
include $(DEVKITARM)/base_tools
+else
+PREFIX := arm-none-eabi-
+export AR := $(PREFIX)ar
+export AS := $(PREFIX)as
+endif
SHELL := /bin/bash -o pipefail
diff --git a/libgcc/Makefile b/libgcc/Makefile
index b149037..721d9d2 100644
--- a/libgcc/Makefile
+++ b/libgcc/Makefile
@@ -1,4 +1,11 @@
+ifneq (,$(wildcard $(DEVKITARM)/base_tools))
include $(DEVKITARM)/base_tools
+else
+PREFIX := arm-none-eabi-
+export AR := $(PREFIX)ar
+export AS := $(PREFIX)as
+endif
+
CC1 = ../old_agbcc
libgcc.a: libgcc1.a libgcc2.a fp-bit.o dp-bit.o