1. 28 May, 2002 6 commits
    • Kai Germaschewski's avatar
    • Kai Germaschewski's avatar
      kbuild: Group together descending/linking in drivers/* · dc3b2a73
      Kai Germaschewski authored
      We currently decide whether we need to descend into the subdirs of
      drivers/ in drivers/Makefile, but link the resulting objects from
      the top-level Makefile.
      
      Making these two decisions at the same time (in drivers/Makefile) cleans
      up the top-level Makefile quite a bit.
      
      Link order does not change at all apart from sound/, which is now linked
      last.
      dc3b2a73
    • Kai Germaschewski's avatar
      kbuild: Don't overwrite Rules.make's first_rule · 89a6351c
      Kai Germaschewski authored
      Many Makefiles did a put an own rule in front of 
      "include $(TOPDIR)/Rules.make" for no good reason at all,
      the only places where it made sense are converted to using
      EXTRA_TARGETS now.
      89a6351c
    • Kai Germaschewski's avatar
      kbuild: built-in and modules in one pass · 96663d0b
      Kai Germaschewski authored
      Use "make BUILD_MODULES=1 {,bzImage,zImage,vmlinux,...}" to build
      your kernel - and it'll also build the modules as you go.
      96663d0b
    • Kai Germaschewski's avatar
      kbuild: Add EXTRA_TARGETS variable · 36a805ed
      Kai Germaschewski authored
      99% of the Makefiles are very simple target-wise:
      
      o build modules as listed in $(obj-m) and 
      o build $(L_TARGET)/$(O_TARGET) as a composite object containing $(obj-y)
      
      However, there is one exception: typically arch/$ARCH/kernel Makefile
      wants the same as above, plus
      o build init_task.o, head.o, using the standard rules for built-in
        targets - i.e. they are supposed to be built in the same way as all
        the other targets listed in $(obj-y), but they should not be linked
        into arch/$ARCH/kernel/$(O_TARGET). Instead they'll be linked in
        directly in the final vmlinux link.
      
      Currently this is achieved by overriding Rules.make's first_rule in 
      arch/$ARCH/kernel/Makefile. This rather ad-hoc way relies on the knowing
      how Rules.make works internally and at the same time does things behind
      Rules.make's back. 
      
      To clean this up, I'm introducing a new variable, supposed to be only
      used in arch/$ARCH/kernel/Makefile:
      
      $(EXTRA_TARGETS) can be used to declare additional objects which shall
      be built in the current directory (using the flags for built-in objects),
      but not linked into $(O_TARGET)/$(L_TARGET)
      
      This patch only converts arch/i386/kernel/Makefile at this time, other
      archs work the same way as before.
      
      Apart from this, this patch also removes some "unexport ..." statements,
      which are unnecessary since not exporting variables is the default and
      renames the internal "all_targets" to "vmlinux", since it's actually
      need for building vmlinux.
      36a805ed
    • Kai Germaschewski's avatar
      kbuild: Normal sources should not include <linux/compile.h> · c7355265
      Kai Germaschewski authored
      include/linux/compile.h is a generated file, only init/Makefile knows 
      about it - including it outside of init/* will cause trouble on
      parallel builds.
      
      Also, when compile.h already exists when 'make dep' is run, that'll pick
      up a dependency on $(TOPDIR)/include/linux/compile.h. So init/Makefile
      needs to tell make that this is actually the same file as 
      ../include/linux.compile.h
      c7355265
  2. 25 May, 2002 4 commits
  3. 24 May, 2002 30 commits