different versions of the makefile with the examples

Post Reply
User avatar
vuurrobin
Posts: 219
Joined: Fri Jul 11, 2008 8:49 pm
Location: The Netherlands
Contact:

different versions of the makefile with the examples

Post by vuurrobin » Fri Feb 06, 2009 12:05 am

I noticed that the nds examples have different versions of the makefile. some include targets to convert images with grit, some for sound to be converted with mmutils (maxmod utils?) and some has neither one of them.

is it possible to create 1 makefile and use that with every example (exept for special ones like custom arm7 code or for librarie templates).

WinterMute
Site Admin
Posts: 1845
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: different versions of the makefile with the examples

Post by WinterMute » Fri Feb 06, 2009 5:07 am

I've been attempting to avoid a full blown "one size fits all" makefile, mainly because it's not really possible to do without limiting users in the end.

There are many possible ways to write makefiles for any given project, especially where external data is concerned. Some projects will get by with embedded data, others will need to load data from the filesystem at runtime, some may even require compression or data to be parsed into a specific format. It's really not possible to cover all these eventualities with one single makefile.

The general intent is that eventually users will learn to piece together their own makefiles using the examples as a guide.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Pete
Posts: 18
Joined: Wed Jan 28, 2009 9:12 pm

Re: different versions of the makefile with the examples

Post by Pete » Sat Feb 07, 2009 5:50 pm

Is there a sample that uses Grit for image conversion and also includes filesystem support? Maybe I overlooked it but when I was fiddling around, despite the fact that it should be easy to cobble one together from two pre-existing Makefiles I couldn't convince make to behave.

dovoto
Developer
Posts: 43
Joined: Fri Aug 12, 2005 10:01 pm
Contact:

Re: different versions of the makefile with the examples

Post by dovoto » Sun Feb 08, 2009 7:02 pm

The only change to a makefile that is needed for file system use to add libfat:

Code: Select all

#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
#---------------------------------------------------------------------------------
LIBS	:=  -lfat -lnds9
Use a grit makefile and add the -lfat and you will have support for both.


Now, if the goal is to use grit to convert graphics to binary and access those binary files via the file system as apposed to including them directly into your nds file, the makefile modification would be a bit more challenging.

Pete
Posts: 18
Joined: Wed Jan 28, 2009 9:12 pm

Re: different versions of the makefile with the examples

Post by Pete » Sun Feb 08, 2009 7:58 pm

Thanks. I have a feeling I started from the other end and got lost somewhere trying to add grit support :oops:

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 13 guests