aufs-util.mk 1.9 KB

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