From 68fd12f52cbdbe26d7d3d1206853e85c5067ff3e Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 2 Jan 2025 07:56:40 +1100 Subject: [PATCH] Mac classic: Add 68040 optimised build --- .github/workflows/build_macclassic.yml | 3 ++- misc/macclassic/Makefile_68k | 14 +++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_macclassic.yml b/.github/workflows/build_macclassic.yml index 0a19e0c2d..9d07d16ee 100644 --- a/.github/workflows/build_macclassic.yml +++ b/.github/workflows/build_macclassic.yml @@ -23,6 +23,7 @@ jobs: run: | make macclassic_68k RETRO68=/Retro68-build/toolchain make macclassic_ppc RETRO68=/Retro68-build/toolchain + make macclassic_68k RETRO68=/Retro68-build/toolchain ARCH_68040=1 - uses: ./.github/actions/notify_failure @@ -49,4 +50,4 @@ jobs: if: ${{ always() && steps.compile.outcome == 'success' }} with: DESTINATION_URL: '${{ secrets.NOTIFY_URL }}' - WORKFLOW_NAME: 'macclassic' \ No newline at end of file + WORKFLOW_NAME: 'macclassic' diff --git a/misc/macclassic/Makefile_68k b/misc/macclassic/Makefile_68k index 64e6bc763..f7f9f9e8a 100644 --- a/misc/macclassic/Makefile_68k +++ b/misc/macclassic/Makefile_68k @@ -4,7 +4,7 @@ RETRO68=../Retro68-build/toolchain PREFIX=$(RETRO68)/m68k-apple-macos CC=$(RETRO68)/bin/m68k-apple-macos-gcc CXX=$(RETRO68)/bin/m68k-apple-macos-g++ -CFLAGS=-O1 -fno-math-errno -DCC_BUILD_NOFPU +CFLAGS=-O1 -fno-math-errno REZ=$(RETRO68)/bin/Rez @@ -12,12 +12,20 @@ LDFLAGS=-lm RINCLUDES=$(PREFIX)/RIncludes REZFLAGS=-I$(RINCLUDES) -TARGET := ClassiCube-68k -BUILD_DIR := build-68k SOURCE_DIR := src C_SOURCES := $(wildcard $(SOURCE_DIR)/*.c) C_OBJECTS := $(patsubst $(SOURCE_DIR)/%.c, $(BUILD_DIR)/%.o, $(C_SOURCES)) +ifdef ARCH_68040 + TARGET := ClassiCube-68040 + BUILD_DIR := build-68k + CFLAGS += -march=68040 +else + TARGET := ClassiCube-68k + BUILD_DIR := build-68040 + CFLAGS += -DCC_BUILD_NOFPU +endif + # Dependency tracking DEPFLAGS = -MT $@ -MMD -MP -MF $(BUILD_DIR)/$*.d DEPFILES := $(C_OBJECTS:%.o=%.d)