kbuild: building external module in separate output directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

With kbuild, we can build external modules using:

  make -C $KERNEL_BUILDDIR M=$PWD

But I'm looking for the proper way to not clobber my module source
directory with files from the build, eg. I'd like the build to output
the files in another directory.

I'd like to do:

  mkdir obj-$ARCH
  cd obj-$ARCH
  make -C $KERNEL_BUILDDIR M=$PWD/.. O=$PWD

But O= is not supported for external module. It can only be used when
building the kernel (and its modules) itself.

I have found people explaining that the currently only way is to
copy/link the sources inside the object directory.
But I find this tasteless and error prone.

Do someone know another method or a patch to the kbuild system to
improve external module compilation ?

Regards.

-- 
Yann Droneaud
OPTEYA



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux