2006-09-27 14:06:46 +00: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-06 23:41:38 +00:00
|
|
|
TARGETS-y:=sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage firmware-utils
|
2007-02-27 23:46:34 +00:00
|
|
|
TARGETS-$(CONFIG_CCACHE) += ccache
|
2006-09-27 14:06:46 +00:00
|
|
|
|
|
|
|
TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y))
|
2006-10-10 16:36:47 +00:00
|
|
|
TARGETS_PREPARE:=$(patsubst %,%-prepare,$(TARGETS-y))
|
2007-02-25 17:49:25 +00:00
|
|
|
TARGETS_COMPILE:=$(patsubst %,%-compile,$(TARGETS-y))
|
2006-09-27 14:06:46 +00:00
|
|
|
TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y))
|
|
|
|
TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y))
|
2007-02-25 17:49:25 +00:00
|
|
|
STAMP:=$(STAGING_DIR)/stampfiles/.tools_installed
|
2006-09-27 14:06:46 +00:00
|
|
|
|
|
|
|
all: install
|
|
|
|
download: $(TARGETS_DOWNLOAD)
|
2007-02-25 17:49:25 +00:00
|
|
|
compile: $(TARGETS_COMPILE)
|
|
|
|
install: $(STAMP)
|
2006-09-27 14:06:46 +00:00
|
|
|
clean: $(TARGETS_CLEAN)
|
|
|
|
|
|
|
|
squashfs-compile: lzma-install
|
|
|
|
|
2007-02-25 17:49:25 +00:00
|
|
|
ifneq ($(shell $(SCRIPT_DIR)/timestamp.pl -p . $(STAMP)),$(STAMP))
|
|
|
|
$(STAMP): $(TARGETS_INSTALL)
|
|
|
|
endif
|
2006-09-27 14:06:46 +00:00
|
|
|
|
2007-02-27 23:46:34 +00:00
|
|
|
$(STAMP): $(TOPDIR)/.config
|
2007-02-25 17:49:25 +00:00
|
|
|
mkdir -p $(shell dirname $@)
|
|
|
|
touch $@
|
|
|
|
|
2006-10-10 16:36:47 +00:00
|
|
|
$(STAGING_DIR)/include-host:
|
|
|
|
@mkdir -p $@
|
|
|
|
@$(CP) ./include/*.h $@/
|
2006-09-27 14:06:46 +00:00
|
|
|
|
|
|
|
$(TOOL_BUILD_DIR):
|
|
|
|
@mkdir -p $@
|
|
|
|
|
2007-04-18 17:09:34 +00:00
|
|
|
$(TARGETS_COMPILE) $(TARGETS_INSTALL): $(STAGING_DIR)/include-host $(TOOL_BUILD_DIR)
|
|
|
|
|
|
|
|
$(eval $(call default_subtargets,))
|
2006-09-27 14:06:46 +00:00
|
|
|
|
2006-10-18 19:00:05 +00:00
|
|
|
ifeq ($(MAKECMDGOALS),install-targets)
|
|
|
|
MAKEFLAGS:=$(MAKEFLAGS) -j$(CONFIG_JLEVEL)
|
|
|
|
else
|
|
|
|
.NOTPARALLEL:
|
|
|
|
endif
|