• Kai Germaschewski's avatar
    kbuild: Add rules for compiling programs on the host · f99e6d1e
    Kai Germaschewski authored
    At a couple of places, we need to build programs which run on the
    compile host during building the kernel.
    
    Add a new variable "host-progs" to declare such programs. Rules.make will
    automatically provide rules to compile these programs with appropriate
    command lines etc.
    
    Compared to having explicit rules spread around for doing so, this has
    the following advantages:
    
    o shorter
    o automatically figures out dependencies and handles changing command
      lines
    o Nicer output in quiet mode ;-)
    
    Compiling host programs from multiple sources is also possible, analogous
    to multi-part objects. E.g. scripts/Makefile has
    
    	host-progs := tkparse
    	tkparse-objs := tkparse.o tkcond.o tkgen.o
    f99e6d1e
Makefile 2.96 KB