2010-11-01 16:34:52     Couple of questions on applications in ./user/

Document created by Aaronwu Employee on Aug 23, 2013
Version 1Show Document
  • View in full screen mode

2010-11-01 16:34:52     Couple of questions on applications in ./user/

Gilles Ganault (FRANCE)

Message: 95452   

 

Hello,

 

I'm pretty much a C newbie, and need to check a few things about applications located under ./user/ so I can add my own:

 

1. Which configuration/makefiles are used to compile user applications? For instance, is this order correct to compile Lua?

 

a. /usr/src/uClinux-dist/ : Makefile + .config

b. ./user/ : Makefile + Makefile.local

c. ./user/lua/ : Makefile

d. ./user/lua/lua-5.1.4/ : Makefile

e. ./user/lua/lua-5.1.4/src : Makefile

 

2. Is it possible to stop compiling at the deepest Makefile right before it starts compiling this application so that I can display the contents of all variables in its Makefile?

 

3. I noticed something strange in ./user/lua/lua-5.1.4/src/Makefile: CC is redefined as "gcc". How can this application can then be compiled using the bfin-linux-uclibc or bfin-uclinux compilers?

 

4. Finally, is the static/dynamic, FLAT/FDPIC choice only relevant to building libraries, or is this alternative also relevant to applications?

 

Thank you.

QuoteReplyEditDelete

 

 

2010-11-01 22:42:43     Re: Couple of questions on applications in ./user/

Aaron Wu (CHINA)

Message: 95456   

 

Make use of our wiki   docs.blackfin.uclinux.org, search your keywords in it, there are plenty of things for you, for example:   docs.blackfin.uclinux.org/doku.php?id=adding_user_applications

QuoteReplyEditDelete

 

 

2010-11-02 08:02:35     Re: Couple of questions on applications in ./user/

Gilles Ganault (FRANCE)

Message: 95482   

 

Thanks Aaron. I already went through the wiki, but didn't find answers to those specific questions. I'm especially interested in knowing the order in which configure/Makefiles are called, starting from the top of the uClinux-dist source tree.

QuoteReplyEditDelete

 

 

2010-11-02 23:01:12     Re: Couple of questions on applications in ./user/

Aaron Wu (CHINA)

Message: 95499   

 

For details please read the Kconfig and Makefile on each hierachy you are interested in, more for Kconfig, makefile and Kbuild is documented here: linux-2.6.x/Documentation/kbuild/*.txt

QuoteReplyEditDelete

 

 

2010-11-12 09:25:02     Re: Couple of questions on applications in ./user/

Gilles Ganault (FRANCE)

Message: 95802   

 

Thanks Aaron.

QuoteReplyEditDelete

 

 

2010-11-13 10:03:40     Re: Couple of questions on applications in ./user/

Robert Cochran (UNITED STATES)

Message: 95823   

 

Gilles,

 

 

 

Regarding stoping the Makefile to see variables, are you aware of the warning and info make functions?  If not, check out the make documentation.  Here's a snippet from it:

 

 

 

********** from GNU Make documentation *****************

 

$(warning text ...)

This function works similarly to the error function, above, except that make

doesn’t exit. Instead, text is expanded and the resulting message is displayed,

but processing of the makefile continues.

The result of the expansion of this function is the empty string.

 

 

$(info text ...)

This function does nothing more than print its (expanded) argument(s) to stan-

dard output. No makefile name or line number is added. The result of the

expansion of this function is the empty string.

QuoteReplyEditDelete

 

 

2010-11-14 19:42:41     Re: Couple of questions on applications in ./user/

Gilles Ganault (FRANCE)

Message: 95836   

 

Thanks Robert. I'll try the above and see what I can learn about how this whole Buildroot ends up compiling an application in /user.

Attachments

    Outcomes