|
From: | Marcus Müller |
Subject: | Re: porting to GNUstep from OSX |
Date: | Thu, 10 Jul 2003 16:08:34 +0200 |
On Thursday, July 10, 2003, at 11:09 AM, Nicola Pero wrote:
Maybe just some #ifndef's, combined with -D's in the GNUMakefile would be enough? (I.e., #ifndef GNUSTEP #include <objc/runtime.h> #endif)gnustep-make automatically adds -DGNUSTEP on the command line when compiling for GNUstep. So what I do, and what I guess most people are doing, is #ifndef GNUSTEP /* Apple specific code */ #else /* GNUstep specific code */ #endifYou don't need any autoconf or scripting, this should always work: if you compile GNUstep code using GNUstep, GNUstep is going to be defined; if youcompile for Apple (using GNUstep or PBX), GNUstep is not going to be defined.
And if you use the GNUstep make package on OS X (and you know, Helge insists on that being ported to OS X every once in a while ;-) you're stuck! :-) Because you also need to identify the runtime, because GNUstep doesn't always mean GNU runtime.
I always define the following in every GNUmakefile of our packages: ifeq "$(OBJC_RUNTIME_LIB)" "gnu" ADDITIONAL_OBJCFLAGS += -DGNU_RUNTIME endifIt would be nice and helpful if the GNUstep make package would define this automatically.
Cheers, Marcus -- Marcus Mueller . . . crack-admin/coder ;-) Mulle kybernetiK . http://www.mulle-kybernetik.com Current projects: finger znek@mulle-kybernetik.com
[Prev in Thread] | Current Thread | [Next in Thread] |