2020-05-29 21:21:46 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# gpsp
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2021-06-18 19:18:36 +01:00
|
|
|
GPSP_VERSION = gpsp-FunKey-1.2.2
|
2020-05-29 21:21:46 +01:00
|
|
|
GPSP_SITE_METHOD = git
|
2020-11-16 12:58:36 +00:00
|
|
|
GPSP_SITE = https://github.com/FunKey-Project/gpsp.git
|
2020-05-29 21:21:46 +01:00
|
|
|
GPSP_LICENSE = GPL-2.0
|
|
|
|
GPSP_LICENSE_FILES = COPYING.DOC
|
|
|
|
|
|
|
|
GPSP_DEPENDENCIES = sdl sdl_image sdl_mixer sdl_ttf zlib
|
|
|
|
|
2020-12-25 14:46:52 +00:00
|
|
|
GPSP_CFLAGS = $(TARGET_CFLAGS) $(subst $\",,$(BR2_TARGET_OPTIMIZATION)) -mfloat-abi=hard -ffast-math -funsafe-math-optimizations
|
2020-05-29 21:21:46 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-12-11 22:37:33 +00:00
|
|
|
define GPSP_CREATE_OPK
|
2021-03-11 23:12:17 +00:00
|
|
|
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/local/share/OPKs/Emulators
|
|
|
|
$(HOST_DIR)/usr/bin/mksquashfs $(GPSP_PKGDIR)/opk/gba $(TARGET_DIR)/usr/local/share/OPKs/Emulators/gba_gpsp_funkey-s.opk -all-root -noappend -no-exports -no-xattrs
|
2020-12-11 22:37:33 +00:00
|
|
|
endef
|
|
|
|
GPSP_POST_INSTALL_TARGET_HOOKS += GPSP_CREATE_OPK
|
|
|
|
|
2020-05-29 21:21:46 +01:00
|
|
|
$(eval $(generic-package))
|