diff --git a/FunKey/Config.in b/FunKey/Config.in index cb1c277..9db1cd8 100644 --- a/FunKey/Config.in +++ b/FunKey/Config.in @@ -6,3 +6,4 @@ source "$BR2_EXTERNAL_FUNKEY_PATH/package/FCEUX/Config.in" source "$BR2_EXTERNAL_FUNKEY_PATH/package/gnuboy/Config.in" source "$BR2_EXTERNAL_FUNKEY_PATH/package/picodrive/Config.in" source "$BR2_EXTERNAL_FUNKEY_PATH/package/PocketSNES/Config.in" +source "$BR2_EXTERNAL_FUNKEY_PATH/package/gpsp/Config.in" diff --git a/FunKey/package/gpsp/Config.in b/FunKey/package/gpsp/Config.in new file mode 100644 index 0000000..b76469d --- /dev/null +++ b/FunKey/package/gpsp/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_GPSP + bool "gpsp" + default y + select BR2_PACKAGE_SDL + select BR2_PACKAGE_SDL_IMAGE + select BR2_PACKAGE_SDL_MIXER + select BR2_PACKAGE_SDL_TTF + select BR2_PACKAGE_ZLIB + help + Gameboy Advance emulator for Playstation Portable + + https://github.com/FoxCunning/gpsp.git diff --git a/FunKey/package/gpsp/gpsp.mk b/FunKey/package/gpsp/gpsp.mk new file mode 100644 index 0000000..5f497b3 --- /dev/null +++ b/FunKey/package/gpsp/gpsp.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# gpsp +# +################################################################################ + +GPSP_VERSION = 53f8237e835c7b78d6065b3bfc963618aea05235 +GPSP_SITE_METHOD = git +GPSP_SITE = ssh://git@fk/FunKey-Project/FunKey-Emulator-GPSP +GPSP_LICENSE = GPL-2.0 +GPSP_LICENSE_FILES = COPYING.DOC + +GPSP_DEPENDENCIES = sdl sdl_image sdl_mixer sdl_ttf zlib + +GPSP_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_ARM_CPU_ARMV7A),y) +GPSP_CFLAGS += -march=armv7-a +endif + +ifeq ($(BR2_GCC_TARGET_CPU),"cortex-a7") +GPSP_CFLAGS += -mtune=cortex-a7 +endif + +ifeq ($(BR2_GCC_TARGET_FLOAT_ABI),"hard") +GPSP_CFLAGS += -mfloat-abi=hard -ffast-math -funsafe-math-optimizations +else ifeq ($(BR2_GCC_TARGET_FLOAT_ABI),"soft") +GPSP_CFLAGS += -mfloat-abi=soft -ffast-math -funsafe-math-optimizations +endif + +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +GPSP_CFLAGS += -D__ARM_NEON__ -mfpu=neon -mvectorize-with-neon-quad +endif + +GPSP_SDL_CFLAGS += $(shell $(STAGING_DIR)/usr/bin/sdl-config --cflags) +GPSP_SDL_LIBS += $(shell $(STAGING_DIR)/usr/bin/sdl-config --libs) + +GPSP_CFLAGS += -ggdb -O3 +GPSP_CFLAGS += -DARM_ARCH -DCHIP_BUILD +GPSP_CFLAGS += $(GPSP_SDL_CFLAGS) + +GPSP_LIBS += $(GPSP_SDL_LIBS) +GPSP_LIBS += -lSDL_ttf -lSDL_image -ldl -lpthread -lz + +define GPSP_BUILD_CMDS + (cd $(@D)/chip; \ + sed -i -e 's/-gcc/gcc/g' Makefile; \ + make \ + CROSS_COMPILE=$(TARGET_CROSS) \ + CFLAGS='$(GPSP_CFLAGS)' \ + LIBS='$(GPSP_LIBS)' \ + ) +endef + +define GPSP_INSTALL_TARGET_CMDS + $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/games + $(INSTALL) -m 0755 $(@D)/chip/gpsp $(TARGET_DIR)/usr/games/gpsp + $(INSTALL) -m 0644 $(@D)/game_config.txt $(TARGET_DIR)/usr/games/game_config.txt +endef + +$(eval $(generic-package))