mirror of
https://github.com/project-slippi/Nintendont.git
synced 2025-10-05 16:13:14 +02:00
force mac/linux users to compile a local copy of bin2h
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -12,4 +12,5 @@ fatfs/*.a
|
||||
codehandler/*.h
|
||||
.vscode/*
|
||||
.idea/*
|
||||
!kernel/gecko/*.bin
|
||||
!kernel/gecko/*.bin
|
||||
kernel/bin2h/bin2h
|
||||
|
13
Makefile
13
Makefile
@@ -20,13 +20,20 @@ SUBPROJECTS := multidol kernel/asm resetstub \
|
||||
all: loader
|
||||
forced: clean all
|
||||
|
||||
# Force MacOS/Linux users to compile their own copy of bin2h
|
||||
bin2h: bin2h
|
||||
@echo " "
|
||||
@echo "Building bin2h"
|
||||
@echo " "
|
||||
$(MAKE) -C kernel/bin2h
|
||||
|
||||
multidol:
|
||||
@echo " "
|
||||
@echo "Building Multi-DOL loader"
|
||||
@echo " "
|
||||
$(MAKE) -C multidol
|
||||
|
||||
kernel/asm:
|
||||
kernel/asm: bin2h
|
||||
@echo " "
|
||||
@echo "Building asm files"
|
||||
@echo " "
|
||||
@@ -50,13 +57,13 @@ fatfs/libfat-ppc.a:
|
||||
@echo " "
|
||||
$(MAKE) -C fatfs -f Makefile.ppc
|
||||
|
||||
codehandler:
|
||||
codehandler: bin2h
|
||||
@echo " "
|
||||
@echo "Building Nintendont code handler"
|
||||
@echo " "
|
||||
$(MAKE) -C codehandler
|
||||
|
||||
kernel: kernel/asm fatfs/libfat-arm.a codehandler
|
||||
kernel: kernel/asm fatfs/libfat-arm.a codehandler bin2h
|
||||
@echo " "
|
||||
@echo "Building Nintendont kernel"
|
||||
@echo " "
|
||||
|
45
kernel/bin2h/Makefile
Normal file
45
kernel/bin2h/Makefile
Normal file
@@ -0,0 +1,45 @@
|
||||
TARGET := bin2h
|
||||
PLATFORM := none
|
||||
CFLAGS :=
|
||||
|
||||
# The Windows binary tracked in this repo seems alright, so just skip building
|
||||
# for Windows users. Otherwise, force MacOS/Linux users to compile their own
|
||||
# version to keep around locally. The UNIX binary should *not* be tracked in
|
||||
# this repository.
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
#TARGET = bin2h.exe
|
||||
#CFLAGS = -s -Os -static
|
||||
PLATFORM = windows
|
||||
else
|
||||
UNAME := $(shell uname -s)
|
||||
ifeq ($(UNAME),Darwin)
|
||||
CFLAGS = -s -Os
|
||||
PLATFORM = mac
|
||||
endif
|
||||
|
||||
ifeq ($(UNAME),Linux)
|
||||
CFLAGS = -m32 -s -Os -static
|
||||
PLATFORM = linux
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),none)
|
||||
$(error Couldnt detect platform - failed to compile bin2h)
|
||||
endif
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Targets
|
||||
|
||||
.PHONY: all clean
|
||||
all: $(TARGET)
|
||||
$(TARGET): main.c
|
||||
ifeq ($(OS),windows)
|
||||
@echo "Using prebuilt bin2h.exe ..."
|
||||
else
|
||||
@echo "Building bin2h ..."
|
||||
gcc $< $(CFLAGS) -o $@
|
||||
endif
|
||||
clean:
|
||||
@echo "cleaning bin2h ..."
|
||||
@rm -f $(TARGET)
|
Binary file not shown.
Reference in New Issue
Block a user