Multiple .o files from single .c file - how?

From: Krzysztof Halasa (khc@intrepid.pm.waw.pl)
Date: Thu Apr 06 2000 - 20:26:05 EST


Hi,

I just wonder what is the preferred way to make multiple object
files from one .c source file.

Example:
There are two cards which are almost identical but one of them uses
MMIO while the other uses regular IO. Of course, I'd like to have only
one copy of driver source code and I want two binary drivers which can
be selected and compiled independently.

Of course, I can make two stub .c files #including the real driver (*.h),
but there should be better solution.

What do you think?

-- 
Krzysztof Halasa
Network Administrator

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:17 EST