Skip to main content


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 18:20 Go to next message
Ulrich Lorenz Schlüter is currently offline Ulrich Lorenz SchlüterFriend
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 21:23 Go to previous message
Ulrich Lorenz Schlüter is currently offline Ulrich Lorenz SchlüterFriend
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 21: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: Fri Apr 19 06:04:12 GMT 2024

Powered by FUDForum. Page generated in 0.01843 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top