Subject: Re: Document for doing makefile or Makefile
To: Richard PLOIX <richard.ploix@fr.adp.com>
From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
List: port-i386
Date: 05/24/2000 12:30:10
On Wed, May 24, 2000 at 12:09:29PM +0200, Richard PLOIX wrote:
> hello,
> is there a document that explain how to write makefile or Makefile for NetBSD?
> for example, I have a hello.c file, at this time I don't know how to compile
> and link it. must I use cc, gcc, or other?
> thank's, bye.
Hm, you can look at the examples...
easy one:
------------------------------cut-here------------------------------
# $NetBSD: Makefile,v 1.9 1999/07/08 01:56:09 christos Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
WARNS=2
PROG= cat
.include <bsd.prog.mk>
------------------------------cut-here------------------------------
If you don't have a manual page, add MKMAN=NO.
For multi-src programs, add
SRCS=cat.c dog.c
If you need libraries other than libc, e.g. the math library, add them
like this:
LDADD=-lm
Other than that, look into
/usr/share/mk/bsd.README
Regards,
-is