Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Override external Makefile variable?(Override variable in external Makefile depending on "Build Configuration"?)
Override external Makefile variable? [message #993530] Mon, 24 December 2012 13:20 Go to next message
Ulrich Lorenz Schlüter is currently offline Ulrich Lorenz Schlüter
Messages: 2
Registered: December 2012
Junior Member
I'm trying to override a variable named UNAME in an external Makefile for cross compiling purposes. My trys were UNAME and @UNAME in "Build Variables" and "Environment".

Thanks in advance

Uli
Re: Override external Makefile variable? [message #993572 is a reply to message #993530] Mon, 24 December 2012 16:23 Go to previous message
Ulrich Lorenz Schlüter is currently offline Ulrich Lorenz Schlüter
Messages: 2
Registered: December 2012
Junior Member
Two possibilities:

First is modifying the make target.
make UNAME = RASPI
This does the job but you do need two different make targets (in Eclipse) if you want to compile for two platforms. Crying or Very Sad

Second change the declaration in the Makefile.
UNAME? = default_value_if_not_set_in_environment
Now an "Environment Variable" (not a Build Variable) with the same name, set in an Eclipse "Build Configuration", overrides UNAME. Very Happy

Attention! Only one of these is needed!

stackoverflow.com/questions/2826029/passing-additional-variables-from-command-line-to-make

[Updated on: Mon, 24 December 2012 16:25]

Report message to a moderator

Previous Topic:GDB (DSF) Manual Remote Launch - execute commands before launch?
Next Topic:Strange Eclipse (on Mac) Compilation Errors
Goto Forum:
  


Current Time: Thu Jul 24 06:59:22 EDT 2014

Powered by FUDForum. Page generated in 0.01943 seconds