This is a quick guide to cross compile a MSDOS binary.

First get a cross compiler:

(or just grab a prebuilt one from the GitHub page)

Get allegro-4.2:

"Fix" it for djgpp:

  • ./fix.sh djgpp

Edit xmake.sh and check that the paths and compiler name are correct:

XC_PATH=/<djgpp_path>/i586-pc-msdosdjgpp/bin:/<djgpp_path>/bin XPREFIX=i586-pc-msdosdjgpp- INSTALL_BASE=/<djgpp_path>/i586-pc-msdosdjgpp

To find out the default internal search paths, you can use the command: echo | /usr/local/djgpp/bin/i586-pc-msdosdjgpp-gcc -xc -E -v -

Build and install:

  • ./xmake.sh depend
  • ./xmake.sh lib -j 3
  • sudo ./xmake.sh install