On 2004-11-18 16:59, Jonathon McKitrick <[EMAIL PROTECTED]> wrote: > On Thu, Nov 18, 2004 at 06:32:21PM +0200, Giorgos Keramidas wrote: > : The minimal Makefile for building a program in FreeBSD looks something > : like this: > : > : PROG= foo > : > : .include <bsd.prog.mk> > : > : I can't even begin to describe all the 'make magic' that is hidden in > : /usr/share/mk/*.mk, but you can find out most of it by reading the > : comments in these make(1) include files. > > This is exactly what I needed. I wanted to experiment with building, > installing, linking, and the same with my own test 'libraries.' It looks > like this is much easier than autoconf.
I usually copy stuff from the infinite pool of examples that /usr/src can be. For building a library, I jump in /usr/src/lib/libfoo and skim through a couple of Makefiles. After a while, you'll get the hang of it and write all you need without looking at the `samples' :) I got so used to working in the bsd.*.mk paradigm, that when I had to build a Solaris kernel module for a system that uses GNU make, I wrote a make include called sunos.kmod.mk and then started writing in Solaris stuff like this: $ cat sunos/modules/foo/Makefile KMOD= foo SRCS= foo.c fooddi.c foobar.c include sunos.kmod.mk $ _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"