From owner-freebsd-questions@FreeBSD.ORG Wed May 20 19:30:54 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 28FEF106564A for ; Wed, 20 May 2009 19:30:54 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id E9E058FC0C for ; Wed, 20 May 2009 19:30:53 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from sarevok.dnr.servegame.org (mailhub.lan.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 852487E83F; Wed, 20 May 2009 11:30:52 -0800 (AKDT) From: Mel Flynn To: freebsd-questions@freebsd.org Date: Wed, 20 May 2009 21:30:35 +0200 User-Agent: KMail/1.11.3 (FreeBSD/8.0-CURRENT; KDE/4.2.3; i386; ; ) References: <4A135119.8010007@telenix.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905202130.36039.mel.flynn+fbsd.questions@mailing.thruhere.net> Cc: Polytropon , francis keyes , Chuck Robey 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: Wed, 20 May 2009 19:30:54 -0000 On Wednesday 20 May 2009 19:45:59 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? This is because the under appreciated FreeBSD make system does a *lot* of work for you. - You need libutil: /usr/src/lib/libutil or (probably faster), see which functions from libutil date uses and re-implement them. - Resolve header issues in the above source files - And then it's most likely easiest to use cmake or autotools on linux to compile. -- Mel