Gregg M. Townsend
Department of Computer Science
The University of Arizona
www.cs.arizona.edu/icon/v950/port.htm
Last updated March 25, 2010
config
directory of the Icon source tree.
To add a new configuration, create a new directory and copy in the
define.h
, Makedefs
, and status
files
from the posix
configuration directory.
The porting process involves repeating these steps until the system is working:
make Configure name=
newdirectory
make
make Test
The Icon source code has proven to be robust and portable.
Most porting problems are related to command options and library locations,
the things that are configured in the Makedefs
file.
If the system builds smoothly, but problems are revealed by
make Test
, try removing any C optimization options.
New compilers are often stressed beyond their capabilities by Icon.
It is best to start by building just the basic Icon system.
When that is working, repeat with make X-Configure
instead of make Configure
to build Icon with graphics.
(Note that make Test
does not test graphics, and so you
should also execute bin/colrbook
as an additional manual test.)
Finally, when those configurations are working, you may wish to
enable dynamic loading as described in a later section.
posix
configuration files.
define.h
define.h
,
but otherwise leave this file alone.
Although some older configurations may define additional values,
they are not needed here.
Makedefs
Makedefs
file.
The parameters set here are:
CC
- The command name for the C compiler. Typical values are
cc
,gcc
, orc99
.CFLAGS
- C compiler flags. A path specification for the X11 libraries is usually needed. Include
–O
to optimize the C code, but remove it if it causes problems.CFDYN
- C compiler flags for generating dynamic libraries, usually a flag that generates position-independent code. A typical value is
–fPIC
.RLINK
- General runtime libraries. Many systems require
–lm
to link the math library. Some systems also require–ldl
to linkdlopen()
.TLIBS
- Thread library. Some systems require
–lpthread
or other values (see examples in other configurations) to link the threads library.XLIBS
- Linker specifications for the X Windows library. Many systems need both a path and a library name here.
XPMDEFS
- Definitions for building the XPM library. Change this (see other examples) if problems occur while building the
src/xpm
directory.GDIR
- Leave this alone.
status
status
file is not used by the build process,
but it should be edited to document the target platform,
and it should be updated whenever the configuration changes.
loadfunc
procedure.
Dynamic loading is enabled by
config/
name/define.h
to add #define LoadFunc
at the end.
ipl/cfuncs/mklib.sh
to add a new case to the shell script that builds
a shared library from a set of C object files.
define.h
,
it is tested by make Test
.
The second step is the hardest; on many systems, documentation that discusses shared libraries is scant or nonexistent.
If problems are found while building, check especially the definitions
of the Makedefs
parameters
CFDYN
and RLINK
.
status
file one last time and make
sure it is correct.
Send the files from the new configuration directory
(and also mklib.sh
, if changed) to
icon-project@cs.arizona.edu.
Please also tell us the values reported on that platform by the
uname -p
and uname -m
commands.