2020-05-25 07:03:43 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# FCEUX
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2021-05-08 22:21:10 +01:00
|
|
|
FCEUX_VERSION = 959126d
|
2020-05-25 07:03:43 +01:00
|
|
|
FCEUX_SITE_METHOD = git
|
2020-11-16 12:58:36 +00:00
|
|
|
FCEUX_SITE = https://github.com/FunKey-Project/fceux.git
|
2020-05-25 07:03:43 +01:00
|
|
|
FCEUX_LICENSE = GPL-2.0
|
|
|
|
FCEUX_LICENSE_FILES = COPYING
|
|
|
|
|
|
|
|
FCEUX_DEPENDENCIES = sdl sdl_image sdl_mixer sdl_ttf zlib
|
|
|
|
|
2020-12-25 14:46:52 +00:00
|
|
|
FCEUX_CFLAGS = $(TARGET_CFLAGS) $(subst $\",,$(BR2_TARGET_OPTIMIZATION)) -mfloat-abi=hard -ffast-math -funsafe-math-optimizations
|
2020-05-25 07:03:43 +01:00
|
|
|
|
|
|
|
FCEUX_CFLAGS += -ggdb -O3
|
|
|
|
FCEUX_CFLAGS += -Wno-write-strings -Wno-sign-compare
|
|
|
|
FCEUX_CFLAGS += -fomit-frame-pointer -fno-builtin -fno-common
|
|
|
|
FCEUX_CFLAGS += $(shell $(STAGING_DIR)/usr/bin/sdl-config --cflags)
|
|
|
|
FCEUX_CFLAGS += -DDINGUX \
|
|
|
|
-DLSB_FIRST \
|
|
|
|
-DPSS_STYLE=1 \
|
|
|
|
-DHAVE_ASPRINTF \
|
|
|
|
-DFRAMESKIP
|
|
|
|
|
|
|
|
FCEUX_LDFLAGS += $(FCEUX_CFLAGS) \
|
|
|
|
-s -fprofile-generate -fprofile-dir=/home/retrofw/profile/fceux \
|
|
|
|
-fno-strict-aliasing
|
|
|
|
|
|
|
|
FCEUX_LIBS += $(shell $(STAGING_DIR)/usr/bin/sdl-config --libs)
|
|
|
|
FCEUX_LIBS += -lSDL -lSDL_image -lSDL_ttf -lpng -lm -lz
|
|
|
|
|
|
|
|
define FCEUX_BUILD_CMDS
|
|
|
|
(cd $(@D); \
|
|
|
|
make \
|
|
|
|
CFLAGS='$(FCEUX_CFLAGS)' \
|
|
|
|
LDFLAGS='$(FCEUX_LDFLAGS)' \
|
|
|
|
LIBS='$(FCEUX_LIBS)' \
|
|
|
|
CROSS_COMPILE=$(TARGET_CROSS) \
|
|
|
|
CHAINPREFIX='$(STAGING_DIR)/usr' \
|
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define FCEUX_INSTALL_TARGET_CMDS
|
|
|
|
$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/games
|
|
|
|
$(INSTALL) -m 0755 $(@D)/fceux/fceux $(TARGET_DIR)/usr/games/fceux
|
|
|
|
endef
|
|
|
|
|
2020-12-11 22:37:33 +00:00
|
|
|
define FCEUX_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 $(FCEUX_PKGDIR)/opk/nes $(TARGET_DIR)/usr/local/share/OPKs/Emulators/nes_fceux_funkey-s.opk -all-root -noappend -no-exports -no-xattrs
|
2020-12-11 22:37:33 +00:00
|
|
|
endef
|
|
|
|
FCEUX_POST_INSTALL_TARGET_HOOKS += FCEUX_CREATE_OPK
|
2020-05-25 07:03:43 +01:00
|
|
|
|
|
|
|
$(eval $(generic-package))
|