From: Jakub Kicinski <kubakici@wp.pl>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: Mutli-directory module Makefiles
Date: Thu, 25 Jan 2018 11:47:40 -0800 [thread overview]
Message-ID: <20180125114740.076b7583@cakuba.netronome.com> (raw)
In-Reply-To: <CAK7LNAT9_fB_NaZzT3fLsaoJhMmKeb3=m98w_=oLGN3Y9uSz=w@mail.gmail.com>
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
next prev parent reply other threads:[~2018-01-25 19:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 21:46 Jakub Kicinski
2018-01-25 13:08 ` Masahiro Yamada
2018-01-25 19:47 ` Jakub Kicinski [this message]
2018-01-27 22:28 ` Masahiro Yamada
2018-01-25 20:42 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180125114740.076b7583@cakuba.netronome.com \
--to=kubakici@wp.pl \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®