mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 06:40:15 +00:00
Use iconv from Homebrew on macOS (#2374)
* Use iconv from Homebrew on macOS * Use `brew --prefix`
This commit is contained in:
parent
4873788e2d
commit
bdb3656af9
3 changed files with 19 additions and 5 deletions
9
Makefile
9
Makefile
|
@ -266,6 +266,13 @@ OBJCOPY := $(MIPS_BINUTILS_PREFIX)objcopy
|
|||
OBJDUMP := $(MIPS_BINUTILS_PREFIX)objdump
|
||||
NM := $(MIPS_BINUTILS_PREFIX)nm
|
||||
|
||||
# The default iconv on macOS has some differences from GNU iconv, so we use the Homebrew version instead
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
ICONV := $(shell brew --prefix)/opt/libiconv/bin/iconv
|
||||
else
|
||||
ICONV := iconv
|
||||
endif
|
||||
|
||||
INC := -Iinclude -Iinclude/libc -Isrc -I$(BUILD_DIR) -I. -I$(EXTRACTED_DIR)
|
||||
|
||||
# Check code syntax with host compiler
|
||||
|
@ -598,7 +605,7 @@ $(BUILD_DIR)/assets/misc/z_select_static/%.o: GBI_DEFINES := -DF3DEX_GBI
|
|||
|
||||
ifeq ($(PERMUTER),) # permuter + preprocess.py misbehaves, permuter doesn't care about rodata diffs or bss ordering so just don't use it in that case
|
||||
# Handle encoding (UTF-8 -> EUC-JP) and custom pragmas
|
||||
$(BUILD_DIR)/src/%.o: CC := ./tools/preprocess.sh -v $(VERSION) -- $(CC)
|
||||
$(BUILD_DIR)/src/%.o: CC := ./tools/preprocess.sh -v $(VERSION) -i $(ICONV) -- $(CC)
|
||||
endif
|
||||
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue