#49587 - Dannon - Sun Jul 31, 2005 6:52 pm
I don't know if this has been discussed or explained somewhere, if it has I can't find it. I am trying to add somefiles that I want building to my makefile but they don't seem to be adding, can someone please explain, examples woud be a bonus, how to add another file to the makefile to be compiled.
Thanks
--Dannon
#49594 - dovoto - Sun Jul 31, 2005 7:31 pm
If you do not understand make files in general there are lots of tutorials on the net that explain their workings in excrutiating detail (google knows all).
If you just want you code to compile I recomend grabing one of the generic makefiles from the examples and sticking this in your project. They automaticaly compile every common file extension as long as you have them in the correct directory (ie source code in the 'source' directory and include files in the 'include' directory).
Make is worth taking the time to learn but you can put it off for a bit and use the generic ones if getting demos up is your primary concern.
_________________
www.drunkencoders.com
#49690 - Dannon - Mon Aug 01, 2005 6:53 pm
I understand the vast majority of the makefiles, what I don't understand is why I this one is not accepting my files, I have:
calculator.o: calculator.c
arm-elf-g++ -g -Wall -O2 -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer -ffast-math -mthumb-interwork -I$(NDSLIBINC) -DARM9 -c calculator.c -ocalculator.o
and I have added it to the arm9.elf:
arm9.elf: arm9_main.o calculator.o
arm-elf-g++ -g -mthumb-interwork -mno-fpu -specs=ds_arm9.specs arm9_main.o calculator.o -L$(NDSLIBLIB) -lnds9 -o arm9.elf
the make command kicks out saying:
make: *** No rule to make target `calculator.c', needed by `calculator.o'. Stop.
What rule am I missing? Any help?
#49699 - josath - Mon Aug 01, 2005 8:08 pm
It's saying it can't find your calculator.c
I agree with dovoto, using one of the ds 'template' makefiles that automatically compiles all your files for you is real handy if you don't want to muck around with the makefiles.
#49701 - Dannon - Mon Aug 01, 2005 8:16 pm
Ok then, thanks. Which template works with the latest version of devkitPro, I have downloaded about 3 different templates and none of them seemed to compile, any links please? A template that works with VC++ would me most useful