2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
10 include $(TOPDIR
)/.config
11 include $(INCLUDE_DIR
)/host.mk
15 include $(TMP_DIR
)/.packagedeps
17 PREREQ_PACKAGES
:=$(patsubst %,%-prereq
,$(prereq-y
) $(prereq-m
))
18 DOWNLOAD_PACKAGES
:=$(patsubst %,%-download
,$(package-y
) $(package-m
))
19 COMPILE_PACKAGES
:=$(patsubst %,%-compile
,$(package-y
) $(package-m
))
20 INSTALL_PACKAGES
:=$(patsubst %,%-install,$(package-y
))
22 $(STAMP_DIR
) $(TARGET_DIR
):
26 %-compile
%-install: FORCE
27 $(MAKE
) -C
$* $(patsubst $*-%,%,$@
) ||
{ $(call MESSAGE
, "*** $* $(patsubst $*-%,%,$@) failed"); false
; }
29 %-prepare
%-prereq
%-download
%-clean %-refresh
: FORCE
31 %-prepare
%-prereq
%-download
%-clean %-compile
%-install %-refresh
: FORCE
33 $(MAKE
) -C
$* $(patsubst $*-%,%,$@
)
35 # .IGNORE: $(COMPILE_PACKAGES)
37 $(TMP_DIR
)/.packagedeps
: $(TMP_DIR
)/.packageinfo
38 @
$(TOPDIR
)/scripts
/metadata.pl package_mk
< $< > $@ ||
rm -f
$@
41 clean: $(patsubst %,%-clean,$(package-
) $(package-y
) $(package-m
))
42 prereq
: $(PREREQ_PACKAGES
)
43 download
: $(DOWNLOAD_PACKAGES
)
44 compile
: $(COMPILE_PACKAGES
)
46 install-targets
: $(INSTALL_PACKAGES
)
48 rm -rf
$(BUILD_DIR
)/root
49 $(MAKE
) install-targets
51 @if
[ -d
$(TOPDIR
)/files
]; then \
52 $(CP
) $(TOPDIR
)/files
/.
$(BUILD_DIR
)/root
; \
54 @mkdir
-p
$(BUILD_DIR
)/root
/etc
/rc.d
56 cd
$(BUILD_DIR
)/root
; \
57 for script in .
/etc
/init.d
/*; do \
58 grep
'#!/bin/sh /etc/rc.common' $$script >/dev
/null || continue
; \
59 IPKG_INSTROOT
=$(BUILD_DIR
)/root
$(which bash
) .
/etc
/rc.common
$$script enable
; \
62 @
-find
$(BUILD_DIR
)/root
-name CVS |
$(XARGS
) rm -rf
63 @
-find
$(BUILD_DIR
)/root
-name .svn |
$(XARGS
) rm -rf
64 @
-find
$(BUILD_DIR
)/root
-name
'.#*' |
$(XARGS
) rm -f
66 index
: $(PACKAGE_DIR
)/Packages
68 $(PACKAGE_DIR
)/Packages
: $(PACKAGE_DIR
)/*.ipk
69 (cd
$(PACKAGE_DIR
); $(SCRIPT_DIR
)/ipkg-make-index.sh .
> Packages
)
72 ..
/scripts
/feeds.sh
$(CONFIG_SOURCE_FEEDS
)
74 ifeq ($(MAKECMDGOALS
),compile
)
75 MAKEFLAGS
:=$(MAKEFLAGS
) -j
$(CONFIG_JLEVEL
)
This page took 0.042869 seconds and 5 git commands to generate.