        ===========================                      how to compile
        GNU Pascal for DOS and OS/2               GPC 2.0 (GCC 2.7.2.1)
        ===========================                    with and for EMX

        Author: Peter Gerwinski <peter.gerwinski@uni-essen.de>
        Created on:  15 Aug 1995, 2:30-4:30am (version 1.0)
        Last change: 16 Nov 1996, 20:28 (version 2.2)


        This recipe is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY.  I disclaim any liability for damages
        resulting from following these instructions ...

        Feel free to copy, modify, translate or delete this file.

        And so on.


        GPC binaries for EMX should be available from the same place
        where you found the source.  Perhaps the best idea is simply
        to get and install them?  For example with PKUNZIP:

          pkunzip -d -n gpcemx \



        Okay, here is how I compiled it ...

        The EMX extender for DOS and OS/2 makes it relatively easy to
        port GNU tools - such as the GNU Pascal Compiler - to these
        platforms.  However, it is not straightforward to compile it.
        My solution might be not the best one but it works, and I
        document it here.  If somebody finds a cleaner way how to 
        compile GNU Pascal for EMX, please let me know!

        0) I assume you have an OS/2 system with the EMX package and
           GNU development tools installed, the "unzip" decompression
           program and the "dmake" make utility.  You have compiled
           GNU C such that the object files are still in place.  It is
           important that GNU C is the version matching to GNU Pascal
           which is currently 2.7.2.1.

           If you have problems compiling GNU C:  This directory contains
           drive-independent versions of dostage1.cmd and makeexe.cmd
           which might be useful for you.

           If you are running DOS, you are in trouble now because
           the DOS command line is limited to 128 characters.  If you
           succeed to compile GPC for EMX on a DOS system, please let
           me know.  (However you can compile GPC for DJGPP on a DOS
           system.)

        1) Unzip the source for GPC from the emx directory, so it will
           go into the gnu subdirectory.  Unlike other EMX sources, the
           GPC source must *not* be extracted from the root directory.

             cd \emx
             unzip c:\gpc20s

        1.41) Read this file ;-)

             e gpc-20\config\emx\readme.emx

        2) Configure and make your GNU Pascal compiler and runtime system.
           You need not call `dmake' directly; call `make.cmd', instead.

             configur
             make

           To install, type

             make install

        3) That's it.  Hope that not too much went wrong.
           Write some tiny test programs.
           Write useful larger programs with GPC ...

        Good luck!

            Peter
