2005-03-06 03:34:52 +00:00
|
|
|
# Main makefile for the packages
|
|
|
|
include $(TOPDIR)/rules.mk
|
2006-05-16 00:32:57 +00:00
|
|
|
include $(TOPDIR)/.config
|
2006-05-30 18:55:52 +00:00
|
|
|
include $(TOPDIR)/.pkgdeps
|
2006-05-16 00:32:57 +00:00
|
|
|
|
2006-07-20 17:28:05 +00:00
|
|
|
SOURCE_PACKAGES:=$(patsubst %,%-download,$(package-y) $(package-m))
|
2005-07-17 22:52:59 +00:00
|
|
|
COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
|
|
|
|
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 $@
|
|
|
|
|
2006-07-20 17:28:05 +00:00
|
|
|
%-download: $(STAMP_DIR) $(TARGET_DIR)
|
|
|
|
$(MAKE) -C $(patsubst %-download,%,$@) download MAKEFLAGS="$(BUILD_MAKEFLAGS)"
|
2006-06-20 23:40:02 +00:00
|
|
|
|
2005-10-22 00:06:20 +00:00
|
|
|
%-prepare: $(STAMP_DIR) $(TARGET_DIR)
|
2006-05-31 20:58:13 +00:00
|
|
|
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare MAKEFLAGS="$(BUILD_MAKEFLAGS)"
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2006-05-10 20:32:22 +00:00
|
|
|
%-compile: $(STAMP_DIR) $(TARGET_DIR)
|
2006-05-31 20:58:13 +00:00
|
|
|
$(MAKE) -C $(patsubst %-compile,%,$@) compile MAKEFLAGS="$(BUILD_MAKEFLAGS)"
|
2005-06-05 14:45:48 +00:00
|
|
|
|
2006-05-31 20:00:21 +00:00
|
|
|
%-install: $(STAMP_DIR) $(TARGET_DIR)
|
2006-05-31 20:58:13 +00:00
|
|
|
$(MAKE) -C $(patsubst %-install,%,$@) install MAKEFLAGS="$(BUILD_MAKEFLAGS)"
|
2006-05-31 20:00:21 +00:00
|
|
|
|
2006-05-10 20:32:22 +00:00
|
|
|
%-clean: $(STAMP_DIR) $(TARGET_DIR)
|
2006-05-31 20:58:13 +00:00
|
|
|
$(MAKE) -C $(patsubst %-clean,%,$@) clean MAKEFLAGS="$(BUILD_MAKEFLAGS)"
|
2005-03-06 03:34:52 +00:00
|
|
|
|
2006-06-21 03:17:13 +00:00
|
|
|
ifeq ($(SDK),1)
|
|
|
|
GENDEP_OPTS := -s
|
|
|
|
endif
|
2006-05-16 00:32:57 +00:00
|
|
|
|
2006-05-30 18:55:52 +00:00
|
|
|
$(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo
|
2006-06-21 03:17:13 +00:00
|
|
|
@$(TOPDIR)/scripts/gen_deps.pl $(GENDEP_OPTS) < $< > $@ || rm -f $@
|
2006-05-16 00:32:57 +00:00
|
|
|
|
|
|
|
all: compile
|
|
|
|
clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
|
2006-06-20 23:40:02 +00:00
|
|
|
download: $(SOURCE_PACKAGES)
|
2006-05-31 20:58:13 +00: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 00:32:57 +00:00
|
|
|
|