port over the netfilter module packaging to the new system and fix iptables dependencies
[openwrt.git] / package / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10 include $(TOPDIR)/.config
11 include $(TOPDIR)/.pkgdeps
12
13 SOURCE_PACKAGES:=$(patsubst %,%-download,$(package-y) $(package-m))
14 COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
15 INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
16
17 $(STAMP_DIR) $(TARGET_DIR):
18 mkdir -p $@
19
20 %-download: $(STAMP_DIR) $(TARGET_DIR)
21 $(MAKE) -C $(patsubst %-download,%,$@) download MAKEFLAGS="$(BUILD_MAKEFLAGS)"
22
23 %-prepare: $(STAMP_DIR) $(TARGET_DIR)
24 $(MAKE) -C $(patsubst %-prepare,%,$@) prepare MAKEFLAGS="$(BUILD_MAKEFLAGS)"
25
26 %-compile: $(STAMP_DIR) $(TARGET_DIR)
27 $(MAKE) -C $(patsubst %-compile,%,$@) compile MAKEFLAGS="$(BUILD_MAKEFLAGS)"
28
29 %-install: $(STAMP_DIR) $(TARGET_DIR)
30 $(MAKE) -C $(patsubst %-install,%,$@) install MAKEFLAGS="$(BUILD_MAKEFLAGS)"
31
32 %-clean: $(STAMP_DIR) $(TARGET_DIR)
33 $(MAKE) -C $(patsubst %-clean,%,$@) clean MAKEFLAGS="$(BUILD_MAKEFLAGS)"
34
35 ifeq ($(SDK),1)
36 GENDEP_OPTS := -s
37 endif
38
39 $(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo
40 @$(TOPDIR)/scripts/gen_deps.pl $(GENDEP_OPTS) < $< > $@ || rm -f $@
41
42 all: compile
43 clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
44 download: $(SOURCE_PACKAGES)
45 compile-targets: $(COMPILE_PACKAGES)
46 compile:
47 $(MAKE) -j$(CONFIG_JLEVEL) compile-targets
48 install-targets: base-files-install $(INSTALL_PACKAGES)
49 install:
50 rm -rf $(BUILD_DIR)/root
51 $(MAKE) install-targets
52
This page took 0.042199 seconds and 5 git commands to generate.