From owner-freebsd-questions@FreeBSD.ORG Thu Nov 18 17:12:08 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A17F716A4CE for ; Thu, 18 Nov 2004 17:12:08 +0000 (GMT) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id E108443D3F for ; Thu, 18 Nov 2004 17:12:07 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226])iAIHB48B016563; Thu, 18 Nov 2004 19:11:04 +0200 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) iAIHB4NF075225; Thu, 18 Nov 2004 19:11:04 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost)iAIHB4Kd075219; Thu, 18 Nov 2004 19:11:04 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 18 Nov 2004 19:11:03 +0200 From: Giorgos Keramidas To: Jonathon McKitrick Message-ID: <20041118171103.GA61117@orion.daedalusnetworks.priv> References: <20041118160531.GA43779@dogma.freebsd-uk.eu.org> <20041118101808.11092f21@dolphin.local.net> <20041118163221.GB45289@orion.daedalusnetworks.priv> <20041118165953.GA46467@dogma.freebsd-uk.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041118165953.GA46467@dogma.freebsd-uk.eu.org> cc: freebsd-questions@freebsd.org Subject: Re: BSD equivalents of autoconf, automake, etc. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2004 17:12:08 -0000 On 2004-11-18 16:59, Jonathon McKitrick 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 > : > : 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 $