From 3f6842b99d90721b199728887add3e8ff6e0635b Mon Sep 17 00:00:00 2001 From: CatalystG Date: Wed, 3 Apr 2013 19:59:52 -0400 Subject: [PATCH 1/2] (BlackBerry) Add NDK build project --- Makefile.libretro | 7 +- libretro/qnx/playbook/.cproject | 610 ++++---------------------------- libretro/qnx/playbook/.project | 266 +------------- 3 files changed, 93 insertions(+), 790 deletions(-) diff --git a/Makefile.libretro b/Makefile.libretro index 35ca22d..1e95966 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -190,9 +190,14 @@ LIBRETRO_CFLAGS += -I$(GENPLUS_SRC_DIR) \ $(BPP_DEFINES) \ $(ENDIANNESS_DEFINES) \ $(PLATFORM_DEFINES) \ - -DINLINE="static inline" \ -D__LIBRETRO__ +ifeq ($(platform), qnx) + LIBRETRO_CFLAGS += -DINLINE=static +else + LIBRETRO_CFLAGS += -DINLINE="static inline" +endif + LIBRETRO_LIBS := -lm diff --git a/libretro/qnx/playbook/.cproject b/libretro/qnx/playbook/.cproject index a559731..cfae4fc 100644 --- a/libretro/qnx/playbook/.cproject +++ b/libretro/qnx/playbook/.cproject @@ -3,604 +3,140 @@ - - - - - - - - + + + - + + - - - - - - - - - - - - - + + + - + + - - - - - - - - - - - - - + + + - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - - - - - - - - - - - - - + + + + diff --git a/libretro/qnx/playbook/.project b/libretro/qnx/playbook/.project index 6108add..7e56d62 100644 --- a/libretro/qnx/playbook/.project +++ b/libretro/qnx/playbook/.project @@ -1,6 +1,6 @@ - genesis-plus-gx + Genesis-Plus-GX @@ -17,17 +17,21 @@ org.eclipse.cdt.make.core.append_environment true + + org.eclipse.cdt.make.core.autoBuildTarget + all + org.eclipse.cdt.make.core.buildArguments - + -C../../.. -fMakefile.libretro platform=qnx org.eclipse.cdt.make.core.buildCommand make - org.eclipse.cdt.make.core.buildLocation - ${workspace_loc:/genesis-plus-gx/Device-Release} + org.eclipse.cdt.make.core.cleanBuildTarget + clean org.eclipse.cdt.make.core.contents @@ -45,13 +49,17 @@ org.eclipse.cdt.make.core.enableFullBuild true + + org.eclipse.cdt.make.core.fullBuildTarget + all + org.eclipse.cdt.make.core.stopOnError true org.eclipse.cdt.make.core.useDefaultBuildCmd - true + false @@ -72,252 +80,6 @@ org.eclipse.cdt.managedbuilder.core.managedBuildNature org.eclipse.cdt.managedbuilder.core.ScannerConfigNature com.qnx.tools.ide.bbt.core.bbtnature + org.eclipse.cdt.core.ccnature - - - src/activator.c - 1 - PARENT-3-PROJECT_LOC/source/input_hw/activator.c - - - src/areplay.c - 1 - PARENT-3-PROJECT_LOC/source/cart_hw/areplay.c - - - src/blip_buf.c - 1 - PARENT-3-PROJECT_LOC/source/sound/blip_buf.c - - - src/cd_cart.c - 1 - PARENT-3-PROJECT_LOC/source/cd_hw/cd_cart.c - - - src/cdc.c - 1 - PARENT-3-PROJECT_LOC/source/cd_hw/cdc.c - - - src/cdd.c - 1 - PARENT-3-PROJECT_LOC/source/cd_hw/cdd.c - - - src/eeprom_93c.c - 1 - PARENT-3-PROJECT_LOC/source/cart_hw/eeprom_93c.c - - - src/eeprom_i2c.c - 1 - PARENT-3-PROJECT_LOC/source/cart_hw/eeprom_i2c.c - - - src/eeprom_spi.c - 1 - PARENT-3-PROJECT_LOC/source/cart_hw/eeprom_spi.c - - - src/eq.c - 1 - PARENT-3-PROJECT_LOC/source/sound/eq.c - - - src/gamepad.c - 1 - PARENT-3-PROJECT_LOC/source/input_hw/gamepad.c - - - src/genesis.c - 1 - PARENT-3-PROJECT_LOC/source/genesis.c - - - src/gfx.c - 1 - PARENT-3-PROJECT_LOC/source/cd_hw/gfx.c - - - src/ggenie.c - 1 - PARENT-3-PROJECT_LOC/source/cart_hw/ggenie.c - - - src/input.c - 1 - PARENT-3-PROJECT_LOC/source/input_hw/input.c - - - src/io_ctrl.c - 1 - PARENT-3-PROJECT_LOC/source/io_ctrl.c - - - src/libretro.c - 1 - PARENT-2-PROJECT_LOC/libretro.c - - - src/lightgun.c - 1 - PARENT-3-PROJECT_LOC/source/input_hw/lightgun.c - - - src/loadrom.c - 1 - PARENT-3-PROJECT_LOC/source/loadrom.c - - - src/m68kcpu.c - 1 - PARENT-3-PROJECT_LOC/source/m68k/m68kcpu.c - - - src/md_cart.c - 1 - PARENT-3-PROJECT_LOC/source/cart_hw/md_cart.c - - - src/md_ntsc.c - 1 - PARENT-3-PROJECT_LOC/source/ntsc/md_ntsc.c - - - src/mem68k.c - 1 - PARENT-3-PROJECT_LOC/source/mem68k.c - - - src/membnk.c - 1 - PARENT-3-PROJECT_LOC/source/membnk.c - - - src/memz80.c - 1 - PARENT-3-PROJECT_LOC/source/memz80.c - - - src/mouse.c - 1 - PARENT-3-PROJECT_LOC/source/input_hw/mouse.c - - - src/paddle.c - 1 - PARENT-3-PROJECT_LOC/source/input_hw/paddle.c - - - src/pcm.c - 1 - PARENT-3-PROJECT_LOC/source/cd_hw/pcm.c - - - src/s68kcpu.c - 1 - PARENT-3-PROJECT_LOC/source/m68k/s68kcpu.c - - - src/scd.c - 1 - PARENT-3-PROJECT_LOC/source/cd_hw/scd.c - - - src/scrc32.c - 1 - PARENT-2-PROJECT_LOC/scrc32.c - - - src/sms_cart.c - 1 - PARENT-3-PROJECT_LOC/source/cart_hw/sms_cart.c - - - src/sms_ntsc.c - 1 - PARENT-3-PROJECT_LOC/source/ntsc/sms_ntsc.c - - - src/sn76489.c - 1 - PARENT-3-PROJECT_LOC/source/sound/sn76489.c - - - src/sound.c - 1 - PARENT-3-PROJECT_LOC/source/sound/sound.c - - - src/sportspad.c - 1 - PARENT-3-PROJECT_LOC/source/input_hw/sportspad.c - - - src/sram.c - 1 - PARENT-3-PROJECT_LOC/source/cart_hw/sram.c - - - src/ssp16.c - 1 - PARENT-3-PROJECT_LOC/source/cart_hw/svp/ssp16.c - - - src/state.c - 1 - PARENT-3-PROJECT_LOC/source/state.c - - - src/svp.c - 1 - PARENT-3-PROJECT_LOC/source/cart_hw/svp/svp.c - - - src/system.c - 1 - PARENT-3-PROJECT_LOC/source/system.c - - - src/teamplayer.c - 1 - PARENT-3-PROJECT_LOC/source/input_hw/teamplayer.c - - - src/terebi_oekaki.c - 1 - PARENT-3-PROJECT_LOC/source/input_hw/terebi_oekaki.c - - - src/vdp_ctrl.c - 1 - PARENT-3-PROJECT_LOC/source/vdp_ctrl.c - - - src/vdp_render.c - 1 - PARENT-3-PROJECT_LOC/source/vdp_render.c - - - src/xe_a1p.c - 1 - PARENT-3-PROJECT_LOC/source/input_hw/xe_a1p.c - - - src/ym2413.c - 1 - PARENT-3-PROJECT_LOC/source/sound/ym2413.c - - - src/ym2612.c - 1 - PARENT-3-PROJECT_LOC/source/sound/ym2612.c - - - src/z80.c - 1 - PARENT-3-PROJECT_LOC/source/z80/z80.c - - From 2edcbc23738442049ce60db8d529c9814e524073 Mon Sep 17 00:00:00 2001 From: CatalystG Date: Sat, 20 Apr 2013 12:38:41 -0400 Subject: [PATCH 2/2] (BlackBerry) Fix the INLINE def and a SIGBUS caused by -O3 --- Makefile.libretro | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile.libretro b/Makefile.libretro index 1e95966..9603049 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -109,7 +109,11 @@ endif ifeq ($(DEBUG), 1) CFLAGS += -O0 -g else - CFLAGS += -O3 -DNDEBUG +ifeq ($(platform),qnx) + CFLAGS += -Os -DNDEBUG +else + CFLAGS += -O3 -DNDEBUG +endif endif LIBRETRO_SRC := $(GENPLUS_SRC_DIR)/genesis.c \ @@ -193,7 +197,7 @@ LIBRETRO_CFLAGS += -I$(GENPLUS_SRC_DIR) \ -D__LIBRETRO__ ifeq ($(platform), qnx) - LIBRETRO_CFLAGS += -DINLINE=static + LIBRETRO_CFLAGS += -D__inline__=inline else LIBRETRO_CFLAGS += -DINLINE="static inline" endif