Next: The Language
Up: Invocation
Previous: Using Makefiles
  Contents
  Index
Utility modules or packages which are needed in more than one
project may be maintained in separate directories.
If these directories are put into the environment variable
MODPATH (a colon-separated list of directories like
PATH) they are found by the compiler, the makefile generator,
and by the debugger.2.2
Usually, libraries are kept in three archives:
- lib.a:
- This archive contains the object files.
Note that all objects files of a library will be put
into all your binaries unless you use an archive for them.
You are free to use another name for the archive as long
as it ends in .a.
- SYM and REF:
- Symbol files and reference files may be archived
in SYM and REF.
Once you have created them, the compiler automatically
finds symbol files there and stores newly generated
symbol files and references files in these archives.
Note that makefiles are to be changed if you switch to archives:
- If SYM is used, you have to specify the option -a
once(!) to mmm:
mmm -u makefile -a
If a archive named SYM does not exist yet, you must create
it now either with
- ar q SYM *.sy && rm *.sy
if you already have symbol files, or
- cp /usr/local/lib/modula/empty_archive SYM
otherwise
(replace /usr/local/lib/modula by the directory where
the Modula-2 library is installed on your system).
- REF is to be created like SYM.
- If you want to name your archive for the object files libstuff.a
you need to update your makefile in the following way:2.3
LIB=libstuff.a mmm -u makefile -e -l
Next: The Language
Up: Invocation
Previous: Using Makefiles
  Contents
  Index
Andreas Borchert
2003-12-10