mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-01-23 21:45:00 +03:00
d7d9e472c3
* Fixed MacOS compilation * Updated spimdisasm requirement to use latest develop * Updated README * Fixed python requirements * Readded --gc-sections on mio0 * Added a conditional flag for gc-sections * Fixed indentation errors
38 lines
960 B
Makefile
38 lines
960 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
|
|
MIO0_FLAGS := --gc-sections
|
|
else ifeq ($(UNAME_S),Darwin)
|
|
DETECTED_OS := macos
|
|
MIO0_FLAGS :=
|
|
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,${MIO0_FLAGS} -o mio0 mio0-decompressor/libmio0.c
|
|
|
|
.PHONY: all clean distclean default
|