Added Blacklist feature for SDL2 stuff

This commit is contained in:
Gerhard Stein
2020-09-29 16:40:03 +00:00
parent 99effe98c4
commit 6962dd59fa
2 changed files with 18 additions and 3 deletions

View File

@@ -996,13 +996,13 @@ $SEDI "s/public static String AppLibraries.*/public static String AppLibraries[]
$SEDI "s/public static String AppMainLibraries.*/public static String AppMainLibraries[] = { $MainLibrariesToLoad };/" project/src/Globals.java
APP_MODULES_BASE="sdl-$LibSdlVersion sdl_main sdl_native_helpers jpeg png ogg flac vorbis freetype"
# TODO: We should not build png, jpeg if SDL2_image is used
if [ "$LibSdlVersion" = "2.0" ]; then
APP_MODULES_BASE="sdl-$LibSdlVersion"
fi
echo Patching project/jni/Settings.mk
echo '# DO NOT EDIT THIS FILE - it is automatically generated, edit file SettingsTemplate.mk' > project/jni/Settings.mk
cat project/jni/SettingsTemplate.mk | \

View File

@@ -12,4 +12,19 @@ endif
NDK_PATH := $(shell dirname $(shell which ndk-build))
include $(call all-subdir-makefiles)
NDK_SUBDIR_MAKEFILES_FULL := $(call all-subdir-makefiles)
# If you want to exclude certain subprojects from the build process.
# v.g.: SDL2_image already brings it's own implementation of png, so we exclude the bundled one
ifeq ($(SDL_VERSION),2.0)
BLACKLISTED_SUBPROJECTS := jpeg png
else
BLACKLISTED_SUBPROJECTS := sdl2_image
endif
BLACKLISTED_MAKEFILES := $(addprefix jni/../jni/,$(BLACKLISTED_SUBPROJECTS))
BLACKLISTED_MAKEFILES := $(addsuffix /Android.mk,$(BLACKLISTED_MAKEFILES))
NDK_SUBDIR_MAKEFILES := $(filter-out $(BLACKLISTED_MAKEFILES), $(NDK_SUBDIR_MAKEFILES_FULL))
include $(NDK_SUBDIR_MAKEFILES)