Skip to content

Commit

Permalink
[PACKAGE] LIBRETRO_MGBA - add LOCALE ifdef to *.mk
Browse files Browse the repository at this point in the history
+cleanup
  • Loading branch information
Apaczer committed Nov 26, 2023
1 parent e963c0e commit 6bed90d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions package/libretro-mgba/libretro-mgba.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,23 @@ else
mgba_platform="miyoo"
endif

LIBRETRO_MGBA_CFLAGS = $(TARGET_CFLAGS) $(COMPILER_COMMONS_CFLAGS_SO)
ifeq ($(BR2_TOOLCHAIN_BUILDROOT_LOCALE),y)
LIBRETRO_MGBA_CFLAGS += -DHAVE_LOCALE
endif

define LIBRETRO_MGBA_BUILD_CMDS

CFLAGS="$(TARGET_CFLAGS) $(COMPILER_COMMONS_CFLAGS_SO)" \
CFLAGS="$(LIBRETRO_MGBA_CFLAGS)" \
CXXFLAGS="$(TARGET_CXXFLAGS) $(COMPILER_COMMONS_CXXFLAGS_SO)" \
LDFLAGS="$(TARGET_LDFLAGS) $(COMPILER_COMMONS_LDFLAGS_SO)" \
$(MAKE) CXX="$(TARGET_CXX)" CC="$(TARGET_CC)" -C $(@D)/ -f Makefile.libretro platform="$(mgba_platform)"
$(TARGET_STRIP) --strip-unneeded $(@D)/*_libretro.so
endef

define LIBRETRO_MGBA_INSTALL_TARGET_CMDS
mkdir -p "${BINARIES_DIR}/retroarch/cores"
mkdir -p $(BINARIES_DIR)/retroarch/cores
$(INSTALL) -D $(@D)/mgba_libretro.so \
${BINARIES_DIR}/retroarch/cores/mgba_libretro.so
$(BINARIES_DIR)/retroarch/cores/mgba_libretro.so
endef

$(eval $(generic-package))

0 comments on commit 6bed90d

Please sign in to comment.