Next to the use of the video memory banks on the nds, one of the strangest features in newbies for homebrew nds programming is the makefile.

I already wrote a blog on this in an older version of a homebrew blog, and here is the updated text:

Makefile monsters

Having the incredible urge to make a game for the nds, you dont think of the makefile.
You think of your game!

After having sniffed at all sorts of examples in the devkitpro examples folder you try something of your own, and “Fi Donc!”, (french for all kinds of trouble!), the makefile doesn’t quite let you taste the sweetness of succes….:-( These are (were) dedicated smaller version, only including what was needed for this example.

What is this monster? The MAKEFILE is a file with rules how to link all the things you have put together in your project, and, finally presenting the code, the images, the sounds to the devkitpro, to let it be crunched and digestible by the nds: All of this has to be done to be able to produce the miracle .nds file, which can be put in the emulators or the nds itself.


You can do this by hand too!
the name of this link speaks for itself.

There is some luck around the corner: you are not the first to confront this….monster you didn’t ask for, (you just wanted to program C… an IDE like DevCpp – actually also here you need a makefile but it is hidden, taken care of….like this with JAVA by the way and any other programming environment, only it is totally hidden for JAVA.)
Makefile making: Killroy was here! is written on this wall, and whoever it was, they were good!!!
They have created templates for the makefile.

Want to see a not so template makefile?
Look at this sound example:
and download and open this makefile, it shows its working very clearly, totally dedicated to this very instructive sound project!

Then go to the devkitpro examples, there you see more generic makefiles, although the methods to work with sprites differ, so, the even the generic makefiles will differ amongst themselves.

in between and writing about the “old” style and the “new” is this link:
here the workings are explained fixing the watch example in de Devkitpro examples in the meantime, and expanding on the two processors ARM7 and ARM9.

Now that you now the why and the how, you can go and talk to these monster makefiles…
what helps too is searching a tutorial on makefile, although this tends to be too general, you can extract some rules and get used to the very short commands….

later on (in nds traditions never) there will be more on makefiles!!!

this is the offcial description:


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: