[vox-tech] strerror deprecated?
Mark K. Kim
lugod3MAPS at cbreak.org
Tue Dec 26 14:07:26 PST 2006
On Tue, Dec 26, 2006 at 02:51:38PM -0500, Peter Jay Salzman wrote:
> In the Makefile I define __WIN32__ since I'm not using windows.h, which is
> where I believe that thing is defined:
>
>
> # Uncomment one of these.
> OS = __WIN32__
> # OS = __LINUX__
...
> Do you know of a better way to detect Linux/Windows than requiring someone
> to comment/uncomment the Makefile?
I don't think there is a way to "do it by the books" in this case. The
closest way I can think of is to use autoconf/automake. Another way
would be to create one Makefile per target platform.
Once you get into the C-layer, you can use the defined variables
predefined by the compiler (#ifdef(linux), #ifdef(_WIN32), etc.) But I
don't think those exist at Makefile level.
-Mark
More information about the vox-tech
mailing list