diff options
Diffstat (limited to 'libagbsyscall')
-rw-r--r-- | libagbsyscall/Makefile | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/libagbsyscall/Makefile b/libagbsyscall/Makefile index 76368da86..78f246af4 100644 --- a/libagbsyscall/Makefile +++ b/libagbsyscall/Makefile @@ -6,7 +6,7 @@ COMPARE ?= 0 # 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 +# if dkP is not installed on this system ifneq (,$(TOOLCHAIN)) ifneq ($(wildcard $(TOOLCHAIN)/bin),) @@ -17,8 +17,8 @@ endif PREFIX := arm-none-eabi- OBJCOPY := $(PREFIX)objcopy AS := $(PREFIX)as -CPP := $(CC) -E LD := $(PREFIX)ld +AR := $(PREFIX)ar # note: the makefile must be set up so MODERNCC is never called # if MODERN=0 @@ -30,6 +30,23 @@ else EXE := endif +# use arm-none-eabi-cpp for macOS +# as macOS's default compiler is clang +# and clang's preprocessor will warn on \u +# when preprocessing asm files, expecting a unicode literal +# we can't unconditionally use arm-none-eabi-cpp +# as installations which install binutils-arm-none-eabi +# don't come with it +ifneq ($(MODERN),1) + ifeq ($(shell uname -s),Darwin) + CPP := $(PREFIX)cpp + else + CPP := $(CC) -E + endif +else + CPP := $(PREFIX)cpp +endif + ASFLAGS := -mcpu=arm7tdmi ARFLAGS := rc |