avrdude-dev
[Top][All Lists]
Advanced

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

RE: [avrdude-dev] Win32 Merge


From: E. Weddington
Subject: RE: [avrdude-dev] Win32 Merge
Date: Wed, 26 May 2004 07:12:53 -0600

On 26 May 2004 at 17:49, Alex Shepherd wrote:

> > Yes, I do. I'm sorry I haven't had a chance to reply to your 
> > earlier message.
> 
> I was beginning to wonder if my email was broken or if everyone had gone to
> the beach...

Well it *is* spring here..... However, there's not much of a beach in the Rocky 
Mountains....
 
<snip> 
> At the moment Martin uses the following commands in a script to build his
> version:
> 
> ======================================
> 
> echo "AVRDUDE Build Win32 native - by Martin Thomas, KL, .de"
> 
> # change to source directory
> cd ..
> 
> # bootstrap calls autoconf/automake
> ./bootstrap
> 
> # call the configure-skript
> ./configure
> 
> # call make - the command line is based on information from Eric, I've added
> # the definition of WIN32NATIVE to flag a native build.
> make CFLAGS="-O2 -g -mno-cygwin -DWIN32NATIVE" LDFLAGS="-static" avrdude.exe
> 
> # stip debug information, they are not needed for avrdude operation
> strip avrdude.exe
> ======================================
> 
> Currently the code has sections that have conditional compilation using BOTH
> the symbol __CYGWIN__ and WIN32NATIVE. Mostly the WIN32NATIVE symbols occur
> in the same places as the __CYGWIN__ symbols but there are a few places
> where there is the new Win32 code which replaces the previous __CYGWIN__
> code.
> 
> If our ultimate goal is to do away with the Cygwin DLL version and only have
> the native Win32 version, then maybe I should just strip out all the code
> fragments that there are new WIN32NATIVE alternatives for, leaving only the
> new WIN32NATIVE code fragments and then remove all references to WIN32NATIVE
> symbol and rely only on the __CYGWIN__ symbol to control the conditional
> compilation to produce the Win32 native executable that doesn't require the
> Cygwin DLLs. This way we would not have to introduce an new conditional
> compilation symbol that would effectively duplicate the __CYGWIN__ symbol.

I would suggest leaving the WIN32NATIVE definition *in*, and stripping out the 
__CYGWIN__ 
symbol. The reason why, is that, currently we use Cygwin to build the software. 
But there may 
not any reason to limit it to that if somebody cares to use some other compiler 
/ toolset to build 
the software. In that case, I would think that it would be better to have the 
generic define of 
WIN32NATIVE, and not the Cygwin-only, Cygwin-specific: __CYGWIN__.

 
> The other bit that I don't know how to integrate is the extra compile
> options to be passed to make which would be:
> 
> make CFLAGS="-O2 -g -mno-cygwin LDFLAGS="-static" avrdude.exe

The compiler flags and linker flags should probably go in, IIRC, Makefile.am 
and switched 
according to what platform we're building on by automake. Ted Roth is the 
expert on this; he 
can tell me if I'm all wet. At the very least, I could take a look at it, 
though I'm pretty much a 
newbie on this.

The "-O2 -g" flags are usually a normal part of compilation. Makefile.am would 
have to switch 
in these flags:
CFLAGS="-mno-cygwin -DWIN32NATIVE" LDFLAGS="-static"

Eric





reply via email to

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