discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Question about conditionnal compilation


From: Chris B . Vetter
Subject: Re: Question about conditionnal compilation
Date: Mon, 1 Jul 2002 09:17:52 -0700

On Mon, 1 Jul 2002 09:59:09 +0200
"Peron, Stéphane" <stephane.peron@dcmc.creditlyonnais.fr> wrote:
> Hi all,
> I am working on the next version of Encod.app that will allow to use cddb.
> For this version, I would like it to be usuable for most unices .... 
> So I would like to make a conditionnal compilation ... 
> I mean I would like to put a flag in the GNUMakefile conditionnaly to the
> os for example :
> if  "linux/cdrom.h" is present then HAVE_LINUX=1
> Is it possible to make something like this in the GNUMakefile ?

Add

        ADDITIONAL_OBJCFLAGS = -D$(GNUSTEP_HOST_OS)

to your GNUmakefile.[preamble | local] ... and you'll get sth like

        gcc foobar.m -c [...] -Dlinux [...]

In your source,

        #if defined(linux)
        [...]
        #endif

will do the trick.

-- 
Chris



reply via email to

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