summaryrefslogtreecommitdiff
path: root/libagbsyscall
diff options
context:
space:
mode:
authorluckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>2020-11-25 09:20:45 -0500
committerluckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com>2020-11-25 09:20:45 -0500
commit15362958722fe6d3070d1911a5a9edd7e7b41c58 (patch)
tree7e49095c0f410b1200daa6fc48e349f2b3baa903 /libagbsyscall
parent70b6e05a47fc2e38d4f90cc2145f4d3d23a92793 (diff)
Add support for dkp-less instructions.
Todo: actually test building with dkP.
Diffstat (limited to 'libagbsyscall')
-rw-r--r--libagbsyscall/Makefile33
1 files changed, 15 insertions, 18 deletions
diff --git a/libagbsyscall/Makefile b/libagbsyscall/Makefile
index 911cdb237..6c0ba681e 100644
--- a/libagbsyscall/Makefile
+++ b/libagbsyscall/Makefile
@@ -1,30 +1,27 @@
TOOLCHAIN := $(DEVKITARM)
COMPARE ?= 0
-ifeq ($(CC),)
-HOSTCC := gcc
-else
-HOSTCC := $(CC)
-endif
-
-ifeq ($(CXX),)
-HOSTCXX := g++
+# check if dkP's base_tools makefile exists
+ifneq (,$(wildcard $(TOOLCHAIN)/base_tools))
+ include $(TOOLCHAIN)/base_tools
+# otherwise, either use the bin files or the
+# arm-none-eabi binaries on the system
else
-HOSTCXX := $(CXX)
+ ifneq ($(TOOLCHAIN),)
+ export PATH := $(TOOLCHAIN)/bin:$(PATH)
+ endif
+ PREFIX := arm-none-eabi-
+ OBJCOPY := $(PREFIX)objcopy
+ export MODERNCC := $(PREFIX)gcc
+ export AS := $(PREFIX)as
endif
-ifneq (,$(wildcard $(TOOLCHAIN)/base_tools))
-include $(TOOLCHAIN)/base_tools
+ifneq ($(TOOLCHAIN),)
+export CPP := $(PREFIX)cpp
else
-export PATH := $(TOOLCHAIN)/bin:$(PATH)
-PREFIX := arm-none-eabi-
-OBJCOPY := $(PREFIX)objcopy
-export CC := $(PREFIX)gcc
-export AS := $(PREFIX)as
+export CPP := $(CC) -E
endif
-export CPP := $(PREFIX)cpp
export LD := $(PREFIX)ld
-
ifeq ($(OS),Windows_NT)
EXE := .exe
else