2006-07-21 09:15:06 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
# $Id$
|
|
|
|
|
2005-03-06 03:34:52 +00:00
|
|
|
include $(TOPDIR)/rules.mk
|
2006-05-16 00:32:57 +00:00
|
|
|
include $(TOPDIR)/.config
|
2006-10-14 12:18:39 +00:00
|
|
|
include $(INCLUDE_DIR)/host.mk
|
2006-05-16 00:32:57 +00:00
|
|
|
|
2007-03-16 03:02:31 +00:00
|
|
|
all: compile
|
|
|
|
|
2007-04-03 23:03:56 +00:00
|
|
|
include $(TMP_DIR)/.packagedeps
|
2007-03-16 03:02:31 +00:00
|
|
|
|
2006-10-12 17:45:22 +00:00
|
|
|
PREREQ_PACKAGES:=$(patsubst %,%-prereq,$(prereq-y) $(prereq-m))
|
2006-07-29 11:30:06 +00:00
|
|
|
DOWNLOAD_PACKAGES:=$(patsubst %,%-download,$(package-y) $(package-m))
|
2007-04-12 12:35:49 +00:00
|
|
|
COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
|
2005-07-17 22:52:59 +00:00
|
|
|
INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
|
2005-04-10 20:28:17 +00:00
|
|
|
|
2006-05-10 20:32:22 +00:00
|
|
|
$(STAMP_DIR) $(TARGET_DIR):
|
2005-07-19 00:48:36 +00:00
|
|
|
mkdir -p $@
|
|
|
|
|
2007-04-11 22:59:42 +00:00
|
|
|
ifeq ($(QUIET),1)
|
|
|
|
%-compile %-install: FORCE
|
|
|
|
$(MAKE) -C $* $(patsubst $*-%,%,$@) || { $(call MESSAGE, "*** $* $(patsubst $*-%,%,$@) failed"); false; }
|
|
|
|
|
|
|
|
%-prereq %-download %-clean: FORCE
|
|
|
|
else
|
2007-04-03 23:03:56 +00:00
|
|
|
%-prereq %-download %-clean %-compile %-install: FORCE
|
2007-04-11 22:59:42 +00:00
|
|
|
endif
|
2007-04-03 23:03:56 +00:00
|
|
|
$(MAKE) -C $* $(patsubst $*-%,%,$@)
|
2007-03-17 02:54:16 +00:00
|
|
|
|
2007-04-11 22:59:42 +00:00
|
|
|
# .IGNORE: $(COMPILE_PACKAGES)
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2007-04-03 23:03:56 +00:00
|
|
|
$(TMP_DIR)/.packagedeps: $(TMP_DIR)/.packageinfo
|
2007-03-26 20:17:28 +00:00
|
|
|
@$(TOPDIR)/scripts/metadata.pl package_mk < $< > $@ || rm -f $@
|
2006-05-16 00:32:57 +00:00
|
|
|
|
2007-03-16 03:02:31 +00:00
|
|
|
preconfig:
|
2006-05-16 00:32:57 +00:00
|
|
|
clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
|
2006-07-29 11:30:06 +00:00
|
|
|
prereq: $(PREREQ_PACKAGES)
|
|
|
|
download: $(DOWNLOAD_PACKAGES)
|
2007-02-16 01:06:23 +00:00
|
|
|
compile: $(COMPILE_PACKAGES)
|
2007-01-14 23:37:40 +00:00
|
|
|
|
2006-12-20 07:00:30 +00:00
|
|
|
install-targets: $(INSTALL_PACKAGES)
|
2006-05-31 20:58:13 +00:00
|
|
|
install:
|
|
|
|
rm -rf $(BUILD_DIR)/root
|
|
|
|
$(MAKE) install-targets
|
2007-03-16 03:02:31 +00:00
|
|
|
$(MAKE) preconfig
|
2006-12-01 14:01:31 +00:00
|
|
|
@if [ -d $(TOPDIR)/files ]; then \
|
|
|
|
$(CP) $(TOPDIR)/files/. $(BUILD_DIR)/root; \
|
|
|
|
fi
|
2006-10-15 21:03:30 +00:00
|
|
|
@( \
|
|
|
|
cd $(BUILD_DIR)/root; \
|
|
|
|
for script in ./etc/init.d/*; do \
|
|
|
|
grep '#!/bin/sh /etc/rc.common' $$script >/dev/null || continue; \
|
|
|
|
IPKG_INSTROOT=$(BUILD_DIR)/root $(which bash) ./etc/rc.common $$script enable; \
|
2007-03-16 03:02:31 +00:00
|
|
|
done || true \
|
2006-10-15 21:03:30 +00:00
|
|
|
)
|
2006-05-16 00:32:57 +00:00
|
|
|
|
2006-08-02 13:06:58 +00:00
|
|
|
index: $(PACKAGE_DIR)/Packages
|
|
|
|
|
|
|
|
$(PACKAGE_DIR)/Packages: $(PACKAGE_DIR)/*.ipk
|
2006-10-10 23:04:00 +00:00
|
|
|
(cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages)
|
2006-07-30 17:09:22 +00:00
|
|
|
|
2007-01-31 18:33:04 +00:00
|
|
|
symlinks:
|
|
|
|
../scripts/feeds.sh $(CONFIG_SOURCE_FEEDS)
|
2006-08-03 18:30:00 +00:00
|
|
|
|
2007-02-16 01:12:05 +00:00
|
|
|
ifeq ($(MAKECMDGOALS),compile)
|
2006-08-03 18:30:00 +00:00
|
|
|
MAKEFLAGS:=$(MAKEFLAGS) -j$(CONFIG_JLEVEL)
|
|
|
|
else
|
|
|
|
.NOTPARALLEL:
|
|
|
|
endif
|