GCC compiler how-to instructions                                  (Revision 2)
===============================================================================
Odin libraries now use Gnu Compiler Suite to built some DLL's it require.

Currently you need Gnu C/C++ 3.0.3 and later compilers to build it.
Due to some bugs in 3.0.3 we expect 3.2.x to be a requirement after testing.
For now code compiles and works only on 3.0.3.


To set up EMX for Odin build:

First get EMX runtime http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxrt.zip Add EMX\DLL to your LibPath.
Be sure to add to PATH emx\bin directory. To check that you have all you need
type 'emxrev' at your command prompt.

o GNU Make:

Get it from hobbes and place somewhere in %PATH%

http://hobbes.nmsu.edu/pub/os2/dev/util/make-3_79_2a1-bin.zip

o EMX Development stuff:

http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/bsddev.zip
http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxdev1.zip
http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxdev2.zip
http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/gppdev1.zip
http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/gppdev2.zip
http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/gnudev1.zip
http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/gnudev2.zip

Unzip each of these packages in the directory above EMX. All the extracted
files will go into the EMX directory after that unzip fix04 over them:
http://hobbes.nmsu.edu/pub/os2/dev/emx/v0.9d/emxfix04.zip

Once you have unzipped these packages go to X:\EMX\LIB\ and run OMFLIBS.CMD.

Add three variables to config.sys and reboot:

set C_INCLUDE_PATH=x:/emx/include;
set CPLUS_INCLUDE_PATH=x:/emx/include;
set LIBRARY_PATH=x:/emx/lib

If you do not want to add them to config.sys add them to newgcc.cmd 
during GCC 3.0.3 installation phase like this:

set C_INCLUDE_PATH=%EMX_PATH%include;
set CPLUS_INCLUDE_PATH=%EMX_PATH%include;
set LIBRARY_PATH=%EMX_PATH%lib

after SET PATH line. Be warned however that all EMX will function correctly
only in a window where you've launched newgcc.cmd

o GNU Utils

It is necessary to get and install (place in %PATH%) this two packages:
http://hobbes.nmsu.edu/pub/os2/util/file/gnufutil.zip
http://hobbes.nmsu.edu/pub/os2/util/file/gnututil.zip

Make sure you placed *.exe files in your %PATH% and .dll files in %LIBPATH%
so OS/2 can find and launch utils from anywhere.

o GCC 3.0.3

Get:
    * binutils-os2-2.11.2-bin.zip
    * emx-strt-fix-0.0.2.zip
    * gcc-os2-3.0.3-beta-gcc.zip
    * gcc-os2-3.0.3-beta-gpp.zip
    * gettext-os2-0.10.40-bin.zip

from ftp://ftp.netlabs.org/pub/gcc.

Unzip each of these packages in the directory above EMX. All the extracted
files will go into the EMX directory.

MAKE SURE YOU DO THIS AFTER YOU INSTALL THE EMX/GCC DEV PACKAGES. 

These zips overwrite many of the files from the previous group. Now go
to x:\emx\include and rename 'cpp' directory to 'cpp-old'.

Go to x:\emx\bin.new and correct newgcc.cmd:

1. Check EMX_PATH points to correct location of EMX files on your system
2. Set WORK_SHELL to suite your needs (File Commander, 4OS2, or simply leave
   as it is for CMD shell)
3. Add 'SET GCCLOAD=20' after SET PATH line.

Launch it afterwards.

Launch gcc -v and check it is 3.0.3

Do NOT leave window where you've launched newgcc.cmd

1. Go to X:\EMX\LIB\ and type 'make'.
2. Go to X:\EMX\LIB\GCC-LIB\I386-PC-OS2_EMX\3.0.3\and type 'make'.

Go to Odin directory and start ConfigureGCC.cmd - this should produce no errors.
Note that script assumes gcc.exe, g++.exe, as.exe to be in the PATH.

