1
0

Makefile 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #
  2. # Copyright (C) 2006-2010 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. include $(INCLUDE_DIR)/kernel.mk
  9. PKG_NAME:=kernel
  10. PKG_FLAGS:=hold
  11. PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/packages
  12. SUBTARGETS = $(sort $(filter-out feeds,$(notdir $(wildcard $(TOPDIR)/target/linux/* $(TOPDIR)/target/linux/feeds/*))))
  13. SUBTARGET_MODULES = $(foreach t,$(SUBTARGETS),$(firstword $(wildcard $(TOPDIR)/target/linux/feeds/$(t)/modules.mk $(TOPDIR)/target/linux/$(t)/modules.mk)))
  14. SCAN_DEPS=modules/*.mk $(SUBTARGET_MODULES) $(TOPDIR)/include/netfilter.mk
  15. PKG_LICENSE:=GPL-2.0
  16. PKG_LICENSE_FILES:=
  17. export SHELL:=/bin/sh
  18. .ONESHELL:
  19. .SHELLFLAGS = -ec
  20. include $(INCLUDE_DIR)/package.mk
  21. ifeq ($(DUMP),)
  22. STAMP_BUILT:=$(STAMP_BUILT)_$(shell $(SCRIPT_DIR)/kconfig.pl $(LINUX_DIR)/.config | $(MKHASH) md5)
  23. -include $(LINUX_DIR)/.config
  24. endif
  25. define Build/Prepare
  26. mkdir -p $(PKG_BUILD_DIR)
  27. endef
  28. define Build/Configure
  29. endef
  30. define Build/Compile
  31. endef
  32. define KernelPackage/depends
  33. endef
  34. CONFIG_PACKAGE_kernel=y
  35. define Package/kernel
  36. SECTION:=sys
  37. CATEGORY:=Kernel
  38. DEFAULT:=y
  39. TITLE:=Virtual kernel package
  40. VERSION:=$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC)
  41. URL:=http://www.kernel.org/
  42. PKG_FLAGS:=nonshared
  43. endef
  44. define Package/kernel/install
  45. # nothing to do
  46. endef
  47. define Package/kernel/extra_provides
  48. sed -e 's,.*/,,' $(LINUX_DIR)/modules.builtin;
  49. endef
  50. $(eval $(if $(DUMP),,$(call BuildPackage,kernel)))
  51. include $(sort $(wildcard ./modules/*.mk))
  52. -include $(SUBTARGET_MODULES)