All of lore.kernel.org
 help / color / mirror / Atom feed
* Strange Makefile rule
@ 2013-08-20 16:42 ` Peter Senna Tschudin
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Senna Tschudin @ 2013-08-20 16:42 UTC (permalink / raw)
  To: kernelnewbies

I do not have cross compile environment but I'm curious how the
Makefile rule works:

linux-next]$ cat drivers/net/ethernet/arc/Makefile

obj-$(CONFIG_ARC_EMAC) += arc_emac.o

There is no file named arc_emac.h and arc_emac.c at
drivers/net/ethernet/arc, so what does that line do?

-- 
Peter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Strange Makefile rule
@ 2013-08-20 16:42 ` Peter Senna Tschudin
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Senna Tschudin @ 2013-08-20 16:42 UTC (permalink / raw)
  To: kernelnewbies

I do not have cross compile environment but I'm curious how the
Makefile rule works:

linux-next]$ cat drivers/net/ethernet/arc/Makefile

obj-$(CONFIG_ARC_EMAC) += arc_emac.o

There is no file named arc_emac.h and arc_emac.c at
drivers/net/ethernet/arc, so what does that line do?

-- 
Peter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Strange Makefile rule
  2013-08-20 16:42 ` Peter Senna Tschudin
  (?)
@ 2013-08-20 16:50 ` Randy Dunlap
  2013-08-20 16:52     ` Peter Senna Tschudin
  -1 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2013-08-20 16:50 UTC (permalink / raw)
  To: kernel-janitors

On 08/20/13 09:42, Peter Senna Tschudin wrote:
> I do not have cross compile environment but I'm curious how the
> Makefile rule works:
> 
> linux-next]$ cat drivers/net/ethernet/arc/Makefile
> 
> obj-$(CONFIG_ARC_EMAC) += arc_emac.o
> 
> There is no file named arc_emac.h and arc_emac.c at
> drivers/net/ethernet/arc, so what does that line do?

It uses the rule from the previous line in the Makefile.
Both lines are:

arc_emac-objs := emac_main.o emac_mdio.o
obj-$(CONFIG_ARC_EMAC) += arc_emac.o


Any xyz-objs defines the files to be used to build xyz.o.

Is that clear yet?


-- 
~Randy

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Strange Makefile rule
  2013-08-20 16:50 ` Randy Dunlap
@ 2013-08-20 16:52     ` Peter Senna Tschudin
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Senna Tschudin @ 2013-08-20 16:52 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Aug 20, 2013 at 6:50 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
> On 08/20/13 09:42, Peter Senna Tschudin wrote:
>> I do not have cross compile environment but I'm curious how the
>> Makefile rule works:
>>
>> linux-next]$ cat drivers/net/ethernet/arc/Makefile
>>
>> obj-$(CONFIG_ARC_EMAC) += arc_emac.o
>>
>> There is no file named arc_emac.h and arc_emac.c at
>> drivers/net/ethernet/arc, so what does that line do?
>
> It uses the rule from the previous line in the Makefile.
> Both lines are:
>
> arc_emac-objs := emac_main.o emac_mdio.o
> obj-$(CONFIG_ARC_EMAC) += arc_emac.o
>
>
> Any xyz-objs defines the files to be used to build xyz.o.
>
> Is that clear yet?
Thanks!

>
>
> --
> ~Randy



-- 
Peter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Strange Makefile rule
@ 2013-08-20 16:52     ` Peter Senna Tschudin
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Senna Tschudin @ 2013-08-20 16:52 UTC (permalink / raw)
  To: kernelnewbies

On Tue, Aug 20, 2013 at 6:50 PM, Randy Dunlap <rdunlap@infradead.org> wrote:
> On 08/20/13 09:42, Peter Senna Tschudin wrote:
>> I do not have cross compile environment but I'm curious how the
>> Makefile rule works:
>>
>> linux-next]$ cat drivers/net/ethernet/arc/Makefile
>>
>> obj-$(CONFIG_ARC_EMAC) += arc_emac.o
>>
>> There is no file named arc_emac.h and arc_emac.c at
>> drivers/net/ethernet/arc, so what does that line do?
>
> It uses the rule from the previous line in the Makefile.
> Both lines are:
>
> arc_emac-objs := emac_main.o emac_mdio.o
> obj-$(CONFIG_ARC_EMAC) += arc_emac.o
>
>
> Any xyz-objs defines the files to be used to build xyz.o.
>
> Is that clear yet?
Thanks!

>
>
> --
> ~Randy



-- 
Peter

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-20 16:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-20 16:42 Strange Makefile rule Peter Senna Tschudin
2013-08-20 16:42 ` Peter Senna Tschudin
2013-08-20 16:50 ` Randy Dunlap
2013-08-20 16:52   ` Peter Senna Tschudin
2013-08-20 16:52     ` Peter Senna Tschudin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.