Open2x Makefiles
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. If you want to compile C++ code with these Makefiles, you will also have to add a CXXFLAGS section, which will normally be the same as CFLAGS.
Download here
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. If you want to compile C++ code with these Makefiles, you will also have to add a CXXFLAGS section, which will normally be the same as CFLAGS.
Download here

1 Comments:
hi there!
sorry for that other post, I can't edit it so I deleted it.
thanks for this make file, it sure makes it easier to compile.
my earlier post was about sdl headers not found, it turns out that my include was missing "SDL/", so sorry about that.
cheers and nice work, I wish I could test the open2x firmware, I just dont have the cradle and I'm worried if it gets bricked I won't be able to use it anymore.
By
dummymael, at 2:59 AM
Post a Comment
<< Home