1################################################################################ 2# 3# aufs-util 4# 5################################################################################ 6 7# linux-headers 8AUFS_UTIL_VERSION = $(call qstrip,$(BR2_PACKAGE_AUFS_UTIL_VERSION)) 9AUFS_UTIL_SITE = http://git.code.sf.net/p/aufs/aufs-util 10AUFS_UTIL_SITE_METHOD = git 11AUFS_UTIL_LICENSE = GPL-2.0 12AUFS_UTIL_LICENSE_FILES = COPYING 13 14AUFS_UTIL_DEPENDENCIES = linux 15 16# Building aufs-util requires access to the kernel headers of aufs, 17# which are only available in the kernel build directory, which is why 18# we add -I$(LINUX_DIR)/include/uapi. These headers have not been 19# prepared for usage by userspace, so to workaround this we have to 20# defined the "__user" macro as empty. 21AUFS_UTIL_HOST_CPPFLAGS = \ 22 $(HOST_CPPFLAGS) \ 23 -I$(LINUX_DIR)/include/uapi \ 24 -D__user= 25 26AUFS_UTIL_CPPFLAGS = \ 27 $(TARGET_CPPFLAGS) \ 28 -I$(LINUX_DIR)/include/uapi \ 29 -D__user= 30 31# rdu64 is supposed to provide the LFS variant of readdir(), 32# readdir64(). However, because Buildroot is always LFS-enabled, 33# readdir() is always the LFS variant. Drop rdu64 from the build, as 34# it causes build failures due to multiple implementations of 35# readdir64(). 36define AUFS_UTIL_REMOVE_RDU64 37 $(SED) 's% rdu64.o%%' $(@D)/libau/Makefile 38endef 39 40AUFS_UTIL_POST_PATCH_HOOKS += AUFS_UTIL_REMOVE_RDU64 41 42# First, we build the host tools, needed to build the target tools. 43define AUFS_UTIL_BUILD_CMDS 44 $(HOST_MAKE_ENV) $(MAKE) -C $(@D) \ 45 $(HOST_CONFIGURE_OPTS) \ 46 CPPFLAGS="$(AUFS_UTIL_HOST_CPPFLAGS)" \ 47 HOSTCC="$(HOSTCC)" HOSTLD="$(HOSTLD)" \ 48 INSTALL="$(INSTALL)" c2sh c2tmac 49 $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) \ 50 $(TARGET_CONFIGURE_OPTS) \ 51 CPPFLAGS="$(AUFS_UTIL_CPPFLAGS)" \ 52 INSTALL="$(INSTALL)" all 53endef 54 55define AUFS_UTIL_INSTALL_TARGET_CMDS 56 $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) INSTALL="$(INSTALL)" DESTDIR="$(TARGET_DIR)" install 57endef 58 59$(eval $(generic-package)) 60