aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/package/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/package/Makefile')
-rw-r--r--target/linux/package/Makefile36
1 files changed, 36 insertions, 0 deletions
diff --git a/target/linux/package/Makefile b/target/linux/package/Makefile
new file mode 100644
index 0000000000..868400d6a0
--- /dev/null
+++ b/target/linux/package/Makefile
@@ -0,0 +1,36 @@
+# Main makefile for the packages
+include $(TOPDIR)/rules.mk
+
+package-$(BR2_PACKAGE_KMOD_FUSE) += fuse
+package-$(BR2_PACKAGE_KMOD_SHFS) += shfs
+package-$(BR2_PACKAGE_KMOD_OPENSWAN) += openswan
+
+all: compile install
+clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
+compile: $(patsubst %,%-compile,$(package-y) $(package-m))
+install: $(patsubst %,%-install,$(package-y))
+
+%-prepare:
+ $(MAKE) -C $(patsubst %-prepare,%,$@) \
+ BUILD_DIR="$(BUILD_DIR)" \
+ KERNEL_DIR="$(KERNEL_DIR)" \
+ LINUX_VERSION="$(LINUX_VERSION)" \
+ prepare
+
+%-compile: %-prepare
+ $(MAKE) -C $(patsubst %-compile,%,$@) \
+ BUILD_DIR="$(BUILD_DIR)" \
+ KERNEL_DIR="$(KERNEL_DIR)" \
+ LINUX_VERSION="$(LINUX_VERSION)" \
+ compile
+
+%-install: %-compile
+ $(MAKE) -C $(patsubst %-install,%,$@) \
+ BUILD_DIR="$(BUILD_DIR)" \
+ KERNEL_DIR="$(KERNEL_DIR)" \
+ LINUX_VERSION="$(LINUX_VERSION)" \
+ install
+
+%-clean:
+ @$(MAKE) -C $(patsubst %-clean,%,$@) clean
+