mirror of
https://github.com/libretro/RetroArch
synced 2025-04-03 10:21:31 +00:00
Makefile.griffin - Combine Wii and NGC targets
This commit is contained in:
parent
309bd09cb0
commit
b47cda1c22
170
Makefile.griffin
170
Makefile.griffin
@ -53,91 +53,130 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
|||||||
WHOLE_END := -Wl,--no-whole-archive
|
WHOLE_END := -Wl,--no-whole-archive
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(platform), ngc)
|
LIBS := $(WHOLE_START) -lretro_$(platform) $(WHOLE_END)
|
||||||
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
|
||||||
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
|
||||||
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT)
|
|
||||||
ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
|
||||||
EXT_TARGET := $(TARGET_NAME)_ngc.dol
|
|
||||||
EXT_INTER_TARGET := $(TARGET_NAME)_ngc.elf
|
|
||||||
INCLUDE += -I. -I$(DEVKITPRO)/libogc/include -Ideps/zlib
|
|
||||||
LIBDIRS += -L$(DEVKITPRO)/libogc/lib/cube -L.
|
|
||||||
MACHDEP := -DGEKKO -DHW_DOL -mogc -mcpu=750 -meabi -mhard-float -DMSB_FIRST
|
|
||||||
LDFLAGS += $(MACHDEP) -Wl,-Map,$(notdir $(EXT_INTER_TARGET)).map
|
|
||||||
ifeq ($(BIG_STACK), 1)
|
|
||||||
LDFLAGS += -T gx/ld/ogc.ld
|
|
||||||
endif
|
|
||||||
LIBS := -lfat $(WHOLE_START) -lretro_ngc $(WHOLE_END) -logc
|
|
||||||
ifeq ($(HAVE_LOGGER), 1)
|
|
||||||
LIBS += -lbba
|
|
||||||
endif
|
|
||||||
PLATCFLAGS := -DGEKKO
|
|
||||||
|
|
||||||
HAVE_FILTERS_BUILTIN := 1
|
libogc_platform :=
|
||||||
HAVE_THREADS := 1
|
|
||||||
HAVE_ZLIB := 1
|
ifeq ($(platform), ngc)
|
||||||
HAVE_RPNG := 1
|
libogc_platform = 1
|
||||||
HAVE_7ZIP := 1
|
else ifeq ($(platform), wii)
|
||||||
HAVE_RPNG := 1
|
libogc_platform = 1
|
||||||
HAVE_OVERLAY := 1
|
endif
|
||||||
HAVE_BUILTIN_AUTOCONFIG := 1
|
|
||||||
else ifeq ($(platform), ps3)
|
# PS3
|
||||||
|
ifeq ($(platform), ps3)
|
||||||
#TODO
|
#TODO
|
||||||
MEDIA_SHADER_DIR := ps3/pkg/USRDIR/cores/shaders
|
MEDIA_SHADER_DIR := pkg/ps3/USRDIR/cores/shaders
|
||||||
|
|
||||||
|
# PS3 - Cobra
|
||||||
else ifeq ($(platform), ps3-cobra)
|
else ifeq ($(platform), ps3-cobra)
|
||||||
#TODO
|
#TODO
|
||||||
MEDIA_SHADER_DIR := ps3/iso/PS3_GAME/USRDIR/cores/shaders
|
MEDIA_SHADER_DIR := ps3/iso/PS3_GAME/USRDIR/cores/shaders
|
||||||
else ifeq ($(platform), wii)
|
|
||||||
HAVE_WIIUSB_HID := 1
|
|
||||||
|
|
||||||
|
# NGC/Wii - libogc
|
||||||
|
else ifeq ($(libogc_platform), 1)
|
||||||
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
||||||
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||||
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT)
|
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT)
|
||||||
ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
||||||
EXT_TARGET := $(TARGET_NAME)_wii.dol
|
EXT_TARGET := $(TARGET_NAME)_$(platform).dol
|
||||||
EXT_INTER_TARGET := $(TARGET_NAME)_wii.elf
|
EXT_INTER_TARGET := $(TARGET_NAME)_$(platform).elf
|
||||||
|
|
||||||
INCLUDE += -I. -I$(DEVKITPRO)/libogc/include -Ideps/zlib
|
INCLUDE += -I. -I$(DEVKITPRO)/libogc/include -Ideps/zlib
|
||||||
LIBDIRS += -L$(DEVKITPRO)/libogc/lib/wii -L.
|
|
||||||
MACHDEP := -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float -DMSB_FIRST
|
ifeq ($(platform), ngc)
|
||||||
LDFLAGS += $(MACHDEP) -Wl,-Map,$(notdir $(EXT_INTER_TARGET)).map,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,strdup,-wrap,strndup,-wrap,malloc_usable_size
|
LIBDIRS += -L$(DEVKITPRO)/libogc/lib/cube
|
||||||
|
MACHDEP := -DHW_DOL -mogc
|
||||||
|
else ifeq ($(platform), wii)
|
||||||
|
LIBDIRS += -L$(DEVKITPRO)/libogc/lib/wii
|
||||||
|
MACHDEP := -DHW_RVL -mrvl
|
||||||
|
endif
|
||||||
|
LIBDIRS += -L.
|
||||||
|
MACHDEP += -DGEKKO -mcpu=750 -meabi -mhard-float -DMSB_FIRST
|
||||||
|
|
||||||
|
LDFLAGS += $(MACHDEP) -Wl,-Map,$(notdir $(EXT_INTER_TARGET)).map
|
||||||
|
|
||||||
|
ifeq ($(platform), wii)
|
||||||
|
LDFLAGS += ,-wrap,malloc,-wrap,free,-wrap,memalign,-wrap,calloc,-wrap,realloc,-wrap,strdup,-wrap,strndup,-wrap,malloc_usable_size
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(BIG_STACK), 1)
|
ifeq ($(BIG_STACK), 1)
|
||||||
|
ifeq ($(platform), ngc)
|
||||||
|
LDFLAGS += -T gx/ld/ogc.ld
|
||||||
|
else ifeq ($(platform), wii)
|
||||||
LDFLAGS += -T gx/ld/rvl.ld
|
LDFLAGS += -T gx/ld/rvl.ld
|
||||||
endif
|
endif
|
||||||
LIBS := -lfat $(WHOLE_START) -lretro_wii $(WHOLE_END) -logc -lwiiuse -lbte
|
endif
|
||||||
|
LIBS += -lfat -logc
|
||||||
|
|
||||||
|
ifeq ($(platform), wii)
|
||||||
|
LIBS += -lwiiuse -lbte
|
||||||
ifeq ($(USBGECKO), 1)
|
ifeq ($(USBGECKO), 1)
|
||||||
LIBS += -ldb
|
LIBS += -ldb
|
||||||
endif
|
endif
|
||||||
|
else ifeq ($(platform), ngc)
|
||||||
|
ifeq ($(HAVE_LOGGER), 1)
|
||||||
|
LIBS += -lbba
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
CFLAGS += -DGEKKO
|
||||||
|
|
||||||
|
HAVE_FILTERS_BUILTIN := 1
|
||||||
|
HAVE_THREADS := 1
|
||||||
|
HAVE_RPNG := 1
|
||||||
|
HAVE_OVERLAY := 1
|
||||||
|
HAVE_BUILTIN_AUTOCONFIG := 1
|
||||||
|
HAVE_ZLIB := 1
|
||||||
|
HAVE_7ZIP := 1
|
||||||
|
|
||||||
|
ifeq ($(platform), wii)
|
||||||
|
HAVE_WIIUSB_HID := 1
|
||||||
|
HAVE_RARCH_EXEC := 1
|
||||||
|
HAVE_RSOUND := 1
|
||||||
|
HAVE_LIBRETRO_MANAGEMENT := 1
|
||||||
|
HAVE_LIBSICKSAXIS := 1
|
||||||
|
|
||||||
APP_BOOTER_DIR = wii/app_booter
|
APP_BOOTER_DIR = wii/app_booter
|
||||||
PLATOBJS := $(APP_BOOTER_DIR)/app_booter.binobj
|
PLATOBJS := $(APP_BOOTER_DIR)/app_booter.binobj
|
||||||
CFLAGS += -DGEKKO
|
|
||||||
ifeq ($(USBGECKO), 1)
|
ifeq ($(USBGECKO), 1)
|
||||||
CFLAGS += -DUSBGECKO
|
CFLAGS += -DUSBGECKO
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
HAVE_FILTERS_BUILTIN := 1
|
# Libxenon (Xbox 360)
|
||||||
HAVE_RARCH_EXEC := 1
|
else ifeq ($(platform), xenon360)
|
||||||
HAVE_THREADS := 1
|
CC = xenon-gcc$(EXE_EXT)
|
||||||
HAVE_RSOUND := 1
|
CXX = xenon-g++$(EXE_EXT)
|
||||||
HAVE_7ZIP := 1
|
OBJCOPY = xenon-objcopy$(EXE_EXT)
|
||||||
HAVE_LIBRETRO_MANAGEMENT := 1
|
LD = xenon-ld$(EXE_EXT)
|
||||||
HAVE_ZLIB := 1
|
STRIP = xenon-strip$(EXE_EXT)
|
||||||
HAVE_RPNG := 1
|
INCLUDE += -I$(DEVKITXENON)/usr/include
|
||||||
HAVE_RPNG := 1
|
|
||||||
HAVE_OVERLAY := 1
|
EXT_TARGET := $(TARGET_NAME)_$(platform).elf32
|
||||||
HAVE_LIBSICKSAXIS := 1
|
EXT_INTER_TARGET := $(TARGET_NAME)_$(platform).elf
|
||||||
HAVE_BUILTIN_AUTOCONFIG := 1
|
|
||||||
|
LIBS += -lxenon -lm -lc
|
||||||
|
|
||||||
|
LIBDIRS += -L. -L$(DEVKITXENON)/usr/lib -L$(DEVKITXENON)/xenon/lib/32
|
||||||
|
LDFLAGS += -Wl,-q -m32 -n -T$(DEVKITXENON)/app.lds
|
||||||
|
PLATCFLAGS := -DHAVE_GETOPT_LONG=1
|
||||||
|
PLATCFLAGS += -maltivec -mhard-float -m32 -mpowerpc64 -mcpu=cell -mtune=cell -fno-pic -g -Wall -DXENON $(INCDIRS) -Wno-char-subscripts
|
||||||
|
PLATCFLAGS += -u read -u _start -u exc_base
|
||||||
|
HAVE_THREADS = 1
|
||||||
|
HAVE_GETOPT_LONG = 1
|
||||||
|
|
||||||
|
# PSP
|
||||||
else ifeq ($(platform), psp1)
|
else ifeq ($(platform), psp1)
|
||||||
CC = psp-gcc$(EXE_EXT)
|
CC = psp-gcc$(EXE_EXT)
|
||||||
CXX = psp-g++$(EXE_EXT)
|
CXX = psp-g++$(EXE_EXT)
|
||||||
LD = psp-ld$(EXE_EXT)
|
LD = psp-ld$(EXE_EXT)
|
||||||
INCLUDE += -I$(PSPSDK)/psp/sdk/include
|
INCLUDE += -I$(PSPSDK)/psp/sdk/include
|
||||||
EXT_TARGET := $(TARGET_NAME)_psp1.elf
|
EXT_TARGET := $(TARGET_NAME)_$(platform).elf
|
||||||
EXT_INTER_TARGET := $(TARGET_NAME)_psp1.elf
|
EXT_INTER_TARGET := $(TARGET_NAME)_$(platform).elf
|
||||||
PLATCFLAGS := -DPSP -D_PSP_FW_VERSION=150 -G0 \
|
PLATCFLAGS := -DPSP -D_PSP_FW_VERSION=150 -G0 \
|
||||||
-D_MIPS_ARCH_ALLEGREX
|
-D_MIPS_ARCH_ALLEGREX
|
||||||
LIBS += $(WHOLE_START) -lretro_psp1 $(WHOLE_END) \
|
LIBS += -lpspgu -lpspgum -lm -lpspaudio -lpspfpu -lpsppower -lpsprtc -lpspkernel
|
||||||
-lpspgu -lpspgum -lm -lpspaudio -lpspfpu \
|
|
||||||
-lpsppower -lpsprtc -lpspkernel
|
|
||||||
|
|
||||||
LIBDIRS += -L.
|
LIBDIRS += -L.
|
||||||
LDFLAGS += -Wl,-q
|
LDFLAGS += -Wl,-q
|
||||||
@ -151,16 +190,16 @@ ifeq ($(BUILD_PRX), 1)
|
|||||||
LDFLAGS += $(addprefix -L,$(PSPSDK)/lib) -specs=$(PSPSDK)/lib/prxspecs -Wl,-q,-T$(PSPSDK)/lib/linkfile.prx $(LDFLAGS)
|
LDFLAGS += $(addprefix -L,$(PSPSDK)/lib) -specs=$(PSPSDK)/lib/prxspecs -Wl,-q,-T$(PSPSDK)/lib/linkfile.prx $(LDFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Vita
|
||||||
else ifeq ($(platform), vita)
|
else ifeq ($(platform), vita)
|
||||||
CC = arm-vita-eabi-gcc$(EXE_EXT)
|
CC = arm-vita-eabi-gcc$(EXE_EXT)
|
||||||
CXX = arm-vita-eabi-g++$(EXE_EXT)
|
CXX = arm-vita-eabi-g++$(EXE_EXT)
|
||||||
LD = arm-vita-eabi-ld$(EXE_EXT)
|
LD = arm-vita-eabi-ld$(EXE_EXT)
|
||||||
EXT_TARGET := $(TARGET_NAME).velf
|
EXT_TARGET := $(TARGET_NAME)_$(platform).velf
|
||||||
EXT_INTER_TARGET := $(TARGET_NAME).elf
|
EXT_INTER_TARGET := $(TARGET_NAME)_$(platform).elf
|
||||||
MACHDEP := -DVITA
|
MACHDEP := -DVITA
|
||||||
PLATCFLAGS := -O3
|
PLATCFLAGS := -O3
|
||||||
LIBS += $(WHOLE_START) -lretro_vita $(WHOLE_END) \
|
LIBS += -lSceKernel_stub -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub \
|
||||||
-lSceKernel_stub -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub \
|
|
||||||
-lSceSysmodule_stub -lSceCtrl_stub -lSceAudio_stub \
|
-lSceSysmodule_stub -lSceCtrl_stub -lSceAudio_stub \
|
||||||
-lScePower_stub -lSceRtc_stub -lz -lm -lc
|
-lScePower_stub -lSceRtc_stub -lz -lm -lc
|
||||||
|
|
||||||
@ -288,6 +327,10 @@ ifeq ($(HAVE_RSOUND), 1)
|
|||||||
CFLAGS += -DHAVE_RSOUND
|
CFLAGS += -DHAVE_RSOUND
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(HAVE_GETOPT_LONG), 1)
|
||||||
|
CFLAGS += -DHAVE_GETOPT_LONG=1
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
CFLAGS += -O0 -g -DDEBUG
|
CFLAGS += -O0 -g -DDEBUG
|
||||||
else ifeq ($(platform), psp1)
|
else ifeq ($(platform), psp1)
|
||||||
@ -305,6 +348,11 @@ all: $(EXT_TARGET)
|
|||||||
arm-vita-eabi-strip -g $<
|
arm-vita-eabi-strip -g $<
|
||||||
vita-elf-create $< $@ $(VITASDK)/bin/db.json
|
vita-elf-create $< $@ $(VITASDK)/bin/db.json
|
||||||
|
|
||||||
|
%.elf32: %.elf
|
||||||
|
ifeq ($(platform), xenon360)
|
||||||
|
$(OBJCOPY) -O elf32-powerpc --adjust-vma 0x80000000 $< $@
|
||||||
|
endif
|
||||||
|
|
||||||
%.prx: %.elf
|
%.prx: %.elf
|
||||||
ifeq ($(platform),psp1)
|
ifeq ($(platform),psp1)
|
||||||
psp-prxgen $< $@
|
psp-prxgen $< $@
|
||||||
@ -330,9 +378,9 @@ $(APP_BOOTER_DIR)/app_booter.bin:
|
|||||||
|
|
||||||
pkg: all
|
pkg: all
|
||||||
ifeq ($(platform), wii)
|
ifeq ($(platform), wii)
|
||||||
cp -r $(EXT_TARGET) wii/pkg/CORE.dol
|
cp -r $(EXT_TARGET) pkg/wii/CORE.dol
|
||||||
else ifeq ($(platform), ngc)
|
else ifeq ($(platform), ngc)
|
||||||
cp -r $(EXT_TARGET) ngc/pkg/CORE.dol
|
cp -r $(EXT_TARGET) pkg/ngc/CORE.dol
|
||||||
else ifeq ($(platform), psp1)
|
else ifeq ($(platform), psp1)
|
||||||
psp-fixup-imports$(EXT) $(EXT_TARGET)
|
psp-fixup-imports$(EXT) $(EXT_TARGET)
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user