Conditional makefile: help - Unix

This is a discussion on Conditional makefile: help - Unix ; 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 doesn't exist and i would get an error). How ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Conditional makefile: help

  1. 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!


  2. Re: Conditional makefile: help

    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.



+ Reply to Thread