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