help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regarding creating generic makefile


From: Ted Stern
Subject: Re: Regarding creating generic makefile
Date: Thu, 01 Jun 2006 14:20:56 -0700
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

[Cc'd to list]

On 31 May 2006 06:43:17 -0700, Ravi S. M. wrote:
>
> Hi
>
> I want to create generic makefile on Linux and Solaris . ie if it is
> Solaris should include some flags or Linux should include other
> flags .
>
> I tried using “uname” but couldn’t get exact idea to define
> it. Please let me know , how to define it .

You mean, like this?

    MACHINE := $(shell uname -s)

    ifeq "Linux" "$(MACHINE)"
      # Linux variables
    endif

    ifeq "..." "$(MACHINE)"
      # Solaris variables, but I don't know what 'uname -s' returns
      # on Solaris!
    endif

>
> I am using GNU make (3.79.1) . I would be grateful if you provide
> some information about this .
>
> Thanks & regards
>
> Ravi

There are lots of ways to identify a system; for example, on Linux you
can look at the contents of /etc/*release or /proc/cpuinfo.

Ted
-- 
 dodecatheon at gmail dot com
 Frango ut patefaciam -- I break so that I may reveal





reply via email to

[Prev in Thread] Current Thread [Next in Thread]