[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avrdude-dev] avrdude on Windows
From: |
Joerg Wunsch |
Subject: |
Re: [avrdude-dev] avrdude on Windows |
Date: |
Thu, 13 Feb 2003 09:54:51 +0100 |
User-agent: |
Mutt/1.2.5i |
As Brian Dean wrote:
> > Also, the defines
> > DEFAULT_PARALLEL
> > DEFAULT_SERIAL
>
> I'm wondering if these wouldn't be better set in the config file
> instead of compiled in.
Yes, probably.
> > And which would be better?:
> > 1. One monolithic ppi.c file that has conditional compilation between
> > platforms.
> > 2. One ppi*.c file per platform and configure and auto* tools take
> > care of building the right makefile per platform.
>
> I can really go either way on this.
Too much conditional compilation can easily become a mess. I think
the Linux and FreeBSD implementation can go into the same file, since
both are fairly similar (except for the reserve/release functionality
that FreeBSD doesn't have, everything else is just different names of
the ioctls). The name ppi.c is perhaps not chosen very well then, but
who cares? I'm not all that happy with the separate linux_ppdev.h, as
i already wrote to Ted. It causes an additional dependency for only
one operating system, where the contents is complete #ifdef
__linux__'ed so it could be included verbatim all the time as well.
(As we've seen, handling os-dependent Makefile dependencies is a bit
difficult right now.)
For Windows, i'd suggest to rather implement it in a second file.
Just use the same (external) function names. Until autoconf is in
place, just conditionally compile the entire file #ifdef __win32__ for
the file implementing the Win32 functionality, and #if
defined(__FreeBSD__) || defined(__linux__) for the unix functionality.
That way, each of the irrelevant files will yield in a null object
file that can still be linked without Makefile conditionals, without
causing any additional harm, and without poisoning a single file with
too many #ifdefs.
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/
- Re: [avrdude-dev] avrdude on Windows, (continued)
Re: [avrdude-dev] avrdude on Windows, E. Weddington, 2003/02/12
- Re: [avrdude-dev] avrdude on Windows, Brian Dean, 2003/02/12
- Re: [avrdude-dev] avrdude on Windows, E. Weddington, 2003/02/12
- Re: [avrdude-dev] avrdude on Windows, E. Weddington, 2003/02/12
- Re: [avrdude-dev] avrdude on Windows, Brian Dean, 2003/02/12
- Re: [avrdude-dev] avrdude on Windows, E. Weddington, 2003/02/12
- Re: [avrdude-dev] avrdude on Windows, Brian Dean, 2003/02/12
- Re: [avrdude-dev] avrdude on Windows,
Joerg Wunsch <=
- Re: [avrdude-dev] avrdude on Windows, Brian Dean, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, E. Weddington, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, Joerg Wunsch, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, Brian Dean, 2003/02/13
- Re: [avrdude-dev] avrdude on Windows, E. Weddington, 2003/02/13
Re: [avrdude-dev] avrdude on Windows, E. Weddington, 2003/02/13
Re: [avrdude-dev] avrdude on Windows, Theodore A. Roth, 2003/02/13
Re: [avrdude-dev] avrdude on Windows, E. Weddington, 2003/02/13
Re: [avrdude-dev] avrdude on Windows, Brian Dean, 2003/02/13
Re: [avrdude-dev] avrdude on Windows, E. Weddington, 2003/02/13