Conditional makefile: help
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!
Re: Conditional makefile: help
[email]smoking81@gmail.com[/email] wrote:[color=blue]
> 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![/color]
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.