Cosm README.TXT
---------------

Building Cosm
-------------
Type `build help` and follow the directions.
Platform specific notes are below.


Porting Cosm
------------
Cosm is designed to port to any machine with a 32bit CPU or better.

1. Copy the TEMPLATE makefile in make/ to the correctly named os-cpu
   file. Edit the makefile for your platform.

2. Type `build os-cpu` in the main dir.

3. Read through all CPU/OS layer files, port any code that doesn't
   compile, taking care not to break any other platforms.

4. Run lib/testlib and fix any detected faults.

5. Add any building notes to this file.


CPU/OS Layer
------------
lib/
cosm.h      cosmtest.c  testlib.c   cosmio.h    cosmio.c    cosmmath.h
cosmmath.c  cosmnet.h   cosmnet.c   cosmtask.h  cosmtask.c  cputypes.h
cosmfile.h  cosmfile.c  cosmmem.h   cosmmem.c

Once these files are done, they are the only files in Cosm that need
to be ported to new platforms. Once they are ported and the proper
makefile is made, all other functions should compile cleanly.
Outside of these files NO platform specific functions should be used,
only the ones in the Cosm interface. In this way all future code will
require no porting.


Utility Layer
-------------
lib/
buffer.c    compress.h  cosmtime.c  email.h     security.c  speed.h
buffer.h    config.c    cosmtime.h  log.c       security.h
compress.c  config.h    email.c     log.h       speed.c


Platform Specific Notes
-----------------------

Linux:
  Most glibc based systems will have support for threads (libpthread)
  however, most older libc5 and, older still, libc4 systems will most
  likely _not_ have thread support.  If you get errors about threads
  when building cosm, try 'build linux-x86 -lpthread'. If you have no thread
  support at all then use 'build linux-x86 -DNO_THREADS'. You should install
  the linuxthreads package if possible.
