Starship/tools/Makefile
Ryan Myers 065b566eb6
Makefile Changes (#40)
* Remove existing recomp

* Compile ido-static-recomp instead of relying on precompiled version. Also introduce makefile changes to allow aarch64 devices to compile.

* Get mio0 from the source, and build it in the init.

* Workaround for sm64tools not ignoring it's build files.

* Fix cflags

* Fancy colours for build system

* Remove sm64tools submodule and just take the minimum required files instead.

* Remove ido-static-recomp submodule and just fetch latest from GH instead.

* Add support for using a venv in python.

* remove mio0-decompressor temp

* Fix the mio0-decompress files being somehow missing.

* Fix stray message about "fix_checksum"

* Update logo to be a VAR, and have a failed build say FAILED

* Add checksum fix back in.
2023-12-04 18:36:31 -03:00

36 lines
920 B
Makefile

CC = gcc
UNAME_S := $(shell uname -s)
ifeq ($(OS),Windows_NT)
$(error Native Windows is currently unsupported for building this repository, use WSL instead c:)
else ifeq ($(UNAME_S),Linux)
DETECTED_OS := linux
else ifeq ($(UNAME_S),Darwin)
DETECTED_OS := mac
endif
RECOMP_DIR := ido-recomp/$(DETECTED_OS)
default: all
all: recomp mio0
clean:
$(RM) -rf $(RECOMP_DIR)
$(RM) mio0
distclean: clean
recomp:
@echo "Fetching Recomp..."
wget https://github.com/decompals/ido-static-recomp/releases/download/v1.0/ido-5.3-recomp-${DETECTED_OS}.tar.gz
mkdir -p $(RECOMP_DIR)
tar xf ido-5.3-recomp-${DETECTED_OS}.tar.gz -C $(RECOMP_DIR)
$(RM) ido-5.3-recomp-${DETECTED_OS}.tar.gz
mio0:
@echo "Building mio0..."
$(CC) -Wall -Wextra -Wno-format-overflow -O2 -ffunction-sections -fdata-sections -DMIO0_STANDALONE -s -Wl,--gc-sections -o mio0 mio0-decompressor/libmio0.c
.PHONY: all clean distclean default