mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Support for MacOS on ARM (#456)
* initial attempt works on WSL, boutta test on macos * attempt 2 * Update Makefile
This commit is contained in:
@@ -37,3 +37,4 @@ m2cfiles/
|
||||
dkr_hot_reload.py
|
||||
lastRomPath.txt
|
||||
gcc_safe_files.mk
|
||||
*.DS_Store
|
||||
|
||||
@@ -184,7 +184,16 @@ LIB_DIRS := lib
|
||||
ASM_DIRS := asm asm/boot asm/assets lib/asm lib/asm/non_decompilable
|
||||
SRC_DIRS := $(sort $(patsubst %/,%,$(dir $(wildcard src/* src/**/* lib/src/* lib/src/**/* lib/src/**/**/*))))
|
||||
|
||||
GLOBAL_ASM_C_FILES != grep -rl 'GLOBAL_ASM(' $(SRC_DIRS)
|
||||
OS := $(shell uname)
|
||||
|
||||
# MacOS has a slightly different name for grep, so check to see if it needs to be used.
|
||||
ifeq ($(OS), Darwin)
|
||||
GREP_FILE := ggrep
|
||||
else
|
||||
GREP_FILE := grep
|
||||
endif
|
||||
|
||||
GLOBAL_ASM_C_FILES != $(GREP_FILE) -rl 'GLOBAL_ASM(' $(SRC_DIRS)
|
||||
GLOBAL_ASM_O_FILES = $(foreach file,$(GLOBAL_ASM_C_FILES),$(BUILD_DIR)/$(file:.c=.o))
|
||||
|
||||
S_FILES := $(foreach dir,$(ASM_DIRS),$(wildcard $(dir)/*.s))
|
||||
|
||||
+11
-1
@@ -5,10 +5,20 @@ CXX := g++
|
||||
CFLAGS := -I . -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 $(OPT) -s
|
||||
# List of specific errors to ignore
|
||||
IGNORE_W_ERRORS := -Wno-unused-parameter -Wno-misleading-indentation -Wno-extra
|
||||
CXXFLAGS := -I . -I dkr_assets_tool_src/ -Werror -Wall $(IGNORE_W_ERRORS) -std=c++17 $(OPT) -lpcre2-8
|
||||
CXXFLAGS := -I . -I dkr_assets_tool_src/ -std=c++17 $(OPT)
|
||||
LDFLAGS := -lm
|
||||
PROGRAMS := n64crc dkr_assets_tool
|
||||
|
||||
OS := $(shell uname)
|
||||
|
||||
# MacOS has a slightly different name for grep, so check to see if it needs to be used.
|
||||
ifeq ($(OS), Darwin)
|
||||
CXXFLAGS += -I/opt/homebrew/include
|
||||
LDFLAGS += -I/opt/homebrew/lib -lpcre2-8
|
||||
else
|
||||
CXXFLAGS += -Werror -Wall $(IGNORE_W_ERRORS) -lpcre2-8
|
||||
endif
|
||||
|
||||
BUILD_DIR := dkr_assets_tool_src/_build
|
||||
|
||||
ENUMS_HEADER := ../include/enums.h
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace fs = std::filesystem;
|
||||
|
||||
// Using path as a key doesn't seem to work on raspberry pi OS?
|
||||
struct PathHash {
|
||||
std::size_t operator()(const std::filesystem::__cxx11::path& p) const {
|
||||
std::size_t operator()(const std::filesystem::path& p) const {
|
||||
return std::filesystem::hash_value(p);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user