fix switch driver makefile
[openwrt.git] / openwrt / target / linux / package / Makefile
1 # Main makefile for the packages
2 include $(TOPDIR)/rules.mk
3
4 ifneq ($(BOARD),ar7)
5 package-$(BR2_PACKAGE_KMOD_ALSA) += alsa
6 endif
7 package-$(BR2_PACKAGE_KMOD_FUSE) += fuse
8 package-$(BR2_PACKAGE_KMOD_HOSTAP) += hostap
9 package-$(BR2_PACKAGE_KMOD_MADWIFI) += madwifi
10 package-$(BR2_PACKAGE_KMOD_MINI_FO) += mini_fo
11 package-$(BR2_PACKAGE_KMOD_OPENSWAN) += openswan
12 package-$(BR2_PACKAGE_KMOD_SHFS) += shfs
13 package-$(BR2_PACKAGE_KMOD_SPCA5XX) += spca5xx
14 package-$(BR2_PACKAGE_KMOD_SWITCH) += switch
15 package-y += base-files
16
17 ifeq ($(BOARD)-$(KERNEL),brcm-2.4)
18 package-$(BR2_PACKAGE_KMOD_DIAG) += diag
19 package-$(BR2_PACKAGE_KMOD_WLCOMPAT) += wlcompat
20 wlcompat-compile: base-files-compile
21 endif
22
23 all: compile install
24 clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
25 prepare: $(patsubst %,%-prepare,$(package-y) $(package-m))
26 compile: $(patsubst %,%-compile,$(package-y) $(package-m))
27 install: $(patsubst %,%-install,$(package-y))
28
29 MAKEOPTS:= BOARD="$(BOARD)" \
30 KERNEL="$(KERNEL)" \
31 IPKG="$(IPKG)" \
32 TARGET_DIR="$(TARGET_DIR)" \
33 BUILD_DIR="$(BUILD_DIR)" \
34 KERNEL_DIR="$(KERNEL_DIR)" \
35 LINUX_VERSION="$(LINUX_VERSION)" \
36 KERNEL_RELEASE="$(KERNEL_RELEASE)"
37
38
39 %-prepare:
40 @$(START_TRACE) "target/linux/package/$(patsubst %-prepare,%,$@)/prepare: "
41 $(MAKE) -C $(patsubst %-prepare,%,$@) \
42 $(MAKEOPTS) \
43 prepare
44 @$(CMD_TRACE) " done"
45 @$(END_TRACE)
46
47 %-compile:
48 @$(START_TRACE) "target/linux/package/$(patsubst %-compile,%,$@)-compile: "
49 $(MAKE) -C $(patsubst %-compile,%,$@) \
50 $(MAKEOPTS) \
51 compile
52 @$(CMD_TRACE) " done"
53 @$(END_TRACE)
54
55 %-install:
56 @$(START_TRACE) "target/linux/package/$(patsubst %-install,%,$@)-install: "
57 $(MAKE) -C $(patsubst %-install,%,$@) \
58 $(MAKEOPTS) \
59 install
60 @$(CMD_TRACE) " done"
61 @$(END_TRACE)
62
63 %-clean:
64 @$(START_TRACE) "target/linux/package/$(patsubst %-clean,%,$@)-clean: "
65 @$(MAKE) -C $(patsubst %-clean,%,$@) clean
66 @$(CMD_TRACE) " done"
67 @$(END_TRACE)
68
This page took 0.038171 seconds and 5 git commands to generate.