Makefile 2.2 KB

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