Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  ICMBUILD (1)


icmbuild - A generic, easy configurable, program maintenance script



icmbuild mode


The icmbuild script is a generic script that can be used to do program maintenance using icmake(1).

The script expects two files to be available in the directory where program maintenance is required, and the icmbuild script should be available in your path or it should be started as, e.g., ./icmbuild

Icmbuild assumes that your sources exist in and below a directory in which the files icmconf and CLASSES live. The file CLASSES contains the names of all subdirectories in which class-specific sources are kept. The file icmconf in icmake(1)\(cqs distribution offers an example of the configuration parameters that are used for program maintenance. In this latter file it is assumed that C++ sources are maintained, but the icmbuild script is not restricted to do maintenance for C++ programs.

Icmbuild compiles all sources in each of the subdirectories named in the file CLASSES, and then compiles all sources in the current working directory (except for the source containing main()).

The compiled sources result in object modules which are then kept in a library, against which the main-object module is linked. It is also possible to specify additional libraries against which the program must be linked.

Once a library is constructed it is kept up to date by the script. Changing a source will result in replacing its former module by its new module in the library.


Normally, icmbuild is installed and used as follows:
o Install icmbuild in your path;
o copy icmconf and CLASSES to your project\(cqs base directory (i.e., the directory in which and where below the project\(cqs sources are found);
o Modify the #defines in the file icmconf to taste;
o List the subdirectories containing sources in the file CLASSES
Note that the order of the classes mentioned in classes is relevant here. It\(cqs no problem to add new class (subdirectory) names, but reordering should be prevented. If reordering is required, recompile the library, as the final object files contain class order-numbers. These class-order numbers prevent file-name collisions and thus prevent replacing file x.o from class A by file x.o from class B;
o Now simply run


from the project\(cqs base directory and let the help-info tell you what your options are. See the next section for the modes of operation.


Icmbuild may be called with the following operational modes:
o clean
clean up remnants of previous activities
o help
provide help and exit (default when called without arguments)
o library
build the library (static and optionally the dynamic library)
o program
build the binary program
o program strip
build the stripped binary program
o install <base> install the software in the locations defined in the icmconf file, optionally below the directory <base> The icmconf file may be given a line defining DEFCOM containing the default operational mode to use when none is specified. E.g.,

#define DEFCOM \(dqprogram\(dq

constructs the program when the command ‘icmbuild\(cq is entered. DEFCOM may also contain combined options, like

#define DEFCOM \(dqprogram strip\(dq

Note that DEFCOM is ignored when an explicit operational mode is provided to the icmbuild script.


The mentioned paths are sugestive only and may be installation dependent:
o /usr/share/icmake/icmconf Example of a icmbuild configuration file;
o /usr/share/icmake/CLASSES Example of a icmbuild CLASSES file.


Here is an example of the configuration file icmconf for a concrete program, using the library libbobcat1 as an additional library:

    // Inspect the following #defines. Change them to taste. If you don\(cqt
    // need a particular option, change its value into an empty string

// For more information about this file: \(cqman 7 icmconf\(cq

// define any additional libraries the program may need: #define ADD_LIBRARIES \(dq\(dq

// define any additional paths (other than the standard paths) the // additional libraries are located in: #define ADD_LIBRARY_PATHS \(dq\(dq

// Uncomment to clear the screen just before starting the compilation // process //#define CLS

// The compiler to use. Define CC instead if a C compiler should be used. #define CXX \(dqg++\(dq //#define CC \(dqgcc\(dq

// The compiler options to use. Define CFLAGS instead if a C compiler is // used. #define CXXFLAGS \(dq --std=c++14 -Wall -g -O2\(dq //#define CFLAGS \(dq -Wall -g -O2\(dq

// Options passed to the linker: #define LDFLAGS \(dq\(dq

// Uncomment to construct a library. Optionally use another name (don\(cqt // use lib or an extension like .a) //#define LIBRARY \(dqmodules\(dq

// The source containing main(): #define MAIN \(\(dq

// The extension of object modules: #define OBJ_EXT \(dq.o\(dq

// If a parser must be generated define the subdirectory containing the // parser\(cqs specification file #define PARSER_DIR \(dq\(dq

// Specify additional grammar specification files using patterns // these files are (in)directly included by PARSSPEC. Specify patterns // relative to PARSER_DIR //#define PARSFILES \(dq\(dq

// Flags to provide PARSGEN with: #define PARSFLAGS \(dq-V\(dq

// What is the program generating a parser? #define PARSGEN \(dqbisonc++\(dq

// Name of the file generated by the parser generator containing the // parser function #define PARSOUT \(\(dq

// What is the grammar specification file? #define PARSSPEC \(dqgrammar\(dq

// Uncomment to relink the binary, even when no sources were changed //#define REFRESH

// If a lexical scanner must be generated: the subdirectory containing // the scanner\(cqs specification file. #define SCANNER_DIR \(dq\(dq

// Specify additional lexer specification files using patterns // these files are (in)directly included by SCANSPEC //#define SCANFILES \(dq\(dq

// Flags to provide SCANGEN with: #define SCANFLAGS \(dq\(dq

// What is the program generating the lexical scanner? #define SCANGEN \(dqflexc++\(dq

// Name of the file generated by the lexical scanner #define SCANOUT \(\(dq

// Name of the lexical scanner specification file #define SCANSPEC \(dqlexer\(dq // Uncomment to construct a shared library //#define SHARED

// When creating a shared library: // Specify the names of any libraries and library paths that are required // by the shared library. E.g., if a library is found in /usr/lib/special // use \(dq-L/usr/lib/special -lspecial\(dq if the name of the library is // // The /lib and /usr/lib paths are usually predefined and need not be // specified #define SHAREDREQ \(dq\(dq

// The pattern locating sources in a directory: #define SOURCES \(dq*.cc\(dq

// Directory below this directory to contain temporary results #define TMP_DIR \(dqtmp\(dq

// Uncomment to use the ALL facility and a class dependency setup in the // CLASSES file. When a directory contains a file ALL (optionally rename // this filename by providing an alternative name) then all its sources // and all sources of all classes depending on it are also compiled. // Class dependencies are indicated by the class name (as the first // word on a line) optionally followed by additional class names, which // are the classes directly depending on the line\(cqs first class name. //#define USE_ALL \(dqa\(dq

// should commands be echoed (ON) or not (OFF) ? #define USE_ECHO ON

// Use the VERSION file #define USE_VERSION

// #define DEFCOM \(dqprogram\(dq (or \(dqlibrary\(dq) may be added (by, e.g., // icmstart)


icmake(1), icmconf(7), icmstart(1), icmstart.rc(7)


None reported


This is free software, distributed under the terms of the GNU General Public License (GPL).


Frank B. Brokken (

Search for    or go to Top of page |  Section 1 |  Main Index

icmake&.7&.22&.01&.tar&.gz ICMBUILD (1) 1992-2015

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.