kbuild: Use targets := to tell kbuild about additional targets
[linux-flexiantxendom0-3.2.10.git] / scripts / Makefile
1 ###
2 # scripts contains sources for various helper programs used throughout
3 # the kernel for the build process.
4 # ---------------------------------------------------------------------------
5 # fix-dep:       Used to generate dependency information during build process
6 # split-include: Divide all config symbols up in a number of files in
7 #                include/config/...
8 # docproc:       Preprocess .tmpl file in order to generate .sgml docs
9 # conmakehash:   Create arrays for initializing the kernel console tables
10
11 host-progs    := fixdep split-include conmakehash docproc kallsyms modpost \
12                  mk_elfconfig
13 build-targets := $(host-progs) empty.o
14
15 modpost-objs  := modpost.o file2alias.o
16
17 subdir-$(CONFIG_MODVERSIONS)    += genksyms
18
19 # Let clean descend into subdirs
20 subdir- += lxdialog kconfig
21
22 # fixdep is needed to compile other host programs
23 $(addprefix $(obj)/,$(filter-out fixdep,$(build-targets)) $(subdir-y)): $(obj)/fixdep
24
25 # dependencies on generated files need to be listed explicitly
26
27 $(obj)/modpost.o $(obj)/file2alias.o: $(obj)/elfconfig.h
28
29 quiet_cmd_elfconfig = MKELF   $@
30       cmd_elfconfig = $(obj)/mk_elfconfig $(ARCH) < $< > $@
31
32 $(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE
33         $(call if_changed,elfconfig)
34
35 targets += elfconfig.h