Hi,

I'm looking for a good suggestion how to structure Makefiles for sharing sourcecode between a kernel driver and userspace utilities.

What I plan to do is to have a directory in usr/src/common/ that contains the "generic" code. The dependencies that this will have are going to be satisfied by a set of wrapper functions _not_ in there, but in a separate sourcefile, one each for the kernel driver and the userspace utility.
This would allow me to get away without using #ifdefs ...

Is it a better idea to have a static library built from the sources in usr/src/common/, or to have both the userspace utility and kernel driver Makefiles refer to ../../common/.../*.c ?
How would the Makefiles look like for either variant ?
(I'm anything but an adept at writing makefiles ...)

Thanks for suggestions,
FrankH.

==========================================================================
No good can come from selling your freedom, not for all gold of the world,
for the value of this heavenly gift exceeds that of any fortune on earth.
==========================================================================
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to