diff options
Diffstat (limited to 'berry_fix')
-rw-r--r-- | berry_fix/Makefile | 35 | ||||
-rw-r--r-- | berry_fix/payload/Makefile | 35 |
2 files changed, 32 insertions, 38 deletions
diff --git a/berry_fix/Makefile b/berry_fix/Makefile index 0ead3804f..6aab4ed62 100644 --- a/berry_fix/Makefile +++ b/berry_fix/Makefile @@ -1,29 +1,26 @@ TOOLCHAIN := $(DEVKITARM) COMPARE ?= 0 -ifeq ($(CC),) -HOSTCC := gcc -else -HOSTCC := $(CC) -endif - -ifeq ($(CXX),) -HOSTCXX := g++ -else -HOSTCXX := $(CXX) +# don't use dkP's base_tools anymore +# because the redefinition of $(CC) conflicts +# with when we want to use $(CC) to preprocess files +# thus, manually create the variables for the bin +# files, or use arm-none-eabi binaries on the system +# if dkP is not installed on tihs system + +ifneq ($(wildcard $(TOOLCHAIN)/bin),) +export PATH := $(TOOLCHAIN)/bin:$(PATH) endif -ifneq (,$(wildcard $(TOOLCHAIN)/base_tools)) -include $(TOOLCHAIN)/base_tools -else -export PATH := $(TOOLCHAIN)/bin:$(PATH) PREFIX := arm-none-eabi- OBJCOPY := $(PREFIX)objcopy -export CC := $(PREFIX)gcc -export AS := $(PREFIX)as -endif -export CPP := $(PREFIX)cpp -export LD := $(PREFIX)ld +AS := $(PREFIX)as +CPP := $(CC) -E +LD := $(PREFIX)ld + +# note: the makefile must be set up so MODERNCC is never called +# if MODERN=0 +MODERNCC := $(PREFIX)gcc ifeq ($(OS),Windows_NT) EXE := .exe diff --git a/berry_fix/payload/Makefile b/berry_fix/payload/Makefile index a121fda93..ad8787c34 100644 --- a/berry_fix/payload/Makefile +++ b/berry_fix/payload/Makefile @@ -1,29 +1,26 @@ TOOLCHAIN := $(DEVKITARM) COMPARE ?= 0 -ifeq ($(CC),) -HOSTCC := gcc -else -HOSTCC := $(CC) -endif - -ifeq ($(CXX),) -HOSTCXX := g++ -else -HOSTCXX := $(CXX) +# don't use dkP's base_tools anymore +# because the redefinition of $(CC) conflicts +# with when we want to use $(CC) to preprocess files +# thus, manually create the variables for the bin +# files, or use arm-none-eabi binaries on the system +# if dkP is not installed on tihs system + +ifneq ($(wildcard $(TOOLCHAIN)/bin),) +export PATH := $(TOOLCHAIN)/bin:$(PATH) endif -ifneq (,$(wildcard $(TOOLCHAIN)/base_tools)) -include $(TOOLCHAIN)/base_tools -else -export PATH := $(TOOLCHAIN)/bin:$(PATH) PREFIX := arm-none-eabi- OBJCOPY := $(PREFIX)objcopy -export CC := $(PREFIX)gcc -export AS := $(PREFIX)as -endif -export CPP := $(PREFIX)cpp -export LD := $(PREFIX)ld +AS := $(PREFIX)as +CPP := $(CC) -E +LD := $(PREFIX)ld + +# note: the makefile must be set up so MODERNCC is never called +# if MODERN=0 +MODERNCC := $(PREFIX)gcc ifeq ($(OS),Windows_NT) EXE := .exe |