irrlicht.mk 2.2 KB

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