host.mk 1.8 KB

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