gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > NDSLIB Makefile Help

#41466 - NoToDoHo - Thu Apr 28, 2005 8:30 pm

I am trying to adapt my NDSLIB Makefiles to work under 4NT with my version of make.exe (same version I used for GBA dev). I am trying to build the examples/arm9/2d/hello_world demo. I've been able to build the libraries and the startup boot loader with minimal changes to the Makefiles. With hello_world, I'm encountering two problems. First, with the line:

CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))

Make doesn't seem to find main.cpp (I do echo $(OFILES) within one of the steps and it gives me a blank). When I copy main.cpp to the same directory as Makefile and change the above line to:

CPPFILES := main.cpp

it finds the file now ($(OFILES) now yields main.o) but it doesn't see the need to build it - the link fails because it doesn't build main.o. I noticed the line:

%.elf:
<link commands>

and changed this to:

%.elf: $(OFILES)
<link commands>

when I do this, I get the message:

make[1]: Circular main.elf <- main.o dependency dropped.

So it still doesn't work.

Any insight you could offer would be greatly appreciated!

#41471 - josath - Thu Apr 28, 2005 10:01 pm

why do you want to use 4nt instead of free cmd.exe or free bash shell or similar, both of which are known to work?

#41489 - wintermute - Fri Apr 29, 2005 1:56 am

use msys, not random make variant xxx.

#41510 - sasq - Fri Apr 29, 2005 10:05 am

ndslib makefiles & templates feels pretty over-engineered. Doesnt work with cygwin either. Makefiles could be simplified a lot.

#41512 - wintermute - Fri Apr 29, 2005 10:24 am

sasq wrote:
ndslib makefiles & templates feels pretty over-engineered. Doesnt work with cygwin either. Makefiles could be simplified a lot.


devkitARM is not designed to work with cygwin, *deliberately*

using devkitARM with cygwin is *NOT* supported.

the current ndslib makefiles & templates will be history soon.

#41517 - sasq - Fri Apr 29, 2005 12:03 pm

devkitarm works fine with cygwin - maybe not when run through bash, havent tried that - but using cygwin make works.

#41520 - wintermute - Fri Apr 29, 2005 1:29 pm

sasq wrote:
devkitarm works fine with cygwin - maybe not when run through bash, havent tried that - but using cygwin make works.


people keep reporting problems with /cygdrive/ nonsense & demanding that I fix it :/ There are also occasional problems with cygwin tools causing devkitARM to crash (mostly 95/98/Me as I recall)

My general sentiment towards cygwin is, if it works for you great, if not don't moan at me.