git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

commit 4aa811df9e7794253ef3335135db4eb8955f90e1
parent f75ee7cc72ea5b776bc46040b88e4b41704b9b3c
Author: bbbbbr <reg+github@roughhousing.com>
Date:   Thu, 30 Dec 2021 11:16:10 -0800

Merge pull request #295 from gbdk-2020/ci-macos_version

CI-CD: macOS binary compatibility fixes for older OSes
Diffstat:
Mgbdk-support/bankpack/Makefile11+++++++++++
Mgbdk-support/gbcompress/Makefile11+++++++++++
Mgbdk-support/ihxcheck/Makefile12++++++++++++
Mgbdk-support/lcc/Makefile12++++++++++++
Mgbdk-support/png2asset/Makefile29++++++++++++++++++++++-------
5 files changed, 68 insertions(+), 7 deletions(-)

diff --git a/gbdk-support/bankpack/Makefile b/gbdk-support/bankpack/Makefile @@ -4,6 +4,17 @@ ifndef TARGETDIR TARGETDIR = /opt/gbdk endif +ifeq ($(OS),Windows_NT) + BUILD_OS := Windows_NT +else + BUILD_OS := $(shell uname -s) +endif + +# Target older macOS version than whatever build OS is for better compatibility +ifeq ($(BUILD_OS),Darwin) + export MACOSX_DEPLOYMENT_TARGET=10.10 +endif + CC = $(TOOLSPREFIX)gcc CFLAGS = -ggdb -O -Wno-incompatible-pointer-types -DGBDKLIBDIR=\"$(TARGETDIR)\" OBJ = bankpack.o files.o obj_data.o list.o path_ops.o diff --git a/gbdk-support/gbcompress/Makefile b/gbdk-support/gbcompress/Makefile @@ -4,6 +4,17 @@ ifndef TARGETDIR TARGETDIR = /opt/gbdk endif +ifeq ($(OS),Windows_NT) + BUILD_OS := Windows_NT +else + BUILD_OS := $(shell uname -s) +endif + +# Target older macOS version than whatever build OS is for better compatibility +ifeq ($(BUILD_OS),Darwin) + export MACOSX_DEPLOYMENT_TARGET=10.10 +endif + CC = $(TOOLSPREFIX)gcc CFLAGS = -ggdb -O -Wno-incompatible-pointer-types -DGBDKLIBDIR=\"$(TARGETDIR)\" OBJ = main.o gbcompress.o rlecompress.o files.o files_c_source.o diff --git a/gbdk-support/ihxcheck/Makefile b/gbdk-support/ihxcheck/Makefile @@ -4,11 +4,23 @@ ifndef TARGETDIR TARGETDIR = /opt/gbdk endif +ifeq ($(OS),Windows_NT) + BUILD_OS := Windows_NT +else + BUILD_OS := $(shell uname -s) +endif + +# Target older macOS version than whatever build OS is for better compatibility +ifeq ($(BUILD_OS),Darwin) + export MACOSX_DEPLOYMENT_TARGET=10.10 +endif + CC = $(TOOLSPREFIX)gcc CFLAGS = -ggdb -O -Wno-incompatible-pointer-types -DGBDKLIBDIR=\"$(TARGETDIR)\" OBJ = ihxcheck.o areas.o ihx_file.o BIN = ihxcheck + all: $(BIN) $(BIN): $(OBJ) diff --git a/gbdk-support/lcc/Makefile b/gbdk-support/lcc/Makefile @@ -8,6 +8,18 @@ endif BUILDDATE=$(shell date -u +%Y/%m/%d) BUILDTIME=$(shell date -u +%H:%M:%S) +ifeq ($(OS),Windows_NT) + BUILD_OS := Windows_NT +else + BUILD_OS := $(shell uname -s) +endif + +# Target older macOS version than whatever build OS is for better compatibility +ifeq ($(BUILD_OS),Darwin) + export MACOSX_DEPLOYMENT_TARGET=10.10 +endif + + CC = $(TOOLSPREFIX)gcc CFLAGS = -ggdb -O -Wno-incompatible-pointer-types -DGBDKLIBDIR=\"$(TARGETDIR)\" CFLAGS += -DBUILDDATE=\"$(BUILDDATE)\" -DBUILDTIME=\"$(BUILDTIME)\" diff --git a/gbdk-support/png2asset/Makefile b/gbdk-support/png2asset/Makefile @@ -8,6 +8,18 @@ CXX = $(TOOLSPREFIX)g++ CXXFLAGS = -Os -Wall -g LFLAGS = -g +ifeq ($(OS),Windows_NT) + BUILD_OS := Windows_NT +else + BUILD_OS := $(shell uname -s) +endif + +# Target older macOS version than whatever build OS is for better compatibility +ifeq ($(BUILD_OS),Darwin) + export MACOSX_DEPLOYMENT_TARGET=10.10 +endif + + # Static flag for windows cross and native builds ifeq ($(TOOLSPREFIX),i686-w64-mingw32-) # prefix will automatically be .exe for cross build @@ -19,26 +31,29 @@ ifeq ($(OS),Windows_NT) EXT = .exe LFLAGS += -static endif - + + + + # **************************************************** # Targets needed to bring the executable up to date - + TARGET = png2asset SRCS := lodepng.cpp png2asset.cpp OBJS := $(SRCS:%.cpp=%.o) - + $(TARGET): $(OBJS) $(CXX) $(LFLAGS) -o $(TARGET) $(OBJS) strip $@$(EXT) - + # The main.o target can be written more simply - + %.cpp.o: %.cpp $(CXX) $(CXXFLAGS) -c $< -o $@ - - clean: + +clean: rm -f *.o rm -f *.exe rm -f TARGET

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.