This commit is contained in:
Maximilian Mader 2019-01-19 22:02:35 +01:00
parent 5fae86a662
commit 2ff32c0ac8
Signed by: Max
GPG Key ID: F71D56A3151C4FB3
2 changed files with 30 additions and 12 deletions

View File

@ -92,9 +92,9 @@ Start:
; Set registers to match the original DMG boot
IF DEF(MGB)
ld hl, $01B0
ELSE
ld hl, $FFB0
ELSE
ld hl, $01B0
ENDC
push hl
pop af

View File

@ -8,17 +8,20 @@ endif
CFLAGS += -DSAMEBOY_CORE_VERSION=\"$(VERSION)\"
platform=ctr
ifeq ($(platform),)
platform = unix
ifeq ($(shell uname -a),)
platform = unix
ifeq ($(shell uname -a),)
platform = win
else ifneq ($(findstring MINGW,$(shell uname -a)),)
else ifneq ($(findstring MINGW,$(shell uname -a)),)
platform = win
else ifneq ($(findstring Darwin,$(shell uname -a)),)
else ifneq ($(findstring Darwin,$(shell uname -a)),)
platform = osx
else ifneq ($(findstring win,$(shell uname -a)),)
else ifneq ($(findstring win,$(shell uname -a)),)
platform = win
endif
endif
endif
# system platform
@ -94,6 +97,18 @@ else ifeq ($(platform), wiiu)
CFLAGS += -DGEKKO -DHW_RVL -DWIIU -mwup -mcpu=750 -meabi -mhard-float -D__ppc__ -DMSB_FIRST -I$(DEVKITPRO)/libogc/include
CFLAGS += -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
STATIC_LINKING = 1
# CTR(3DS)
else ifeq ($(platform), ctr)
TARGET := $(TARGET_NAME)_libretro_$(platform).a
CC = $(DEVKITARM)/bin/arm-none-eabi-gcc$(EXE_EXT)
AR = $(DEVKITARM)/bin/arm-none-eabi-ar$(EXE_EXT)
CFLAGS += -DARM11 -D_3DS
CFLAGS += -march=armv6k -mtune=mpcore -mfloat-abi=hard
CFLAGS += -Wall -mword-relocations
CFLAGS += -fomit-frame-pointer -ffast-math
CFLAGS += -I$(CTRULIB)/include
CFLAGS += -std=c99 -DUSE_VFS_3DS
STATIC_LINKING = 1
else ifneq (,$(findstring osx,$(platform)))
TARGET := $(TARGET_NAME)_libretro.dylib
fpic := -fPIC
@ -178,10 +193,13 @@ $(CORE_DIR)/build/bin/BootROMs/%_boot.bin:
$(MAKE) -C $(CORE_DIR) $(patsubst $(CORE_DIR)/%,%,$@)
$(TARGET): $(OBJECTS)
@echo "** BUILDING $(TARGET) FOR PLATFORM $(platform) **"
-@$(MKDIR) -p $(dir $@)
ifeq ($(STATIC_LINKING), 1)
echo $(AR) rcs $@ $(OBJECTS)
$(AR) rcs $@ $(OBJECTS)
else
echo $(CC) $(fpic) $(SHARED) $(INCFLAGS) -o $@ $(OBJECTS) $(LDFLAGS)
$(CC) $(fpic) $(SHARED) $(INCFLAGS) -o $@ $(OBJECTS) $(LDFLAGS)
endif