Advertisement

06.04.2008 at 04:09PM PDT, ID: 23458702
[x]
Attachment Details

makefile to auto build an include variable

Asked by billtouch in C Programming Language

Tags: makefile

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
 
Loading Advertisement...
 
[+][-]06.04.2008 at 10:31PM PDT, ID: 21716600

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 04:48AM PDT, ID: 21718218

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 08:40AM PDT, ID: 21720798

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 10:44AM PDT, ID: 21722065

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 01:56PM PDT, ID: 21723900

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C Programming Language
Tags: makefile
Sign Up Now!
Solution Provided By: sunnycoder
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906