This is an embedded application running under Linux. I need to add the ability to my makefile to build a variable that will be a list of all the include directories in the path up to and including the top level directory.
Given a project tree that has a top level and its subdirs can be individual applications or the top of another multi-level application tree:
Each level may have an include directory. From the lowest level makefile, I need to auto-build an environment variable that can be placed in the command line that will have all of the include dirctories up to the top of the tree reguardless
top/
app1/ app2/ app3/ include/
sub1a/ sub1b/ two.c include/ three.c
include/ sub_a.c sub_b.c
the makefile in the sub1a directory would generate:
INCLUDES= -I. -I./include -I../../include
$(GCC) $(INCLUDES) ....
This is an important feature to achieve the automatic capability we need on this project. The engineering group is volatile and there is no time to train people (of course).
Thanks!
Bill
Start Free Trial