Skip to contentSkip to conversation

where is the build rule for kernel's subdirs?

DISCUSSION horseriver 2 participants 3 messages Jan 14, 2013 Kbuild

lore
Share & tools
lore
author
#2 lore raw
In reply to Randy Dunlap
Quoted 18 lines · Randy Dunlap
Quoted 3 lines · horseriver

hi:

How does kbuild build objects for subdirs of kernel source ?

It goes into subdirs recursively.

From top-level Makefile:

# Objects we will link into vmlinux / subdirs we need to visit
init-y := init/
drivers-y := drivers/ sound/ firmware/
net-y := net/
libs-y := lib/
core-y := usr/

Quoted 1 line

Then each subdir's Makefile has its own rules.

I do not think so !

every makefile in these subdirs only have defined obj files ,but not contained build rules .

Thanks!

Quoted 3 lines
Signature · 2 lines
-- 
~Randy

horseriver

author
#0 lore raw

hi:

How does kbuild build objects for subdirs of kernel source ?

thanks!

#1 lore raw
Quoted 3 lines · horseriver

hi:

How does kbuild build objects for subdirs of kernel source ?

It goes into subdirs recursively.

From top-level Makefile:

# Objects we will link into vmlinux / subdirs we need to visit
init-y := init/
drivers-y := drivers/ sound/ firmware/
net-y := net/
libs-y := lib/
core-y := usr/

Then each subdir's Makefile has its own rules.

Signature · 1 line
~Randy