The Horus Config Utility
src/tools/config is shell script which is called from a conf
directory to create a Makefile called Horus.mk.
"make -f Horus.mk" builds the Horus library libhorus.a.
The conf directory is supposed to contain at least the following files:
CONF a Bourne shell script that defines some variables
Makefile.conf included in Horus.mk
muts_conf.h contains global #defines
A typical CONF file looks like this:
ROOT=../..
MACH=nbsd
CC=gcc
CFLAGS="-g -W -Wunused -Wreturn-type"
MYLIB_OBJECTS="$MACHDEP/rvr_thread.c $MACHDEP/udp.c"
ST_OBJECT=$HUTIL/simtool.c
OBJSETS="HORUS_LIB_OBJECTS MYLIB_OBJECTS ST_OBJECT"
OBJECTS=simtool.o
In this CONF file, the following shell variables are defined:
ROOT
This is the pathname of the top-level directory.
Usually this is defined relative to the conf directory itself (in this
case two-levels down).
MACH
This is the name of the subdirectory of the machdep directory, which
contains the machine-dependent files.
CC
The name of the ANSI C compiler.
CFLAGS
Flags to be passed to the compiler.
OBJSETS
A list of shell variables.
Each shell variable is assigned a list of source files that needs to
be compiled in this configuration.
Config will create a make
variable for each of these containing the list of corresponding object
files, which may be used in the Makefile.conf file.
OBJECTS
A list of objects to be made in addition to libhorus.a.
After running config, run "make -f Horus.mk" to create libhorus.a and
the list of objects specified in the OBJECTS variable.
Browse through several examples in the conf directory to become familiar
with how it works.