1
0

host.mk 2.3 KB

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