Home > Archive > Unix Programming > October 2007 > Conditional makefile: help
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Conditional makefile: help
|
|
| smoking81@gmail.com 2007-10-21, 7:13 pm |
| Hello I should create a makefile which, according to the gcc version
installed on the machine where the make will be run, will set or not
the flag -fno-stack-protector (for versions < 4.1 SSP this flag
doesn't exist and i would get an error).
How could I do such a makefile?
Thanks in advance!
Bye!
| |
| Gianni Mariani 2007-10-22, 7:11 pm |
| smoking81@gmail.com wrote:
> Hello I should create a makefile which, according to the gcc version
> installed on the machine where the make will be run, will set or not
> the flag -fno-stack-protector (for versions < 4.1 SSP this flag
> doesn't exist and i would get an error).
> How could I do such a makefile?
> Thanks in advance!
If you're using GNU make then you can look at $(shell ) to figure out
what version of gcc you have an then $(if ...) to give you the different
values you'd be looking for.
|
|
|
|
|