next round of build system cleanup - convert package/ to new structure
[openwrt.org/openwrt.git] / tools / Makefile
blob:a/tools/Makefile -> blob:b/tools/Makefile
# #
# Copyright (C) 2007 OpenWrt.org # Copyright (C) 2007 OpenWrt.org
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
# #
# Main makefile for the host tools # Main makefile for the host tools
# #
curdir:=tools curdir:=tools
   
# subdirectories to descend into # subdirectories to descend into
$(curdir)/builddirs := sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage firmware-utils patch-cmdline $(if $(CONFIG_CCACHE),ccache) $(curdir)/builddirs := sed sstrip ipkg-utils ext2fs squashfs mtd-utils lzma mkimage firmware-utils patch-cmdline $(if $(CONFIG_CCACHE),ccache)
   
# builddir dependencies # builddir dependencies
$(curdir)/squashfs/compile := $(curdir)/lzma/install $(curdir)/squashfs/compile := $(curdir)/lzma/install
   
# preparatory work # preparatory work
define copy_include define copy_include
$(STAGING_DIR)/include-host/.done: $(STAGING_DIR)/include-host/.done:
@mkdir -p $$$$(dirname $$@) @mkdir -p $$$$(dirname $$@)
@cp $(1)/include/*.h $$$$(dirname $$@)/ @cp $(1)/include/*.h $$$$(dirname $$@)/
@touch $$@ @touch $$@
$(curdir)//prepare = $(STAGING_DIR)/include-host/.done $(curdir)//prepare = $(STAGING_DIR)/include-host/.done
endef endef
$(eval $(call copy_include,$(curdir))) $(eval $(call copy_include,$(curdir)))
   
# prerequisites for the individual targets # prerequisites for the individual targets
$(curdir)/ := .config $(curdir)/ := .config prereq
$(curdir)//compile = $(1)/prepare $(curdir)//compile = $(1)/prepare
$(curdir)//install = $(1)/compile $(curdir)//install = $(1)/compile
   
$(eval $(call stampfile,$(curdir),tools)) $(eval $(call stampfile,$(curdir),tools,install))
$(eval $(call subdir,$(curdir))) $(eval $(call subdir,$(curdir)))
   
comments