Skip to main content



      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
Eclipse UserFriend
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
Eclipse UserFriend
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] by 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 Jul 25 06:30:17 EDT 2025

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

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

Back to the top