lkml.org 
[lkml]   [2018]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Mutli-directory module Makefiles
2018-01-26 4:47 GMT+09:00 Jakub Kicinski <kubakici@wp.pl>:
> On Thu, 25 Jan 2018 22:08:34 +0900, Masahiro Yamada wrote:
>> 2018-01-23 6:46 GMT+09:00 Jakub Kicinski <kubakici@wp.pl>:
>> > Hi!
>> >
>> > in drivers/net/ethernet/netronome/nfp there is a module which is built
>> > from C sources in 4 directories. What is the best way to handle that?
>> >
>> > Currently we just add all the objects in one Makefile:
>> >
>> > nfp-objs := \
>> > nfpcore/nfp6000_pcie.o \
>> > nfpcore/nfp_cppcore.o \
>> > etc.
>>
>>
>> I recommend you to refactor the Makefile,
>> adding Makefiles into nfpcore, nic, flower, bpf sub-directories.
>>
>>
>> Also, ifeq is ugly,
>> can you rewrite like follows?
>>
>>
>> nfp-$(CONFIG_NFP_APP_FLOWER) += flower/
>> nfp-$(CONFIG_BPF_SYSCALL) += bpf/
>> nfp-$(CONFIG_NFP_DEBUG) += nfp_net_debugfs.o
>
> I tried that, but what do I build inside the directories? I tried
> adding the objects to nfp-objs, building a lib.a, or trying to build a
> separate object, but it's either ignored or dependency is not obeyed
> and nfp.o complains that the subdirectory object doesn't exist yet
> when the build of subdirectory finishes later :(
>
> Sorry for not spotting your response earlier! It went into Spam for
> some reason :S
>

Sorry, I was misunderstanding.

The notation I suggested
is not supported for composite objects (like nfp-objs, nfp-y).

The only solution is to move all files to the same directory,
as Sam pointed out.




--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2018-01-27 23:29    [W:0.053 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site