2 # Copyright (C) 2006-2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(INCLUDE_DIR
)/host.mk
8 include $(INCLUDE_DIR
)/prereq.mk
14 STAMP_PREPARED
:=$(LINUX_DIR
)/.prepared
15 STAMP_CONFIGURED
:=$(LINUX_DIR
)/.configured
16 include $(INCLUDE_DIR
)/download.mk
17 include $(INCLUDE_DIR
)/quilt.mk
18 include $(INCLUDE_DIR
)/kernel-defaults.mk
21 $(call Kernel
/Prepare
/Default
)
24 define Kernel
/Configure
25 $(call Kernel
/Configure
/Default
)
28 define Kernel
/CompileModules
29 $(call Kernel
/CompileModules
/Default
)
32 define Kernel
/CompileImage
33 $(call Kernel
/CompileImage
/Default
)
37 $(call Kernel
/Clean
/Default
)
40 define Download
/kernel
43 MD5SUM
:=$(LINUX_KERNEL_MD5SUM
)
47 $(if
$(QUILT
),$(Build
/Quilt
))
48 $(if
$(LINUX_SITE
),$(call Download
,kernel
))
50 $(STAMP_PREPARED
): $(DL_DIR
)/$(LINUX_SOURCE
)
51 -rm -rf
$(KERNEL_BUILD_DIR
)
52 -mkdir
-p
$(KERNEL_BUILD_DIR
)
56 $(STAMP_CONFIGURED
): $(STAMP_PREPARED
) $(LINUX_CONFIG
) $(GENERIC_LINUX_CONFIG
) $(TOPDIR
)/.config
60 $(LINUX_DIR
)/.modules
: $(STAMP_CONFIGURED
) $(LINUX_DIR
)/.config FORCE
61 $(Kernel
/CompileModules
)
64 $(LINUX_DIR
)/.image
: $(STAMP_CONFIGURED
) FORCE
65 $(Kernel
/CompileImage
)
74 download
: $(DL_DIR
)/$(LINUX_SOURCE
)
75 prepare
: $(STAMP_CONFIGURED
)
76 compile
: $(LINUX_DIR
)/.modules
77 $(MAKE
) -C image compile TARGET_BUILD
=
79 oldconfig menuconfig
: $(STAMP_PREPARED
) FORCE
80 $(LINUX_CONFCMD
) > $(LINUX_DIR
)/.config
82 $(MAKE
) -C
$(LINUX_DIR
) $(KERNEL_MAKEOPTS
) $$@
83 $(SCRIPT_DIR
)/kconfig.pl
'>' $(GENERIC_LINUX_CONFIG
) $(LINUX_DIR
)/.config
> $(LINUX_CONFIG
)
86 install: $(LINUX_DIR
)/.image
87 TARGET_BUILD
="" $(MAKE
) -C image compile
install
90 rm -rf
$(KERNEL_BUILD_DIR
)
94 @if
[ -f
$(LINUX_KERNEL
) ]; then \
100 @
$(NO_TRACE_MAKE
) -s
-C image prereq TARGET_BUILD
=