Makefile 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. include $(ADK_TOPDIR)/rules.mk
  4. include ../rules.mk
  5. include ${ADK_TOPDIR}/mk/kernel-ver.mk
  6. include $(ADK_TOPDIR)/mk/linux.mk
  7. include ${ADK_TOPDIR}/mk/kernel-vars.mk
  8. include ${ADK_TOPDIR}/mk/buildhlp.mk
  9. $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION)/.patched:
  10. ifeq ($(ADK_LINUX_XTENSA),y)
  11. tar xf $(ADK_TOPDIR)/target/xtensa/overlay/xtensa_dc232b.tar \
  12. --strip-components=1 -C $(WRKSRC) linux
  13. endif
  14. ifneq ($(ADK_DISABLE_KERNEL_PATCHES),y)
  15. $(TRACE) kernel-patch
  16. $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION) \
  17. $(ADK_TOPDIR)/target/linux/patches/$(KERNEL_VERSION) *.patch $(MAKE_TRACE)
  18. endif
  19. ifneq ($(ADK_DISABLE_TARGET_KERNEL_PATCHES),y)
  20. $(TRACE) kernel-target-patch
  21. $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION) \
  22. $(ADK_TOPDIR)/target/$(ADK_TARGET_ARCH)/$(ADK_TARGET_SYSTEM)/patches/$(KERNEL_VERSION) *.patch $(MAKE_TRACE)
  23. endif
  24. ifeq ($(ADK_KERNEL_ADDON_YAFFS2),y)
  25. $(TRACE) yaffs2-kernel-patch
  26. $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION) \
  27. $(ADK_TOPDIR)/target/linux/patches/$(KERNEL_VERSION) patch-yaffs2 $(MAKE_TRACE)
  28. endif
  29. ifeq ($(ADK_KERNEL_ADDON_GRSEC),y)
  30. $(TRACE) grsec-kernel-patch
  31. $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION) \
  32. $(ADK_TOPDIR)/target/linux/patches/$(KERNEL_VERSION) patch-grsec $(MAKE_TRACE)
  33. endif
  34. ifeq ($(ADK_KERNEL_ADDON_MPTCP),y)
  35. $(TRACE) mptcp-kernel-patch
  36. $(PATCH) $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION) \
  37. $(ADK_TOPDIR)/target/linux/patches/$(KERNEL_VERSION) patch-mptcp $(MAKE_TRACE)
  38. endif
  39. touch $@
  40. $(WRKBUILD)/.headers: $(TOOLCHAIN_BUILD_DIR)/w-$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)/linux-$(KERNEL_VERSION)/.patched
  41. ${KERNEL_MAKE_ENV} $(MAKE) -C $(WRKBUILD) ${KERNEL_MAKE_OPTS} headers_check
  42. ${KERNEL_MAKE_ENV} $(MAKE) -C $(WRKBUILD) ${KERNEL_MAKE_OPTS} \
  43. INSTALL_HDR_PATH=$(STAGING_TARGET_DIR)/usr \
  44. headers_install
  45. @-find $(STAGING_TARGET_DIR)/usr/include -name .install -delete
  46. @-find $(STAGING_TARGET_DIR)/usr/include -name ..install.cmd -delete
  47. touch $@
  48. include ${ADK_TOPDIR}/mk/toolchain.mk