summaryrefslogtreecommitdiff
path: root/target/linux/package/Makefile
blob: 7e8588d99ad10f22b01dd009a3c76f3e8d35d006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Main makefile for the packages
include $(TOPDIR)/rules.mk

ifneq ($(BOARD),ar7)
package-$(BR2_PACKAGE_KMOD_ALSA) += alsa
endif
package-$(BR2_PACKAGE_KMOD_FUSE) += fuse
package-$(BR2_PACKAGE_KMOD_MINI_FO) += mini_fo
package-$(BR2_PACKAGE_KMOD_SHFS) += shfs
package-$(BR2_PACKAGE_KMOD_OPENSWAN) += openswan
package-$(BR2_PACKAGE_KMOD_MADWIFI) += madwifi
package-y += openwrt

ifeq ($(BOARD)-$(KERNEL),brcm-2.4)
package-$(BR2_PACKAGE_KMOD_WLCOMPAT) += wlcompat
package-$(BR2_PACKAGE_KMOD_DIAG) += diag
wlcompat-compile: openwrt-compile
endif

all: compile install
clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
prepare: $(patsubst %,%-prepare,$(package-y) $(package-m))
compile: $(patsubst %,%-compile,$(package-y) $(package-m))
install: $(patsubst %,%-install,$(package-y))

MAKEOPTS:=	BOARD="$(BOARD)" \
		KERNEL="$(KERNEL)" \
		IPKG="$(IPKG)" \
		TARGET_DIR="$(TARGET_DIR)" \
		BUILD_DIR="$(BUILD_DIR)" \
		KERNEL_DIR="$(KERNEL_DIR)" \
		LINUX_VERSION="$(LINUX_VERSION)" \
		KERNEL_RELEASE="$(KERNEL_RELEASE)"


%-prepare:
	$(MAKE) -C $(patsubst %-prepare,%,$@) \
		$(MAKEOPTS) \
		prepare

%-compile: %-prepare 
	$(MAKE) -C $(patsubst %-compile,%,$@) \
		$(MAKEOPTS) \
		compile

%-install: %-compile
	$(MAKE) -C $(patsubst %-install,%,$@) \
		$(MAKEOPTS) \
		install

%-clean:
	@$(MAKE) -C $(patsubst %-clean,%,$@) clean