dnsmasq: stay close as possible to master branch
[tomato.git] / toolchain / tools / Makefile
blobfd35d2be16d426452eeb25a2e901a6e97bcbdc57
1 #
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
9 curdir:=tools
11 # subdirectories to descend into
12 tools-y := pkg-config automake $(if $(CONFIG_CCACHE),ccache)
13 tools-$(CONFIG_GCC_VERSION_4_3)$(CONFIG_GCC_VERSION_4_4) += gmp mpfr
14 #tools-y += sed sstrip ipkg-utils patch-cmdline pkg-config bison automake $(if $(CONFIG_CCACHE),ccache) $(if $(CONFIG_powerpc),dtc)
15 $(curdir)/builddirs := $(tools-y)
17 # builddir dependencies
18 $(curdir)/squashfs/compile := $(curdir)/lzma/install
19 $(curdir)/mpfr/compile := $(curdir)/gmp/install
21 # preparatory work
22 $(STAGING_DIR)/.prepared: $(TMP_DIR)/.build
23 @for dir in $(STAGING_DIR) $(STAGING_DIR_HOST); do ( \
24 set -x; \
25 mkdir -p "$$dir"; \
26 cd "$$dir"; \
27 mkdir -p bin lib include stamp; \
28 ); done
29 mkdir -p $(BUILD_DIR_HOST)/stamp $(BUILD_DIR)/stamp
30 $(INSTALL_DATA) $(TOPDIR)/tools/include/*.h $(STAGING_DIR_HOST)/include/
31 touch $@
33 $(curdir)//prepare = $(STAGING_DIR)/.prepared
34 $(curdir)//compile = $(STAGING_DIR)/.prepared
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)))