mirror of
https://github.com/pret/pokediamond.git
synced 2026-10-01 12:56:48 -05:00
add macOS support
This commit is contained in:
29
INSTALL.md
29
INSTALL.md
@@ -48,6 +48,35 @@ Install them using either the Cygwin package manager or using pacman on Msys2.
|
||||
|
||||
**NOTE FOR MSYS2:** You will need to compile and install [libpng](https://www.libpng.org/pub/png/libpng.html) from source.
|
||||
|
||||
#### macOS
|
||||
|
||||
**macOS 10.14 Mojave or older is required**. macOS 10.15 Catalina is not supported due to missing support for 32-bit binaries (thus making wine emulation unfeasible). You will also require the following packages:
|
||||
|
||||
* GNU make
|
||||
* LLVM 8 clang compiler
|
||||
* gcc@5 (for mwasmarm_patcher)
|
||||
* arm-gcc-bin
|
||||
* git
|
||||
* libpng
|
||||
* wine-stable and xquartz dependency
|
||||
|
||||
They can be installed with the following commands:
|
||||
|
||||
```console
|
||||
$ brew tap osx-cross/homebrew-arm
|
||||
$ brew tap homebrew/cask-versions
|
||||
$ brew install make llvm@8 gcc@5 arm-gcc-bin libpng git
|
||||
$ brew install --cask xquartz
|
||||
$ brew install --cask --no-quarantine wine-stable
|
||||
```
|
||||
|
||||
To build the project, run the below commands:
|
||||
|
||||
```console
|
||||
$ export PATH=/usr/local/opt/llvm@8/bin:$PATH SHA1SUM=shasum CC=clang CXX=clang++
|
||||
$ gmake
|
||||
```
|
||||
|
||||
### 4. Build ROM
|
||||
|
||||
Run `make` to build the ROM. The ROM will be output as `build/diamond.us/pokediamond.us.nds`
|
||||
|
||||
4
Makefile
4
Makefile
@@ -109,7 +109,11 @@ LDFLAGS = -map -nodead -w off -proc v5te -interworking -map -symtab -m _start
|
||||
|
||||
# DS TOOLS
|
||||
TOOLS_DIR = tools
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SHA1SUM = shasum
|
||||
else
|
||||
SHA1SUM = sha1sum
|
||||
endif
|
||||
CSV2BIN = $(TOOLS_DIR)/csv2bin/csv2bin$(EXE)
|
||||
JSONPROC = $(TOOLS_DIR)/jsonproc/jsonproc$(EXE)
|
||||
O2NARC = $(TOOLS_DIR)/o2narc/o2narc$(EXE)
|
||||
|
||||
@@ -96,7 +96,12 @@ LDFLAGS = -map -nodead -w off -proc v4t -interworking -map -symtab -m _start
|
||||
####################### Other Tools #########################
|
||||
|
||||
# DS TOOLS
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SHA1SUM = shasum
|
||||
else
|
||||
SHA1SUM = sha1sum
|
||||
endif
|
||||
JSONPROC = $(TOOLS_DIR)/jsonproc/jsonproc
|
||||
GFX = $(TOOLS_DIR)/nitrogfx/nitrogfx
|
||||
SCANINC = $(TOOLS_DIR)/scaninc/scaninc$(EXE)
|
||||
|
||||
@@ -120,11 +120,16 @@ STATIC_LIBS := $(addprefix $(BUILD_DIR)/lib/,libsyscall.a)
|
||||
####################### Other Tools #########################
|
||||
|
||||
# DS TOOLS
|
||||
ifndef BUSYBOX
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SHA1SUM = shasum
|
||||
else
|
||||
ifdef BUSYBOX
|
||||
SHA1SUM = sha1sum --quiet
|
||||
else
|
||||
SHA1SUM = sha1sum
|
||||
endif
|
||||
endif
|
||||
JSONPROC = $(TOOLS_DIR)/jsonproc/jsonproc$(EXE)
|
||||
GFX = $(TOOLS_DIR)/nitrogfx/nitrogfx$(EXE)
|
||||
SCANINC = $(TOOLS_DIR)/scaninc/scaninc$(EXE)
|
||||
|
||||
@@ -8,7 +8,7 @@ else
|
||||
C_SRCS :=
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
LDFLAGS += -lstdc++ -lc++ -lc
|
||||
LDFLAGS += -lstdc++ -lc++ -lc /usr/local/opt/llvm@8/lib/libc++fs.a -O2 -Wall -Wno-switch
|
||||
else
|
||||
LDFLAGS += -lstdc++fs
|
||||
endif
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
.PHONY: all clean
|
||||
|
||||
UNAME_S := $(shell uname -s)
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
CC := gcc-5
|
||||
else
|
||||
CC := gcc
|
||||
endif
|
||||
CFLAGS := -O3
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
Reference in New Issue
Block a user