Code::Blocks Forums
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
As usual while waiting for the next release - don't forget to check the
nightly builds
in the forum.
Home
Help
Search
Login
Register
Code::Blocks Forums
»
User forums
»
Help
»
Usage of builtin variable outside C::B
« previous
next »
Send this topic
Print
Pages: [
1
]
Go Down
Author
Topic: Usage of builtin variable outside C::B (Read 3458 times)
effemmeffe
Multiple posting newcomer
Posts: 18
Usage of builtin variable outside C::B
«
on:
January 12, 2012, 01:30:55 pm »
I was wondering if I can use some C::B builtin variables in a makefile.
I'd like to compile with a custom makefile and I need to know the target so I tried to use $(TARGET_NAME) in my makefile, but it seems it doesn't work...
Any help?
Logged
Jenna
Administrator
Lives here!
Posts: 7252
Re: Usage of builtin variable outside C::B
«
Reply #1 on:
January 12, 2012, 02:39:33 pm »
You can add siomething like
target=$target
to the appropriate make-command (in Build options) and use it as
$(target)
inside the makefile.
This will work for gnu makefiles, don't know, if it also works with borland or msvc make-commands.
Logged
effemmeffe
Multiple posting newcomer
Posts: 18
Re: Usage of builtin variable outside C::B
«
Reply #2 on:
January 17, 2012, 01:36:40 pm »
Thanks, that will do the trick.
Logged
Send this topic
Print
Pages: [
1
]
Go Up
« previous
next »
Code::Blocks Forums
»
User forums
»
Help
»
Usage of builtin variable outside C::B