[Peter Samuelson]
> >  make -C /lib/modules/`uname -r`/build modules SUBDIRS=$(pwd)

[Miquel van Smoorenburg]
> Excellent. Is there any way to put his in a Makefile?

I don't know why not.  Here's what I would start with:

  PWD := $(shell pwd)
  KERNEL := /lib/modules/$(shell uname -r)/build
  CALLMAKE = $(MAKE) -C $(KERNEL) SUBDIRS=$(PWD)

  all:
        # ...other stuff...
        $(CALLMAKE) modules

  install:
        # ...other stuff...
        $(CALLMAKE) modules_install

  # ...other stuff...
  include $(TOPDIR)/Rules.make

Not *quite* that simple, but it's a start.  Note that with this
construction you let the savvy user override $(KERNEL) at the command
line.  (I, for one, would insist.)

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to