2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 # Main makefile for the host tools
11 # subdirectories to descend into
12 $(curdir)/builddirs := sed sstrip ipkg-utils genext2fs squashfs mtd-utils lzma mkimage firmware-utils patch-cmdline pkg-config automake $(if $(CONFIG_CCACHE),ccache) bison $(if $(CONFIG_powerpc),dtc) lua quilt autoconf
14 # builddir dependencies
15 $(curdir)/squashfs/compile := $(curdir)/lzma/install
16 $(curdir)/quilt/compile := $(curdir)/sed/install
19 $(STAGING_DIR)/.prepared: $(TMP_DIR)/.build
20 @for dir in $(STAGING_DIR) $(STAGING_DIR_HOST); do ( \
24 mkdir -p bin lib include stamp; \
26 mkdir -p $(BUILD_DIR_HOST)/stamp $(BUILD_DIR)/stamp
27 $(INSTALL_DATA) $(TOPDIR)/tools/include/*.h $(STAGING_DIR_HOST)/include/
30 $(STAGING_DIR_HOST)/bin/find:
31 [ -x "$(FIND)" ] && ln -sf "$(FIND)" $@
33 $(curdir)//prepare = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/bin/find
34 $(curdir)//compile = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/bin/find
36 # prerequisites for the individual targets
37 $(curdir)/ := .config prereq
38 $(curdir)//install = $(1)/compile
40 $(eval $(call stampfile,$(curdir),tools,install))
41 $(eval $(call subdir,$(curdir)))