2006-07-21 17:15:06 +08: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 11:34:52 +08:00
|
|
|
include $(TOPDIR)/rules.mk
|
2006-05-16 08:32:57 +08:00
|
|
|
include $(TOPDIR)/.config
|
2006-05-31 02:55:52 +08:00
|
|
|
include $(TOPDIR)/.pkgdeps
|
2006-05-16 08:32:57 +08:00
|
|
|
|
2006-07-29 19:30:06 +08:00
|
|
|
PREREQ_PACKAGES:=$(patsubst %,%-prereq,$(package-y) $(package-m))
|
|
|
|
DOWNLOAD_PACKAGES:=$(patsubst %,%-download,$(package-y) $(package-m))
|
2005-07-18 06:52:59 +08:00
|
|
|
COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
|
|
|
|
INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
|
2005-04-11 04:28:17 +08:00
|
|
|
|
2006-05-11 04:32:22 +08:00
|
|
|
$(STAMP_DIR) $(TARGET_DIR):
|
2005-07-19 08:48:36 +08:00
|
|
|
mkdir -p $@
|
|
|
|
|
2006-07-29 19:30:06 +08:00
|
|
|
%-prereq: $(STAMP_DIR) $(TARGET_DIR)
|
|
|
|
$(MAKE) -C $(patsubst %-prereq,%,$@) prereq MAKEFLAGS="$(BUILD_MAKEFLAGS)"
|
|
|
|
|
2006-07-21 01:28:05 +08:00
|
|
|
%-download: $(STAMP_DIR) $(TARGET_DIR)
|
|
|
|
$(MAKE) -C $(patsubst %-download,%,$@) download MAKEFLAGS="$(BUILD_MAKEFLAGS)"
|
2006-06-21 07:40:02 +08:00
|
|
|
|
2005-10-22 08:06:20 +08:00
|
|
|
%-prepare: $(STAMP_DIR) $(TARGET_DIR)
|
2006-06-01 04:58:13 +08:00
|
|
|
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare MAKEFLAGS="$(BUILD_MAKEFLAGS)"
|
2005-03-06 11:34:52 +08:00
|
|
|
|
2006-05-11 04:32:22 +08:00
|
|
|
%-compile: $(STAMP_DIR) $(TARGET_DIR)
|
2006-06-01 04:58:13 +08:00
|
|
|
$(MAKE) -C $(patsubst %-compile,%,$@) compile MAKEFLAGS="$(BUILD_MAKEFLAGS)"
|
2005-06-05 22:45:48 +08:00
|
|
|
|
2006-06-01 04:00:21 +08:00
|
|
|
%-install: $(STAMP_DIR) $(TARGET_DIR)
|
2006-06-01 04:58:13 +08:00
|
|
|
$(MAKE) -C $(patsubst %-install,%,$@) install MAKEFLAGS="$(BUILD_MAKEFLAGS)"
|
2006-06-01 04:00:21 +08:00
|
|
|
|
2006-05-11 04:32:22 +08:00
|
|
|
%-clean: $(STAMP_DIR) $(TARGET_DIR)
|
2006-06-01 04:58:13 +08:00
|
|
|
$(MAKE) -C $(patsubst %-clean,%,$@) clean MAKEFLAGS="$(BUILD_MAKEFLAGS)"
|
2005-03-06 11:34:52 +08:00
|
|
|
|
2006-06-21 11:17:13 +08:00
|
|
|
ifeq ($(SDK),1)
|
|
|
|
GENDEP_OPTS := -s
|
|
|
|
endif
|
2006-05-16 08:32:57 +08:00
|
|
|
|
2006-05-31 02:55:52 +08:00
|
|
|
$(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo
|
2006-06-21 11:17:13 +08:00
|
|
|
@$(TOPDIR)/scripts/gen_deps.pl $(GENDEP_OPTS) < $< > $@ || rm -f $@
|
2006-05-16 08:32:57 +08:00
|
|
|
|
|
|
|
all: compile
|
|
|
|
clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
|
2006-07-29 19:30:06 +08:00
|
|
|
prereq: $(PREREQ_PACKAGES)
|
|
|
|
download: $(DOWNLOAD_PACKAGES)
|
2006-06-01 04:58:13 +08:00
|
|
|
compile-targets: $(COMPILE_PACKAGES)
|
|
|
|
compile:
|
|
|
|
$(MAKE) -j$(CONFIG_JLEVEL) compile-targets
|
|
|
|
install-targets: base-files-install $(INSTALL_PACKAGES)
|
|
|
|
install:
|
|
|
|
rm -rf $(BUILD_DIR)/root
|
|
|
|
$(MAKE) install-targets
|
2006-05-16 08:32:57 +08:00
|
|
|
|
2006-07-31 01:09:22 +08:00
|
|
|
index: FORCE
|
|
|
|
(cd $(PACKAGE_DIR); $(STAGING_DIR)/usr/bin/ipkg-make-index . > Packages)
|
|
|
|
|