af3e3bd26f0fca550dd93ed4993a29d7f8cf355f
[openwrt/svn-archive/openwrt.git] / openwrt / target / linux / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_OS:=$(shell uname -s)
4 PKG_CPU:=$(shell uname -m)
5
6 define kernel_template
7 ifeq ($(CONFIG_LINUX_$(3)),y)
8 KERNEL:=$(1)
9 BOARD:=$(2)
10 endif
11 endef
12
13 $(eval $(call kernel_template,2.4,brcm,2_4_BRCM))
14 $(eval $(call kernel_template,2.4,ar7,2_4_AR7))
15 $(eval $(call kernel_template,2.4,x86,2_4_X86))
16 $(eval $(call kernel_template,2.6,brcm,2_6_BRCM))
17 $(eval $(call kernel_template,2.6,x86,2_6_X86))
18 $(eval $(call kernel_template,2.4,ar531x,2_4_AR531X))
19 $(eval $(call kernel_template,2.6,aruba,2_6_ARUBA))
20 $(eval $(call kernel_template,2.6,au1000,2_6_AU1000))
21 $(eval $(call kernel_template,2.6,xscale,2_6_XSCALE))
22 $(eval $(call kernel_template,2.6,sibyte,2_6_SIBYTE))
23
24 export BOARD
25 export KERNEL
26
27 prepare:
28 $(MAKE) -C $(BOARD)-$(KERNEL) prepare
29
30 compile:
31 $(MAKE) -C $(BOARD)-$(KERNEL) compile
32
33 install:
34 $(MAKE) -C $(BOARD)-$(KERNEL) install
35 $(MAKE) -C image/$(BOARD) install
36
37 clean:
38 $(MAKE) -C $(BOARD)-$(KERNEL) clean
39
40 image/%:
41 $(MAKE) -C image $(patsubst image/%,%,$@)