|
From: | KHMan |
Subject: | Re: Compiling lout 3.38 on Windows with mingw+msys |
Date: | Fri, 17 Oct 2008 10:13:44 +0800 |
User-agent: | Thunderbird 2.0.0.16 (Windows/20080708) |
Remo Dentato wrote:
On Thu, Oct 16, 2008 at 11:33 PM, Hugh Sasse <address@hidden> wrote:On Fri, 17 Oct 2008, Jeff Kingston wrote:Is there some standard out there which is used for saying which OS you are on? I can't find a variable for it anywhere in the GNU make documentation.
Running "uname" is good, as long as we have a Unix-style shell. MSVC support would need a separate nmake file anyway.
Normally this sort of thing is dealt with by configure in the GNU world, so autoconf docs may be more instructive.You are right, I didn't think of it (probably because I don't like it very much :) ) To my understanding autoconf compiles a dummy program to get the extension. Something like: SUFEXE = `echo "main(){}" > xx.c ; gcc -o yy xx.c ; ls yy* | sed 's/yy//'; rm xx.c yy*` Could be an option...
Many thanks for keeping it going...Recent GNU make versions are very powerful and can probably make the Makefile very smart, but I like the simplicity of Lout's makefile and I think a separate detection script is better.
A custom configure script can be very small, e.g. what Fabrice Bellard uses in tcc, mainly "uname -s". It would require MSYS as well for MinGW; not a big deal. Another method: For Lua, the top-level makefile forces the user to specify the platform, e.g. "make posix", so that platform-specific configuration can be explicitly set. In both cases, the simplicity of the Makefile is preserved.
-- Cheers, Kein-Hong Man (esq.) Kuala Lumpur, Malaysia
[Prev in Thread] | Current Thread | [Next in Thread] |