From owner-freebsd-questions@FreeBSD.ORG Thu May 21 03:16:18 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B62E106564A for ; Thu, 21 May 2009 03:16:18 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from poseidon.ceid.upatras.gr (poseidon.ceid.upatras.gr [150.140.141.169]) by mx1.freebsd.org (Postfix) with ESMTP id 44D238FC13 for ; Thu, 21 May 2009 03:16:18 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from mail.ceid.upatras.gr (unknown [10.1.0.143]) by poseidon.ceid.upatras.gr (Postfix) with ESMTP id 39F99EB53C1; Thu, 21 May 2009 06:16:17 +0300 (EEST) Received: from localhost (europa.ceid.upatras.gr [127.0.0.1]) by mail.ceid.upatras.gr (Postfix) with ESMTP id 1E305450D0; Thu, 21 May 2009 06:16:17 +0300 (EEST) X-Virus-Scanned: amavisd-new at ceid.upatras.gr Received: from mail.ceid.upatras.gr ([127.0.0.1]) by localhost (europa.ceid.upatras.gr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6QoWuw5-G2RH; Thu, 21 May 2009 06:16:17 +0300 (EEST) Received: from kobe.laptop (adsl229-238.kln.forthnet.gr [79.103.42.238]) by mail.ceid.upatras.gr (Postfix) with ESMTP id E33E2450C6; Thu, 21 May 2009 06:16:16 +0300 (EEST) Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id n4L3GGq4060292; Thu, 21 May 2009 06:16:16 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id n4L3GEWW060291; Thu, 21 May 2009 06:16:14 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) From: Giorgos Keramidas To: francis keyes References: <20090520000137.3d46fcb2.freebsd@edvax.de> <4A135119.8010007@telenix.org> Date: Thu, 21 May 2009 06:16:13 +0300 In-Reply-To: (francis keyes's message of "Wed, 20 May 2009 14:45:59 -0300") Message-ID: <87fxez5eo2.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.93 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Polytropon , Chuck Robey , freebsd-questions@freebsd.org Subject: Re: compiling FreeBSD date on Linux X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2009 03:16:18 -0000 On Wed, 20 May 2009 14:45:59 -0300, francis keyes wrote: > Hmm... the date program looks pretty simple but I don't understand the > Makfile: > > # @(#)Makefile 8.1 (Berkeley) 5/31/93 > # $FreeBSD: src/bin/date/Makefile,v 1.11.30.1 2009/04/15 03:14:26 kensmith > Exp $ > > PROG= date > SRCS= date.c netdate.c vary.c > DPADD= ${LIBUTIL} > LDADD= -lutil > > .include > > Would it be possible to compile this without a makefile? Yes, but you will also need bits of code from libutil. If you have all the necessary bits in a new file, i.e. util.c, then you should be able to use: cc -o date date.c netdate.c vary.c util.c Extracting the minimal parts of libutil and writing the new util.c file is an interesting and amusing exercise for a budding C programmer, but it should be both possible and relatively ``easy''.