1################################################################################ 2# 3# irrlicht 4# 5################################################################################ 6 7IRRLICHT_VERSION_MAJOR = 1.8 8IRRLICHT_VERSION = $(IRRLICHT_VERSION_MAJOR).4 9IRRLICHT_SOURCE = irrlicht-$(IRRLICHT_VERSION).zip 10IRRLICHT_SITE = https://downloads.sourceforge.net/project/irrlicht/Irrlicht%20SDK/$(IRRLICHT_VERSION_MAJOR)/$(IRRLICHT_VERSION) 11IRRLICHT_INSTALL_STAGING = YES 12 13# Bundled libraries: bzip2, libaesGladman, libpng, lzma, zlib, 14# The handcrafted Makefile can only use bundled libraries. 15IRRLICHT_LICENSE = Zlib (irrlicht), BSD-3-Clause (libaesGladman), bzip2-1.0.5 (bzip2), IJG (libjpeg), Libpng (libpng) 16IRRLICHT_LICENSE_FILES = \ 17 doc/aesGladman.txt \ 18 doc/bzip2-license.txt \ 19 doc/irrlicht-license.txt \ 20 doc/jpglib-license.txt \ 21 doc/libpng-license.txt 22 23IRRLICHT_SUBDIR = source/Irrlicht 24 25IRRLICHT_DEPENDENCIES = libgl xlib_libXxf86vm 26 27define IRRLICHT_EXTRACT_CMDS 28 $(UNZIP) -d $(@D) $(IRRLICHT_DL_DIR)/$(IRRLICHT_SOURCE) 29 mv $(@D)/irrlicht-$(IRRLICHT_VERSION)/* $(@D) 30 $(RM) -r $(@D)/irrlicht-$(IRRLICHT_VERSION) 31endef 32 33IRRLICHT_CONF_OPTS = $(TARGET_CONFIGURE_OPTS) 34 35# Build a static library OR a shared library, otherwise we need to compile with -fPIC 36# "relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPIC" 37ifeq ($(BR2_STATIC_LIBS),) 38IRRLICHT_CONF_OPTS += sharedlib 39endif 40 41# Irrlicht fail to detect properly the NEON support on aarch64 or ARM with NEON FPU support. 42# While linking an application with libIrrlicht.so, we get an undefined reference to 43# png_init_filter_functions_neon. 44# Some files are missing in the libpng bundled in Irrlicht, in particular arm/arm_init.c, 45# so disable NEON support completely. 46IRRLICHT_CONF_OPTS += CPPFLAGS="$(TARGET_CPPFLAGS) -DPNG_ARM_NEON_OPT=0" 47 48define IRRLICHT_BUILD_CMDS 49 $(TARGET_MAKE_ENV) 50 $(MAKE) -C $(@D)/$(IRRLICHT_SUBDIR) $(IRRLICHT_CONF_OPTS) 51endef 52 53define IRRLICHT_INSTALL_STAGING_CMDS 54 $(TARGET_MAKE_ENV) $(MAKE) \ 55 INSTALL_DIR=$(STAGING_DIR)/usr/lib \ 56 -C $(@D)/$(IRRLICHT_SUBDIR) install 57endef 58 59define IRRLICHT_INSTALL_TARGET_CMDS 60 $(TARGET_MAKE_ENV) $(MAKE) \ 61 INSTALL_DIR=$(TARGET_DIR)/usr/lib \ 62 -C $(@D)/$(IRRLICHT_SUBDIR) install 63endef 64 65$(eval $(generic-package)) 66