summaryrefslogtreecommitdiff
path: root/arm7
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2021-11-24 10:30:45 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2021-11-24 10:30:45 -0500
commitdf849f9676df54dafc97284cec8c00949e5571a6 (patch)
treef798bb34f7282f834527eb1c2bbe97808ea62326 /arm7
parentc619240caca34b085918f948da2aac55d1e76691 (diff)
Fix some more the building on macOS
Diffstat (limited to 'arm7')
-rw-r--r--arm7/Makefile18
1 files changed, 15 insertions, 3 deletions
diff --git a/arm7/Makefile b/arm7/Makefile
index 4f99c50b..882ab41c 100644
--- a/arm7/Makefile
+++ b/arm7/Makefile
@@ -3,12 +3,19 @@
.PHONY: clean tidy all default patch_mwasmarm
# Try to include devkitarm if installed
+ifdef DEVKITARM
TOOLCHAIN := $(DEVKITARM)
+endif
-ifneq (,$(wildcard $(TOOLCHAIN)/base_tools))
-include $(TOOLCHAIN)/base_tools
+ifdef TOOLCHAIN
+export PATH := $(TOOLCHAIN)/bin:$(PATH)
endif
+PREFIX := arm-none-eabi-
+
+OBJCOPY := $(PREFIX)objcopy
+AR := $(PREFIX)ar
+
### Default target ###
default: all
@@ -111,17 +118,20 @@ TOOLDIRS = $(dir $(wildcard $(TOOLS_DIR)/*/Makefile))
TOOLBASE = $(TOOLDIRS:$(TOOLS_DIR)/%=%)
TOOLS = $(foreach tool,$(TOOLBASE),$(TOOLS_DIR)/$(tool)/$(tool)$(EXE))
+TOOLS: tools
+
export LM_LICENSE_FILE := $(TOOLS_DIR)/mwccarm/license.dat
export MWCIncludes := lib/include
######################### Targets ###########################
+######################## Targets ###########################
infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
# Build tools when building the rom
# Disable dependency scanning for clean/tidy/tools
ifeq (,$(filter-out all,$(MAKECMDGOALS)))
-$(call infoshell, $(MAKE) tools patch_mwasmarm)
+$(call infoshell,$(MAKE) tools patch_mwasmarm)
else
NODEP := 1
endif
@@ -131,6 +141,8 @@ endif
MAKEFLAGS += --no-print-directory
+all: tools patch_mwasmarm
+
all: $(ROM)
ifeq ($(COMPARE),1)
@$(SHA1SUM) -c $(TARGET).sha1