recursion - Recursive Makefile - Passing Variables to the Root Makefile -


currently having problems makefile due unexpected recursion , neccessary collection of filenames. want call recursively makefile in root folder of project , 1 should go through every possible subfolder (and subfolders...) goal collect files , write them variable used "targets" or dependent files.

for example: /makefile goes through /source, /source/boot , finds /source/boot/boot.s (-> 1 target therefore /source/boot/boot.o) , goes on /source/kernel , finds /source/kernel/foo.c (-> second target therefore /source/kernel/foo.o). can compile these files in makefiles in subfolders, need link them when root makefile returns root.

so question is, how can pass adequately paths these object files root makefile link them?

recursively called makefiles can't pass info caller (unless resort hack, using external files collect object file names). have @ paper mark linked to. shows way of organising project want, in maintainable way.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -