OMmkmf(1) CLIX OMmkmf(1)
NAME
OMmkmf - Generates makefiles for OM projects
SYNOPSIS
OMmkmf [-v] [-o] [-x] specfile [makefile]
FLAGS
-o Produces a makefile, causing make to send .S and .I files to opp one
at a time.
-v (Verbose) Prints a list of file names being scanned.
-x Overwrites the makefile (if it exists) in the current directory.
DESCRIPTION
The OMmkmf command generates makefiles for use with with make and OM
projects. It can also be used to generate a list of file dependencies.
The OMmkmf command takes a previously generated specfile and creates the
makefile which make can use.
The OMmkmf command generates two files, a makefile and a version
information file. The version information file contains all the
information about the versions used and created by the makefile.
The OMmkmf command must be able to find these files in its path:
OMmkmf Script which drives OMmkmf.
OMmkmk Executable file which parses source files.
OMmkmkpo Executable file which breaks up input lines into shorter lines.
The OMmkmf command must also have access to the specfile and the source
files it is to process.
The makefile generated by OMmkmf defines two options that specify the
flags which are passed to the OM preprocessor (opp) and the C compiler.
These options are OPPOPT and COPT, respectively. Any flags which the user
wishes to pass to either the OM preprocessor or the C compiler can be
passed from the command line. For example, to pass the -g flag to the C
compiler, the user could invoke the make command like this:
make "COPT=-g"
The OMmkmf command also allows for an option for defining names with value
2/94 - Intergraph Corporation 1
OMmkmf(1) CLIX OMmkmf(1)
strings. This option is named DOPT. For example, to tell the C compiler
to define the DEBUG string, the user could invoke the make command like
this:
make "DOPT=-DDEBUG"
All of the valid options are defined in The specfile Options section.
Comments
Comments are permitted in the specfile. A comment must start with the
number sign character #, and everything after the # character in that line
is ignored.
Environment Variables
If valid options to the specfile are defined in the environment, OMmkmf
will use those values in the makefile it creates.
The specfile Options
The specfile may contain any number of the following options. These
options set defaults and specify where certain directories and files are
found. Option names must be capitalized. Each definition for a given
option must be on a separate line after the option name.
For example:
a directory name: /usr2/locate
a file name: GRcs.S
a flag: -g
The valid options are described as follows:
INCLUDE Specifies directories to search for .h files when the opp, acc,
omcpp, riscpp, and yacc commands are run.
SPEC Specifies which directories to search for .S files.
SOURCE Specifies which source files that are to be maintained by the
makefile. The extension on these files should be .I, .S, .C,
.c, .rc, and .y. If the files are in multiple directories, the
file named should be referenced by a symbol and a relative
path. For example: ${TP}/locate/lcadd_vrt_SH.I
EXEC Specifies where to put the executable file.
LIB Specifies where to put the object file.
2 Intergraph Corporation - 2/94
OMmkmf(1) CLIX OMmkmf(1)
ARCHIVE Specifies where to put the archive file, or where to find it if
new object files are being added to the already existing
archive file.
HOME Specifies the home directory (if different from working
directory).
LDOPT Specifies options to be passed to link editor.
LINKLIB Specifies precompiled .o or .a files to be searched by the
linker when creating an executable.
CC Specifies how to invoke the C compiler. The default definition
is "CC = acc -ga".
COPT Specifies options for C compiler.
OPP Specifies the location of the OM preprocessor (opp). The
default path is ${EX}/om/bin/opp.
OMCPP Specifies the location of the OMCPP preprocessor (omcpp). The
default path is ${EX}/om/bin/omcpp.
OPPFLAGS Specifies options for the OM preprocessor (opp). The same
flags are used for the OMCPP preprocessor (omcpp).
RISCPP Specifies the location of the RISCPP preprocessor (riscpp).
The default path is ${RIS}/bin/riscpp.
RISCPPFLAGS
Specifies options for the RISCPP preprocessor (riscpp). The
default flags are -r and -l.
SUFFIXES Specifies the filename to be included for information about
suffixes. The default definition is as follows: SUFFIXES: .I
.S .C .rc .y .c .o .a
If the default suffixes are not being used, make sure that the
suffixes are specified correctly.
RULES Specifies the filename to be included for the rules
information. The default rules are as follows:
.I.o .S.o .I.a .S.a
.C.o C.a
.c.o .c.a
.rc.o .rc.a
.y.o .y.a
If the default rules are not used, make sure that the rules are
2/94 - Intergraph Corporation 3
OMmkmf(1) CLIX OMmkmf(1)
specified correctly.
VERSION Specifies the version stamp to be placed in the optional file
header of the file being made. The stamp may have the
following forms:
libfilename version number
execfilename version number
archivefile version
For archive files, the name does not need to be the name of the
file specified in the ARCHIVE option.
The version number can have one of two forms:
n.n.n
n.n.n.n.
DEPENDENCIES
Specifies all the files (along with the version numbers) that
OMmkmf uses to create the makefile.
EXAMPLES
This is an example of a specfile.
INCLUDE # specfy the directory names only
/usr2/cae/include
/usr2/OM/32
/usr2/locate
OPP
/usr2/OM/32/opp # using a different path for opp.
OMCPP
/usr2/OM/32/omcpp
SPEC # specify the directory names for specification
# files
/usr2/cae/spec
/usr2/OM/32
SOURCE # specify the source file names
GRcs.S # Remember to give the entire path if not in
GRcsdeltop.I # this directory
LIB or EXEC or ARCHIVE
/usr2/locate/cs.o
4 Intergraph Corporation - 2/94
OMmkmf(1) CLIX OMmkmf(1)
or
/usr2/locate/cs
or
/usr2/locate/cs.a
CC
cc
HOME
/usr/dir_name
COPT
-c
OPPFLAGS
-I
VERSION
cs.o 2.3.2
DEPENDENCIES
gcc 1.6.11
/usr2/OM/32/opp 2.5.0
/usr2/OM/32 3.2.2
FILES
OMmkmf Script which drives OMmkmf.
OMmkmk Executable file which parses source files.
OMmkmkpo Executable file which breaks up input lines into shorter lines.
NOTES
Versions are required in the specfile.
EXIT VALUES
The OMmkmf command exits with a value of 0 if successful. If
unsuccessful, it exits with a non-zero value.
RELATED INFORMATION
Commands: acc(1), make(1), mkmf(1), omcpp(1), opp(1), riscpp(1), yacc(1)
2/94 - Intergraph Corporation 5