mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-11 11:33:48 +00:00
Use gcc -E
instead of cpp
to fix macOS build (#1935)
* Use `gcc -E` instead of `cpp` to fix macOS build * -xc++ -> -xc
This commit is contained in:
parent
7445169e42
commit
93642f97bc
1 changed files with 4 additions and 3 deletions
7
Makefile
7
Makefile
|
@ -70,7 +70,7 @@ EXTRACTED_DIR := extracted/$(VERSION)
|
||||||
VENV := .venv
|
VENV := .venv
|
||||||
|
|
||||||
MAKE = make
|
MAKE = make
|
||||||
CPPFLAGS += -fno-dollars-in-identifiers -P
|
CPPFLAGS += -P -xc -fno-dollars-in-identifiers
|
||||||
|
|
||||||
ifeq ($(DEBUG),1)
|
ifeq ($(DEBUG),1)
|
||||||
CFLAGS += -DOOT_DEBUG=1
|
CFLAGS += -DOOT_DEBUG=1
|
||||||
|
@ -92,7 +92,6 @@ else
|
||||||
ifeq ($(UNAME_S),Darwin)
|
ifeq ($(UNAME_S),Darwin)
|
||||||
DETECTED_OS=macos
|
DETECTED_OS=macos
|
||||||
MAKE=gmake
|
MAKE=gmake
|
||||||
CPPFLAGS += -xc++
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -136,7 +135,9 @@ INC := -Iinclude -Iinclude/libc -Isrc -I$(BUILD_DIR) -I. -I$(EXTRACTED_DIR)
|
||||||
# Check code syntax with host compiler
|
# Check code syntax with host compiler
|
||||||
CHECK_WARNINGS := -Wall -Wextra -Wno-format-security -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-variable -Wno-missing-braces
|
CHECK_WARNINGS := -Wall -Wextra -Wno-format-security -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-variable -Wno-missing-braces
|
||||||
|
|
||||||
CPP := cpp
|
# The `cpp` command behaves differently on macOS (it behaves as if
|
||||||
|
# `-traditional-cpp` was passed) so we use `gcc -E` instead.
|
||||||
|
CPP := gcc -E
|
||||||
MKLDSCRIPT := tools/mkldscript
|
MKLDSCRIPT := tools/mkldscript
|
||||||
MKDMADATA := tools/mkdmadata
|
MKDMADATA := tools/mkdmadata
|
||||||
ELF2ROM := tools/elf2rom
|
ELF2ROM := tools/elf2rom
|
||||||
|
|
Loading…
Add table
Reference in a new issue