______   ___    ___
    /\  _  \ /\_ \  /\_ \
    \ \ \L\ \\//\ \ \//\ \      __     __   _ __   ___ 
     \ \  __ \ \ \ \  \ \ \   /'__`\ /'_ `\/\`'__\/ __`\
      \ \ \/\ \ \_\ \_ \_\ \_/\  __//\ \L\ \ \ \//\ \L\ \
       \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
        \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
                                       /\____/
                                       \_/__/


          Borland C++Builder-specific information.

         See readme.txt for a more general overview.


BCC32 notes

Status: it works. It currently doesn't build the Allegro library from the sources, but it does let you compile your own Allegro-based programs and run them with the Allegro DLLs. Thanks to Inprise for creating the very useful IMPLIB program.

The screensaver example is built, but you must copy scrsave.scr to your windows/system directory (or winnt/system32 directory under Windows NT/2k/XP) if you want to test it.


Required software

In order to run your programs, you need to obtain the Allegro DLLs and install them in the Windows system directory.

This is known to work with the Borland C++ 5.5 command line compiler. Earlier versions may cause problems (for example v5.02).

You need to use GNU make, since Borland make is really ugly about its makefiles. You can grab it from either the MinGW or DJGPP distributions; more info on this in available in the following files: docs/build/mingw32.txt and docs/build/djgpp.txt.


Installing Allegro

Set up your environment so that Borland C++ can be used from the commandline. Then set the variable BCC32DIR to the directory where Borland C++ is located, for example 'set BCC32DIR=c:\bcc32'.

Type "cd allegro" and then "fix.bat bcc32". Then, run "make". Find something fun to do while it's compiling. It will eventually finish; then just type "make install" to set the library up for use.

If you also want to install a debugging version of the library (highly recommended), type "make install DEBUGMODE=1". Case is important, so it must be DEBUGMODE, not debugmode!

If you also want to install a profiling version of the library, now type "make install PROFILEMODE=1".

If your copy of Allegro doesn't include the makefile.dep dependency files (unlikely, unless you have run "make veryclean" at some point), you can regenerate them by running "make depend".

If your copy of Allegro doesn't include the linker .def file (unlikely, unless you have run "make veryclean" at some point), you can regenerate it by running "misc\fixdll.bat".


Using Allegro

All the Allegro functions, variables, and data structures are defined in allegro.h. You should include this in your programs, and link with one of the libraries:

      alleg.lib      - optimised DLL import library
      alld.lib       - debugging DLL import library
      allp.lib       - profiling DLL import library
Don't forget that you need to use the END_OF_MAIN() macro right after your main() function!

You will need to distribute the appropriate DLL along with your program.