host.mk 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. HOST_CONFIGURE_ENV+= AUTOM4TE=${STAGING_HOST_DIR}/usr/bin/autom4te \
  4. CONFIG_SHELL='$(strip ${SHELL})' \
  5. PATH='${TARGET_PATH}' \
  6. CFLAGS='$(strip ${CFLAGS_FOR_BUILD})' \
  7. CXXFLAGS='$(strip ${CXXFLAGS_FOR_BUILD})' \
  8. CPPFLAGS='$(strip ${CPPFLAGS_FOR_BUILD})' \
  9. LDFLAGS='$(strip ${LDFLAGS_FOR_BUILD})'
  10. # this is environment for 'make all' and 'make install'
  11. HOST_MAKE_ENV?=
  12. # this is arguments for 'make all' and 'make install'
  13. HOST_XAKE_FLAGS?=
  14. # this is arguments for 'make all' ONLY
  15. HOST_MAKE_FLAGS?=
  16. # this is arguments for 'make install' ONLY
  17. HOST_FAKE_FLAGS?=
  18. HOST_ALL_TARGET?= all
  19. HOST_INSTALL_TARGET?= install
  20. HOST_MAKE_ENV+= PATH='${TARGET_PATH}' \
  21. CFLAGS='$(strip ${CFLAGS_FOR_BUILD})' \
  22. CXXFLAGS='$(strip ${CXXFLAGS_FOR_BUILD})' \
  23. CPPFLAGS='$(strip ${CPPFLAGS_FOR_BUILD})' \
  24. LDFLAGS='$(strip ${LDFLAGS_FOR_BUILD})'
  25. HOST_MAKE_FLAGS+= ${HOST_XAKE_FLAGS} V=1
  26. HOST_FAKE_FLAGS+= ${HOST_XAKE_FLAGS}
  27. HOST_WRKINST= ${WRKDIR}/host
  28. _HOST_EXTRACT_COOKIE= ${WRKDIST}/.extract_done
  29. _HOST_PATCH_COOKIE= ${WRKDIST}/.prepared
  30. _HOST_CONFIGURE_COOKIE= ${WRKDIR}/.host_configure_done
  31. _HOST_BUILD_COOKIE= ${WRKDIR}/.host_build_done
  32. _HOST_FAKE_COOKIE= ${HOST_WRKINST}/.host_fake_done
  33. _HOST_COOKIE= ${PACKAGE_DIR}/.stamps/${PKG_NAME}${PKG_VERSION}-${PKG_RELEASE}-host
  34. hostextract: ${_HOST_EXTRACT_COOKIE}
  35. hostpatch: ${_HOST_PATCH_COOKIE}
  36. hostconfigure: ${_HOST_CONFIGURE_COOKIE}
  37. hostbuild: ${_HOST_BUILD_COOKIE}
  38. hostfake: ${_HOST_FAKE_COOKIE}
  39. # there are some parameters to the HOST_template function
  40. # 1.) Config.in identifier ADK_PACKAGE_$(1)
  41. # 2.) name of the package, for single package mostly $(PKG_NAME)
  42. # 3.) package version (upstream version) and package release (adk version),
  43. # always $(PKG_VERSION)-$(PKG_RELEASE)
  44. define HOST_template
  45. ALL_PKGOPTS+= $(1)
  46. PKGNAME_$(1)= $(2)
  47. HOSTDIR_$(1)= $(WRKDIR)/host
  48. ALL_HOSTDIRS+= $${HOSTDIR_$(1)}
  49. ALL_HOSTINST+= $(2)-hostinstall
  50. $$(HOSTDIR_$(1)): ${_HOST_PATCH_COOKIE} ${_HOST_FAKE_COOKIE}
  51. endef
  52. .PHONY: all hostextract hostpatch hostconfigure \
  53. hostbuild hostpackage hostfake