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 ; Set registers to match the original DMG boot
IF DEF(MGB) IF DEF(MGB)
ld hl, $01B0
ELSE
ld hl, $FFB0 ld hl, $FFB0
ELSE
ld hl, $01B0
ENDC ENDC
push hl push hl
pop af pop af

View File

@ -8,8 +8,11 @@ endif
CFLAGS += -DSAMEBOY_CORE_VERSION=\"$(VERSION)\" CFLAGS += -DSAMEBOY_CORE_VERSION=\"$(VERSION)\"
platform=ctr
ifeq ($(platform),) ifeq ($(platform),)
platform = unix platform = unix
ifeq ($(shell uname -a),) ifeq ($(shell uname -a),)
platform = win platform = win
else ifneq ($(findstring MINGW,$(shell uname -a)),) else ifneq ($(findstring MINGW,$(shell uname -a)),)
@ -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 += -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 CFLAGS += -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
STATIC_LINKING = 1 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))) else ifneq (,$(findstring osx,$(platform)))
TARGET := $(TARGET_NAME)_libretro.dylib TARGET := $(TARGET_NAME)_libretro.dylib
fpic := -fPIC fpic := -fPIC
@ -178,10 +193,13 @@ $(CORE_DIR)/build/bin/BootROMs/%_boot.bin:
$(MAKE) -C $(CORE_DIR) $(patsubst $(CORE_DIR)/%,%,$@) $(MAKE) -C $(CORE_DIR) $(patsubst $(CORE_DIR)/%,%,$@)
$(TARGET): $(OBJECTS) $(TARGET): $(OBJECTS)
@echo "** BUILDING $(TARGET) FOR PLATFORM $(platform) **"
-@$(MKDIR) -p $(dir $@) -@$(MKDIR) -p $(dir $@)
ifeq ($(STATIC_LINKING), 1) ifeq ($(STATIC_LINKING), 1)
echo $(AR) rcs $@ $(OBJECTS)
$(AR) rcs $@ $(OBJECTS) $(AR) rcs $@ $(OBJECTS)
else else
echo $(CC) $(fpic) $(SHARED) $(INCFLAGS) -o $@ $(OBJECTS) $(LDFLAGS)
$(CC) $(fpic) $(SHARED) $(INCFLAGS) -o $@ $(OBJECTS) $(LDFLAGS) $(CC) $(fpic) $(SHARED) $(INCFLAGS) -o $@ $(OBJECTS) $(LDFLAGS)
endif endif