Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 May 2009 21:30:35 +0200
From:      Mel Flynn <mel.flynn+fbsd.questions@mailing.thruhere.net>
To:        freebsd-questions@freebsd.org
Cc:        Polytropon <freebsd@edvax.de>, francis keyes <fkeymo@gmail.com>, Chuck Robey <chuckr@telenix.org>
Subject:   Re: compiling FreeBSD date on Linux
Message-ID:  <200905202130.36039.mel.flynn%2Bfbsd.questions@mailing.thruhere.net>
In-Reply-To: <d64607cc0905201045i36084a34g2a6c0d4e9d5f750d@mail.gmail.com>
References:  <d64607cc0905191419p621f7e65tf5515d1d3696bfa0@mail.gmail.com> <4A135119.8010007@telenix.org> <d64607cc0905201045i36084a34g2a6c0d4e9d5f750d@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <bsd.prog.mk>
>
>
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905202130.36039.mel.flynn%2Bfbsd.questions>