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

@@ -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)