Makefile 847 B

123456789101112131415161718192021222324252627282930313233343536
  1. #
  2. # Copyright (C) 2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=coreutils
  9. PKG_VERSION:=8.27
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  11. PKG_SOURCE_URL:=@GNU/coreutils
  12. PKG_HASH:=8891d349ee87b9ff7870f52b6d9312a9db672d2439d289bc57084771ca21656b
  13. HOST_BUILD_PARALLEL := 1
  14. BUILD_PROGRAMS = date readlink
  15. include $(INCLUDE_DIR)/host-build.mk
  16. BUILD_BINS = $(patsubst %,src/%,$(BUILD_PROGRAMS))
  17. HOST_CONFIGURE_ARGS += \
  18. --enable-install-program=$(subst $(space),$(comma),$(strip $(BUILD_PROGRAMS)))
  19. HOST_MAKE_FLAGS += \
  20. PROGRAMS="$(BUILD_BINS)" \
  21. LIBRARIES= MANS= SUBDIRS=.
  22. define Host/Install
  23. $(INSTALL_DIR) $(1)/bin
  24. $(CP) $(patsubst %,$(HOST_BUILD_DIR)/%,$(BUILD_BINS)) $(1)/bin/
  25. endef
  26. $(eval $(call HostBuild))