compiling FreeBSD date on Linux

Mel Flynn mel.flynn+fbsd.questions at mailing.thruhere.net
Wed May 20 19:30:54 UTC 2009


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


More information about the freebsd-questions mailing list