aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-11-12 05:06:56 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-11-12 05:06:56 +0000
commit768b48f380f60031f632cd7d1bc6be05e03a72a8 (patch)
treedf67c1174d33863318f90dbce91f22c7b204038c /include
parent87f59ecd7c9bddefaf9710b21f61b1d5a310ebfc (diff)
downloadupstream-768b48f380f60031f632cd7d1bc6be05e03a72a8.tar.gz
upstream-768b48f380f60031f632cd7d1bc6be05e03a72a8.tar.bz2
upstream-768b48f380f60031f632cd7d1bc6be05e03a72a8.zip
implement target profiles in menuconfig
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5512 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include')
-rw-r--r--include/kernel-build.mk63
1 files changed, 42 insertions, 21 deletions
diff --git a/include/kernel-build.mk b/include/kernel-build.mk
index e491e489c1..35149d7686 100644
--- a/include/kernel-build.mk
+++ b/include/kernel-build.mk
@@ -6,6 +6,9 @@
#
KERNEL_BUILD:=1
+# For target profile selection - the default set
+DEFAULT_PACKAGES:=base-files libgcc uclibc bridge busybox dnsmasq dropbear iptables mtd ppp ppp-mod-pppoe mtd
+
ifeq ($(DUMP),1)
all: dumpinfo
else
@@ -146,41 +149,59 @@ define BuildKernel
mostlyclean: FORCE
$(call Kernel/Clean)
+ ifeq ($(DUMP),1)
+ dumpinfo:
+ @echo 'Target: $(BOARD)-$(KERNEL)'
+ @echo 'Target-Name: $(BOARDNAME) [$(KERNEL)]'
+ @echo 'Target-Path: $(subst $(TOPDIR)/,,$(PWD))'
+ @echo 'Target-Arch: $(ARCH)'
+ @echo 'Target-Features: $(FEATURES)'
+ @echo 'Linux-Version: $(LINUX_VERSION)'
+ @echo 'Linux-Release: $(LINUX_RELEASE)'
+ @echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'
+ @echo 'Target-Description:'
+ @getvar $(call shvar,Target/Description)
+ @echo '@@'
+ @echo 'Default-Packages: $(DEFAULT_PACKAGES)'
+ ifneq ($(DUMPINFO),)
+ @$(DUMPINFO)
+ endif
+ endif
+
define BuildKernel
endef
endef
+define Profile/Default
+ NAME:=
+ PACKAGES:=
+endef
+
+define Profile
+ $(eval $(call Profile/Default))
+ $(eval $(call Profile/$(1)))
+ DUMPINFO += \
+ echo "Target-Profile: $(1)"; \
+ echo "Target-Profile-Name: $(NAME)"; \
+ echo "Target-Profile-Packages: $(PACKAGES)";
+endef
+
$(eval $(call shexport,Target/Description))
-ifeq ($(DUMP),1)
- dumpinfo:
- @echo 'Target: $(BOARD)-$(KERNEL)'
- @echo 'Target-Name: $(BOARDNAME) [$(KERNEL)]'
- @echo 'Target-Path: $(subst $(TOPDIR)/,,$(PWD))'
- @echo 'Target-Arch: $(ARCH)'
- @echo 'Target-Features: $(FEATURES)'
- @echo 'Linux-Version: $(LINUX_VERSION)'
- @echo 'Linux-Release: $(LINUX_RELEASE)'
- @echo 'Linux-Kernel-Arch: $(LINUX_KARCH)'
- @echo 'Target-Description:'
- @echo "$$$(call shvar,Target/Description)"
- @echo '@@'
-else
- download: $(DL_DIR)/$(LINUX_SOURCE)
- prepare: $(LINUX_DIR)/.configured $(TMP_DIR)/.kernel.mk
- compile: $(LINUX_DIR)/.modules
- install: $(LINUX_DIR)/.image
+download: $(DL_DIR)/$(LINUX_SOURCE)
+prepare: $(LINUX_DIR)/.configured $(TMP_DIR)/.kernel.mk
+compile: $(LINUX_DIR)/.modules
+install: $(LINUX_DIR)/.image
- clean: FORCE
+clean: FORCE
rm -f $(STAMP_DIR)/.linux-compile
rm -rf $(KERNEL_BUILD_DIR)
- rebuild: FORCE
+rebuild: FORCE
@$(MAKE) mostlyclean
@if [ -f $(LINUX_KERNEL) ]; then \
$(MAKE) clean; \
fi
@$(MAKE) compile
-endif