summaryrefslogtreecommitdiff
path: root/libagbsyscall
diff options
context:
space:
mode:
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