This is an old revision of the document!
DOS - Modern Development Tools
16bit & 32bit Tools
- Homepage
- Documentation
- Sample makefiles
- 286 / Real mode target
- 386 / Protected mode target
OpenWatcom
32bit Only Tools
- Homepage
- Downloads
- Sample makefile
DJGPP / GCC
DOS SDK's & Libraries
Allegro 4
- Documentation
- Official documentation at liballeg.org - downloadable versions only
- Downloads
- The above includes Allegro 4.2.3.1 built and patched for DJGPP, with all example code, normal, debug and profile library versions and html docs. This unpacks to /opt/toolchains/x86/allegro-djgpp.
- CWSDPMI.EXE (at the official homepage or the information on Wikipedia)
- You need cwsdpmi.exe, above, (or an equivalent DPMI server) in order for DJGPP binaries to run on DOS.
How to build on modern compilers.
- Download 4.2.3.1 source
- Unpack
- Configure for DJGPP cross-compilation (run 'fix.sh djgpp')
Next you have to edit xmake.sh to pick up your DJGPP install. In my case it was setting the two variables XC_PATH and XPREFIX to the following:
xmake.sh
XC_PATH=/opt/toolchains/x86/djgpp/bin XPREFIX=i586-pc-msdosdjgpp-
Next edit makefile.dj to set a compatibility option for the modern GCC compiler (the '-fgnu89-inline' directive). If you don't, things look like they work until you try to link against Allegro and your code will fail to compile due to duplicate symbol errors (there are a lot of inline defines in the Allegro headers, which are deprecated on C99 syntax):
makefile.dj
TARGET_OPTS = -fgnu89-inline -O2 -funroll-loops -ffast-math
Finally, there is a bug in one of the graphics drivers that comes with the 4.2.3.1 release, and it results in two missing symbols when compiled with GCC. You need to edit src/misc/vbeaf.c and add them. Just before the following lines:
src/misc/vbeaf.c
* the video driver structure */ GFX_DRIVER gfx_vbeaf = {
Change it to show the following:
src/misc/vbeaf.c
int int_ds; int saved_ds; /* the video driver structure */ GFX_DRIVER gfx_vbeaf = {
Now you are ready to compile Allegro from source:
./xmake.sh lib cp -a include /to/where/you/want/the/allegro/headers cp lib/djgpp/lib*.a /to/where/you/want/the/allegro/libs
You can optionally build the demo application as well:
./xmake.sh demo
However, the examples don't get built via the cross compile process, so they need to be built manually:
cd allegro-4.2.3.1 cd examples for src in *.c; do i586-pc-msdosdjgpp-gcc -I/to/where/you/want/the/allegro/headers -g -O2 -o ${src%.c} $src /to/where/you/want/the/allegro/libs/liballeg.a -lm done
Judas Sound Library
- Homepage
- Documentation
- Downloads
- OpenWatcom
- GCC
Short description.