MJSulib
C functions for utility programs
|
||
---|---|---|
From a shell-/command-prompt, cd into the directory where the distribution was unpacked.
A "makefile" is generated by executing the provided "configure" shell-script, thus:
sh configureThere are two command-line options for this script:
-prefix=PATHNAME specifies the top-level installation directory the default is the invokers' home directory. -cc=STR specifies the name, or command-line with flags, of an ANSI C compiler. The default is to search for a suitable C compiler and flags.
This creates a "makefile". If any of the configuration settings could not be automatically determined, you will be warned that the makefile may need manual adjustment (although this is rare).
A "make.bat" script is generated by executing the provided confw32.cmd script. This takes a single mandatory argument specifying which C compiler to use; run confw32.cmd without any arguments to see a list of recognised C compilers.
A "make.bat" script is generated by executing the provided confdos.bat script. This takes a single mandatory argument specifying which C compiler to use; run confdos.bat without any arguments to see a list of recognised C compilers.
makeOn UNIX/Linux/etc, this creates the static-link-library called libmjsu (the exact filename-extension depends on the compiler toolkit used, but is usually ".a"). The binary library and the API header-files can be "installed" under the previously-selected directory by running the command:
make installOn Windows, the "make" command creates a static-link-library called mjsu_w32.lib, and on PCDOS called mjsu.lib. If you want to compile/link other programs with this binary library, you may want to copy the constructed .lib file and the API header-file mjsu.h into a more convenient other folder.
Once you have a working installation, you may as well remove the temporary files from the distribution directory, by executing the command:
make cleanThis does not remove the makefile/build-script, but it does clear out the temporary files.