kumquat-buildroot/package/irrlicht/irrlicht.mk
Maxime Hadjinlian 514291f39e packages: use new $($PKG)_DL_DIR) variable
Instead of DL_DIR, the package should now use $(PKG)_DL_DIR to ease the
transition into a new directory structure for DL_DIR.

This commit has been generated with the following scripts:

for i in $(find . -iname "*.mk"); do
	if ! grep -q "\$(DL_DIR)" ${i}; then
		continue
	fi
	pkg_name="$(basename $(dirname ${i}))"
	[ "${pkg_name}" = "package" ] && continue
	raw_pkg_name=$(echo ${pkg_name} | tr [a-z] [A-Z] | tr '-' '_')
	pkg_dl_dir="${raw_pkg_name}_DL_DIR"
	sed -i "s/\$(DL_DIR)/\$($pkg_dl_dir)/" ${i}
done

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-04-02 15:53:53 +02:00

59 lines
1.8 KiB
Makefile

################################################################################
#
# irrlicht
#
################################################################################
IRRLICHT_VERSION_MAJOR = 1.8
IRRLICHT_VERSION = $(IRRLICHT_VERSION_MAJOR).4
IRRLICHT_SOURCE = irrlicht-$(IRRLICHT_VERSION).zip
IRRLICHT_SITE = https://downloads.sourceforge.net/project/irrlicht/Irrlicht%20SDK/$(IRRLICHT_VERSION_MAJOR)/$(IRRLICHT_VERSION)
IRRLICHT_INSTALL_STAGING = YES
# Bundled libraries: bzip2, libaesGladman, libpng, lzma, zlib,
# The handcrafted Makefile can only use bundled libraries.
IRRLICHT_LICENSE = Zlib (irrlicht), BSD-3-Clause (libaesGladman), bzip2-1.0.5 (bzip2), IJG (libjpeg), Libpng (libpng)
IRRLICHT_LICENSE_FILES = \
doc/aesGladman.txt \
doc/bzip2-license.txt \
doc/irrlicht-license.txt \
doc/jpglib-license.txt \
doc/libpng-license.txt
IRRLICHT_SUBDIR = source/Irrlicht
IRRLICHT_DEPENDENCIES = libgl xlib_libXxf86vm
define IRRLICHT_EXTRACT_CMDS
$(UNZIP) -d $(@D) $(IRRLICHT_DL_DIR)/$(IRRLICHT_SOURCE)
mv $(@D)/irrlicht-$(IRRLICHT_VERSION)/* $(@D)
$(RM) -r $(@D)/irrlicht-$(IRRLICHT_VERSION)
endef
IRRLICHT_CONF_OPTS = $(TARGET_CONFIGURE_OPTS)
# Build a static library OR a shared library, otherwise we need to compile with -fPIC
# "relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPIC"
ifeq ($(BR2_STATIC_LIBS),)
IRRLICHT_CONF_OPTS += sharedlib
endif
define IRRLICHT_BUILD_CMDS
$(TARGET_MAKE_ENV)
$(MAKE) -C $(@D)/$(IRRLICHT_SUBDIR) $(IRRLICHT_CONF_OPTS)
endef
define IRRLICHT_INSTALL_STAGING_CMDS
$(TARGET_MAKE_ENV) $(MAKE) \
INSTALL_DIR=$(STAGING_DIR)/usr/lib \
-C $(@D)/$(IRRLICHT_SUBDIR) install
endef
define IRRLICHT_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) \
INSTALL_DIR=$(TARGET_DIR)/usr/lib \
-C $(@D)/$(IRRLICHT_SUBDIR) install
endef
$(eval $(generic-package))