2006-09-27 17:06:46 +03:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
# Main makefile for the host tools
|
|
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
2006-12-07 01:41:38 +02:00
|
|
|
TARGETS-y:=sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage firmware-utils
|
2006-09-27 17:06:46 +03:00
|
|
|
|
|
|
|
TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y))
|
2006-10-10 19:36:47 +03:00
|
|
|
TARGETS_PREPARE:=$(patsubst %,%-prepare,$(TARGETS-y))
|
2007-02-25 19:49:25 +02:00
|
|
|
TARGETS_COMPILE:=$(patsubst %,%-compile,$(TARGETS-y))
|
2006-09-27 17:06:46 +03:00
|
|
|
TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y))
|
|
|
|
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y))
|
2007-02-25 19:49:25 +02:00
|
|
|
STAMP:=$(STAGING_DIR)/stampfiles/.tools_installed
|
2006-09-27 17:06:46 +03:00
|
|
|
|
|
|
|
all: install
|
|
|
|
download: $(TARGETS_DOWNLOAD)
|
2007-02-25 19:49:25 +02:00
|
|
|
compile: $(TARGETS_COMPILE)
|
|
|
|
install: $(STAMP)
|
2006-09-27 17:06:46 +03:00
|
|
|
clean: $(TARGETS_CLEAN)
|
|
|
|
|
|
|
|
squashfs-compile: lzma-install
|
|
|
|
|
2007-02-25 19:49:25 +02:00
|
|
|
ifneq ($(shell $(SCRIPT_DIR)/timestamp.pl -p . $(STAMP)),$(STAMP))
|
|
|
|
$(STAMP): $(TARGETS_INSTALL)
|
|
|
|
endif
|
2006-09-27 17:06:46 +03:00
|
|
|
|
2007-02-25 19:49:25 +02:00
|
|
|
$(STAMP):
|
|
|
|
mkdir -p $(shell dirname $@)
|
|
|
|
touch $@
|
|
|
|
|
2006-10-10 19:36:47 +03:00
|
|
|
$(STAGING_DIR)/include-host:
|
|
|
|
@mkdir -p $@
|
|
|
|
@$(CP) ./include/*.h $@/
|
2006-09-27 17:06:46 +03:00
|
|
|
|
|
|
|
$(TOOL_BUILD_DIR):
|
|
|
|
@mkdir -p $@
|
|
|
|
|
2007-02-25 19:49:25 +02:00
|
|
|
$(eval $(call default_subtargets,$(STAGING_DIR)/include-host $(TOOL_BUILD_DIR)))
|
2006-09-27 17:06:46 +03:00
|
|
|
|
2006-10-18 22:00:05 +03:00
|
|
|
ifeq ($(MAKECMDGOALS),install-targets)
|
|
|
|
MAKEFLAGS:=$(MAKEFLAGS) -j$(CONFIG_JLEVEL)
|
|
|
|
else
|
|
|
|
.NOTPARALLEL:
|
|
|
|
endif
|