Mac classic: Split into 68k and PPC makefiles

This commit is contained in:
UnknownShadow200 2024-06-03 22:54:45 +10:00
parent 3caa4d41c9
commit ca8f617b1b
6 changed files with 98 additions and 4 deletions

View file

@ -172,8 +172,10 @@ switch:
$(MAKE) -f misc/switch/Makefile
os/2:
$(MAKE) -f misc/os2/Makefile
macclassic:
$(MAKE) -f misc/macclassic/Makefile
macclassic_68k:
$(MAKE) -f misc/macclassic/Makefile_68k
macclassic_ppc:
$(MAKE) -f misc/macclassic/Makefile_ppc
clean:
$(DEL) $(OBJECTS)

23
misc/macclassic/68APPL.r Normal file
View file

@ -0,0 +1,23 @@
#include "Processes.r"
#include "Retro68.r"
resource 'SIZE' (-1) {
reserved,
ignoreSuspendResumeEvents,
reserved,
cannotBackground,
needsActivateOnFGSwitch,
backgroundAndForeground,
dontGetFrontClicks,
ignoreChildDiedEvents,
is32BitCompatible,
notHighLevelEventAware,
onlyLocalHLEvents,
notStationeryAware,
dontUseTextEditServices,
reserved,
reserved,
reserved,
8192 * 1024,
8192 * 1024
};

View file

@ -19,7 +19,7 @@ C_OBJECTS := $(patsubst $(SOURCE_DIR)/%.c, $(BUILD_DIR)/%.o, $(C_SOURCES))
$(TARGET).bin $(TARGET).APPL $(TARGET).dsk: $(TARGET).code.bin $(BUILD_DIR)
$(REZ) $(REZFLAGS) \
--copy "$(TARGET).code.bin" \
"$(RINCLUDES)/Retro68APPL.r" \
"misc/macclassic/68APPL.r" \
-t "APPL" -c "????" \
-o $(TARGET).bin --cc $(TARGET).APPL --cc $(TARGET).dsk

View file

@ -0,0 +1,37 @@
# path to RETRO68
RETRO68=../Retro68-build/toolchain
PREFIX=$(RETRO68)/powerpc-apple-macos
CC=$(RETRO68)/bin/powerpc-apple-macos-gcc
CXX=$(RETRO68)/bin/powerpc-apple-macos-g++
REZ=$(RETRO68)/bin/Rez
MakePEF=$(RETRO68)/bin/MakePEF
LDFLAGS=-lRetroConsole
RINCLUDES=$(PREFIX)/RIncludes
REZFLAGS=-I$(RINCLUDES)
TARGET := ClassiCube
BUILD_DIR := build
SOURCE_DIR := src
C_SOURCES := $(wildcard $(SOURCE_DIR)/*.c)
C_OBJECTS := $(patsubst $(SOURCE_DIR)/%.c, $(BUILD_DIR)/%.o, $(C_SOURCES))
$(TARGET).bin $(TARGET).APPL $(TARGET).dsk: $(TARGET).pef $(BUILD_DIR)
$(REZ) $(REZFLAGS) \
"misc/macclassic/ppcAPPL.r" \
-t "APPL" -c "????" \
--data $(TARGET).pef \
-o $(TARGET).bin --cc $(TARGET).APPL --cc $(TARGET).dsk
$(TARGET).elf: $(C_OBJECTS)
$(CXX) $(C_OBJECTS) -o $@ $(LDFLAGS) # C++ used for linking because RetroConsole needs it
$(TARGET).pef: $(TARGET).elf
$(MakePEF) $(TARGET).elf -o $(TARGET).pef
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
$(C_OBJECTS): $(BUILD_DIR)/%.o : $(SOURCE_DIR)/%.c
$(CC) $(CFLAGS) -c $< -o $@

32
misc/macclassic/ppcAPPL.r Normal file
View file

@ -0,0 +1,32 @@
#include "Processes.r"
#include "CodeFragments.r"
resource 'cfrg' (0) {
{
kPowerPCCFragArch, kIsCompleteCFrag, kNoVersionNum, kNoVersionNum,
kDefaultStackSize, kNoAppSubFolder,
kApplicationCFrag, kDataForkCFragLocator, kZeroOffset, kCFragGoesToEOF,
"ClassiCube"
}
};
resource 'SIZE' (-1) {
reserved,
ignoreSuspendResumeEvents,
reserved,
cannotBackground,
needsActivateOnFGSwitch,
backgroundAndForeground,
dontGetFrontClicks,
ignoreChildDiedEvents,
is32BitCompatible,
notHighLevelEventAware,
onlyLocalHLEvents,
notStationeryAware,
dontUseTextEditServices,
reserved,
reserved,
reserved,
8192 * 1024,
8192 * 1024
};

View file

@ -131,7 +131,7 @@ static void SPConnection_BeginConnect(void) {
Random_SeedFromCurrentTime(&rnd);
World_NewMap();
#if defined CC_BUILD_NDS || defined CC_BUILD_PS1 || defined CC_BUILD_SATURN
#if defined CC_BUILD_NDS || defined CC_BUILD_PS1 || defined CC_BUILD_SATURN || defined CC_BUILD_MACCLASSIC
horSize = 16;
verSize = 16;
#elif defined CC_BUILD_LOWMEM