GP2X Open2x Makefiles


Orkie

Super Duper Mega GP Mania
Joined
Mar 22, 2006
Messages
2,373
Location
UK
Website
www.gp2x.dev
I've adapted the GBA Makefiles from devkitARM to work with the Open2x toolchain. They are very clean, and I thought it'd be nice to have them around so that new people don't have to faff around writing their own. It may also help people release dynamic binaries when a public release of the Open2x firmware is made.

There are two Makefiles included. 'Makefile' builds a dynamically linked binary suitable only for use on Open2x and 'Makefile.gph' builds a statically linked binary, which can run on any firmware (but is really meant for GPH only).

To install, simply copy the 3 rules files to /opt/open2x/gcc-4.1.1-glibc-2.3.6 (or wherever you have installed the toolchain) and create a copy of the template directory to use as your project directory. There is a 'LIBS' variable in each Makefile (line 40) to which you need to add your -lwhatever statements to.

http://x11.gp2x.de/open2x/toolchain/o2x-makefiles.zip

EDIT: If you want to compile C++ files, you also need a CXXFLAGS section in the Makefile, which will normally be identical to CFLAGS.
 
Back
Top