No rule to make target `build/Makefile'.

support for the ARM toolchain
Zedwick
Posts: 5
Joined: Thu Apr 24, 2008 8:26 pm

No rule to make target `build/Makefile'.

Post by Zedwick » Thu Apr 24, 2008 8:41 pm

Hi, I'm very new to devkitpro (and my previous programming knowledge is the likes of PHP). I'm trying to get into programming wih some NDS coding, so i've been following Dovoto's NDS Tutorials, and I've gotten stuck on day 1 :P.

(tutorial can be found here: http://www.dev-scene.com/NDS/Tutorials_Day_1)

In his 'First Demo' section I am given some code and told to compile it using a template from the Devkitpro templates. But when i tried to compile it i get the following error:
ZedBook:/opt/local/devkitpro/demo1 zedwick$ make
make[2]: /opt/local/devkitPro/demo1/build/Makefile: No such file or directory
make[2]: *** No rule to make target `/opt/local/devkitPro/demo1/build/Makefile'. Stop.
make[1]: *** [build] Error 2
make: *** [build] Error 2

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

Re: No rule to make target `build/Makefile'.

Post by WinterMute » Fri Apr 25, 2008 12:47 pm

You've done something wrong somewhere, it's kind of hard to say what without seeing your machine to be honest.

This is what happened when I ran a quick test, maybe it'll help point you in the right direction.

Code: Select all

davem@straylight:$ cp -rv /opt/devkitpro/examples/nds/templates/arm9 demo1
`/opt/devkitpro/examples/nds/templates/arm9' -> `demo1'
`/opt/devkitpro/examples/nds/templates/arm9/template.prj' -> `demo1/template.prj'
`/opt/devkitpro/examples/nds/templates/arm9/Makefile' -> `demo1/Makefile'
`/opt/devkitpro/examples/nds/templates/arm9/source' -> `demo1/source'
`/opt/devkitpro/examples/nds/templates/arm9/source/main.c' -> `demo1/source/main.c'
`/opt/devkitpro/examples/nds/templates/arm9/template.pnproj' -> `demo1/template.pnproj'
davem@straylight:$ cd demo1/
davem@straylight:$ make
main.c
arm-eabi-gcc -MMD -MP -MF /home/davem/projects/nds/demo1/build/main.d -g -Wall -O2 -march=armv5te -mtune=arm946e-s -fomit-frame-pointer -ffast-math -mthumb -mthumb-interwork -I/home/davem/projects/nds/demo1/include -I/opt/devkitpro/libnds/include -I/opt/devkitpro/libnds/include -I/home/davem/projects/nds/demo1/build -DARM9 -c /home/davem/projects/nds/demo1/source/main.c -o main.o
linking demo1.elf
built ... demo1.arm9
Nintendo DS rom tool 1.38 - Apr 14 2008
by Rafael Vuijk, Dave Murphy, Alexei Karpenko
built ... demo1.nds
davem@straylight:$
Help keep devkitPro toolchains free, Donate today

Personal Blog

Zedwick
Posts: 5
Joined: Thu Apr 24, 2008 8:26 pm

Re: No rule to make target `build/Makefile'.

Post by Zedwick » Fri Apr 25, 2008 3:42 pm

WinterMute, you gave me the idea to try and just use make with the template main.c as you did, rather than the one i wrote from the tutorial, but that did exactly the same.

I have compiled example/graphics/2d/hello_world though and that worked fine.

BenRK
Posts: 3
Joined: Fri Apr 25, 2008 6:09 pm

Re: No rule to make target `build/Makefile'.

Post by BenRK » Fri Apr 25, 2008 6:37 pm

I'm having a similar problem, if not the same one, only I can't get any example to compile.

Zedwick
Posts: 5
Joined: Thu Apr 24, 2008 8:26 pm

Re: No rule to make target `build/Makefile'.

Post by Zedwick » Fri Apr 25, 2008 8:15 pm

Yayy, I'm not abnormally idiotic.

Zedwick
Posts: 5
Joined: Thu Apr 24, 2008 8:26 pm

Re: No rule to make target `build/Makefile'.

Post by Zedwick » Fri Apr 25, 2008 8:28 pm

Ok, I went back and copied the makefile from the nds-examples/graphics/2d/hello_world to the demo1 folder i had created and used it with the main.c code from the tutorial and that compiled fine.

Ben, have you tried that specific example? Maybe some example code doesn't work with the latest build of the devkit or something like that. Just a guess. Otherwise all teh guides said to re-install and go through the steps again if it wouldn't compile. Good luck :)

BenRK
Posts: 3
Joined: Fri Apr 25, 2008 6:09 pm

Re: No rule to make target `build/Makefile'.

Post by BenRK » Fri Apr 25, 2008 8:35 pm

I don't have such an example.

Here's my entire compile error.

C:\devkitPro\examples\nds\Graphics\3D\Misc\Toon_Shading>make clean
clean ...

C:\devkitPro\examples\nds\Graphics\3D\Misc\Toon_Shading>make
statue.bin
main.cpp
arm-eabi-g++ -MMD -MP -MF /c/devkitPro/examples/nds/Graphics/3D/Misc/Toon_Shadin
g/build/main.d -g -Wall -O2 -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer
-ffast-math -mthumb -mthumb-interwork -I/c/devkitPro/examples/nds/Graphics/3D/Mi
sc/Toon_Shading/include -I/c/devkitPro/libnds/include -I/c/devkitPro/libnds/incl
ude -I/c/devkitPro/examples/nds/Graphics/3D/Misc/Toon_Shading/build -DARM9 -fno-
rtti -fno-exceptions -c /c/devkitPro/examples/nds/Graphics/3D/Misc/Toon_Shading/
source/main.cpp -o main.o
c:/devkitPro/examples/nds/Graphics/3D/Misc/Toon_Shading/source/main.cpp: In func
tion 'int main()':
c:/devkitPro/examples/nds/Graphics/3D/Misc/Toon_Shading/source/main.cpp:65: erro
r: 'glViewport' was not declared in this scope
make[1]: *** [main.o] Error 1
make: *** [build] Error 2

C:\devkitPro\examples\nds\Graphics\3D\Misc\Toon_Shading>pause
Press any key to continue . . .
I've even re-installed the entire kit with no change.

Zedwick
Posts: 5
Joined: Thu Apr 24, 2008 8:26 pm

Re: No rule to make target `build/Makefile'.

Post by Zedwick » Sat Apr 26, 2008 1:58 am

I'll give you my basic understand of that error and see if you can work out what's up:

If you look at this part of your code...
c:/devkitPro/examples/nds/Graphics/3D/Misc/Toon_Shading/source/main.cpp:65: erro
r: 'glViewport' was not declared in this scope
The 'main.cpp:65' part means that in main.cpp on line 65 there is an error, and then it goes on to give you an idea of the problem with that file.

If it's an example I can't imagine you could have done anything wrong, have you tried many of the other examples to see if any of them will compile?

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

Re: No rule to make target `build/Makefile'.

Post by WinterMute » Sat Apr 26, 2008 2:14 am

Zedwick wrote:Ok, I went back and copied the makefile from the nds-examples/graphics/2d/hello_world to the demo1 folder i had created and used it with the main.c code from the tutorial and that compiled fine.
Thanks for trying that, there appears to be a problem with that template. Now you've pointed it out it seems to be related to a change I tried to allow the build directory outside the project folder. Basically it usually only shows up when part of the path has been symlinked - it's related to trying to remove relative parts of the path. For now just copy the makefile from one of the other arm9 only examples to that arm9 template and everything will be fine. I'll fix that before the next release of the examples tarballs.

BenRK wrote:I don't have such an example.

Here's my entire compile error.

Code: Select all

c:/devkitPro/examples/nds/Graphics/3D/Misc/Toon_Shading/source/main.cpp: In func
tion 'int main()':
c:/devkitPro/examples/nds/Graphics/3D/Misc/Toon_Shading/source/main.cpp:65: erro
r: 'glViewport' was not declared in this scope
make[1]: *** [main.o] Error 1
make: *** [build] Error 2
You have an old version of libnds installed, the latest is libnds 20071023.
Help keep devkitPro toolchains free, Donate today

Personal Blog

BenRK
Posts: 3
Joined: Fri Apr 25, 2008 6:09 pm

Re: No rule to make target `build/Makefile'.

Post by BenRK » Sun Apr 27, 2008 4:49 pm

Yeah, it's working properly now.

Post Reply

Who is online

Users browsing this forum: Majestic-12 [Bot] and 10 guests