move package/linux into target/linux, use wbx' new kernel code. support building...
[openwrt.git] / target / linux / package / Makefile
1 # Main makefile for the packages
2 include $(TOPDIR)/rules.mk
3
4 package-$(BR2_PACKAGE_KMOD_FUSE) += fuse
5 package-$(BR2_PACKAGE_KMOD_SHFS) += shfs
6 package-$(BR2_PACKAGE_KMOD_OPENSWAN) += openswan
7
8 all: compile install
9 clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
10 compile: $(patsubst %,%-compile,$(package-y) $(package-m))
11 install: $(patsubst %,%-install,$(package-y))
12
13 %-prepare:
14         $(MAKE) -C $(patsubst %-prepare,%,$@) \
15                 BUILD_DIR="$(BUILD_DIR)" \
16                 KERNEL_DIR="$(KERNEL_DIR)" \
17                 LINUX_VERSION="$(LINUX_VERSION)" \
18                 prepare
19
20 %-compile: %-prepare 
21         $(MAKE) -C $(patsubst %-compile,%,$@) \
22                 BUILD_DIR="$(BUILD_DIR)" \
23                 KERNEL_DIR="$(KERNEL_DIR)" \
24                 LINUX_VERSION="$(LINUX_VERSION)" \
25                 compile
26
27 %-install: %-compile
28         $(MAKE) -C $(patsubst %-install,%,$@) \
29                 BUILD_DIR="$(BUILD_DIR)" \
30                 KERNEL_DIR="$(KERNEL_DIR)" \
31                 LINUX_VERSION="$(LINUX_VERSION)" \
32                 install
33
34 %-clean:
35         @$(MAKE) -C $(patsubst %-clean,%,$@) clean
36