Re: M= modules build w/ objects in different directory

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

 



On Wed, Mar 20, 2024 at 8:20 AM Daniel Walker (danielwa)
<danielwa@xxxxxxxxx> wrote:
>
>
> Masahiro,
>
> I found this commit,
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=23a0cb8e3225122496bfa79172005c587c2d64bf
>
> It had this note,
>
> [masahiro: I do not think "M=$(OUT_DIR) src=$(PWD)" is the official way,
> but this patch is a nice clean up anyway.]
>
> Is there an official way or recommended way to build objects in a directory
> outside the external modules source directory and outside the original kernel
> source directory ?
>
> Daniel


There is no official way.
One known tip is to use a relative path for M=.

For example, the relative path from your kernel source
to your external module directory is  ../path/to/module

 $ make O=path/to/output  M=../path/to/module


The module objects will be output into
path/to/output/../path/to/module/.




-- 
Best Regards
Masahiro Yamada





[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux