don't exit on tar errors in wireless-tools - sgid flag on directory not accepted...
[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 include $(INCLUDE_DIR)/host.mk
13
14 PREREQ_PACKAGES:=$(patsubst %,%-prereq,$(prereq-y) $(prereq-m))
15 DOWNLOAD_PACKAGES:=$(patsubst %,%-download,$(package-y) $(package-m))
16 COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
17 INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
18
19 $(STAMP_DIR) $(TARGET_DIR):
20 mkdir -p $@
21
22 %-prereq: $(STAMP_DIR) $(TARGET_DIR)
23 $(MAKE) -C $(patsubst %-prereq,%,$@) prereq
24
25 %-download: $(STAMP_DIR) $(TARGET_DIR)
26 $(MAKE) -C $(patsubst %-download,%,$@) download
27
28 %-prepare: $(STAMP_DIR) $(TARGET_DIR)
29 $(MAKE) -C $(patsubst %-prepare,%,$@) prepare
30
31 %-compile: $(STAMP_DIR) $(TARGET_DIR)
32 $(MAKE) -C $(patsubst %-compile,%,$@) compile
33
34 %-install: $(STAMP_DIR) $(TARGET_DIR)
35 $(MAKE) -C $(patsubst %-install,%,$@) install
36
37 %-clean: $(STAMP_DIR) $(TARGET_DIR)
38 $(MAKE) -C $(patsubst %-clean,%,$@) clean
39
40 ifeq ($(SDK),1)
41 GENDEP_OPTS := -s
42 endif
43
44 $(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo
45 @$(TOPDIR)/scripts/gen_deps.pl $(GENDEP_OPTS) < $< > $@ || rm -f $@
46
47 all: compile
48 clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
49 prereq: $(PREREQ_PACKAGES)
50 download: $(DOWNLOAD_PACKAGES)
51 compile-targets: $(COMPILE_PACKAGES)
52 compile:
53 $(MAKE) compile-targets
54 install-targets: base-files-install $(INSTALL_PACKAGES)
55 install:
56 rm -rf $(BUILD_DIR)/root
57 $(MAKE) install-targets
58
59 index: $(PACKAGE_DIR)/Packages
60
61 $(PACKAGE_DIR)/Packages: $(PACKAGE_DIR)/*.ipk
62 (cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages)
63
64
65 ifeq ($(MAKECMDGOALS),compile-targets)
66 MAKEFLAGS:=$(MAKEFLAGS) -j$(CONFIG_JLEVEL)
67 else
68 .NOTPARALLEL:
69 endif
This page took 0.040182 seconds and 5 git commands to generate.