m

mkmf(1)

mkmf(1)

Ratfor syntax, P = Pascal syntax). The following list shows the default con®guration for mkmf:

.c:sC

C

.C:sC++

C++

.f:sF

Fortran

.h:h

Include ®les

.i:h

Pascal include ®les

.l:sC

Lex or Lisp

.o:o

Object ®les

.p:sP

Pascal

.r:sF

Ratfor

.s:s

Assembler

.y:sC

Yacc

For example, to change the object ®le suf®x to .obj, unde®ne the Pascal include ®le suf®x, and prevent Fortran ®les from being scanned for included ®les, the SUFFIX macro de®nition could be:

SUFFIX = .obj:o .i: .f:s

Include Statement Syntax

The syntax of include statements for C, C++, Fortran, and Pascal source code are of the form:

C/C++:

#include "®lename" #include ®lename

where # must be the ®rst character in the line.

Fortran:

$include ' ®lename '$ $INCLUDE ' ®lename '$

where $ must be the ®rst character in the line. Alternatively, the $ can be omitted if the include statement starts in column 7. In either case the trailing $ can be omitted.

Pascal:

$include ' ®lename '$ $INCLUDE ' ®lename '$

where $ must be the ®rst character in the line and the trailing $ is optional.

User-de®ned Templates

If mkmf cannot ®nd a make®le within the current directory, it normally uses one of the standard make®le templates, C.p or C.l, in /usr/ccs/lib/mf unless the user has alternative C.p or C.l template ®les in a directory $PROJECT/lib/mf where $PROJECT is the absolute path name of the directory assigned to the PROJECT environment variable.

Options

mkmf recognizes the following options:

-a

Include source ®les beginning with a . in the make®le.

-c

Suppress ``creating make®le from ...'' message.

-d

Turn off scanning of source code for include ®les. Old dependency information is

 

left untouched in the make®le.

-e

Environment variables override macro de®nitions within make®les.

-fmakefile

Specify an alternative make®le ®le name. The default ®le name is Makefile.

-i

Prompt the user for the name of the program or library and the directory where it is

 

to be installed. If a carriage-return is typed in response to each of these queries,

 

mkmf assumes that the default program name is a.out or the default library name

 

is lib.a, and the destination directory is the current directory.

-l

Force the make®le to be a library make®le.

Section 1534

− 3 −

HP-UX Release 11i: December 2000