*** No rule to make target `graphics.o'

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
AntiBNI
Posts: 15
Joined: Mon Sep 24, 2007 1:15 pm
Location: Planet Earth

*** No rule to make target `graphics.o'

Post by AntiBNI »

Im getting that error :
make: *** No rule to make target `graphics.o', needed by `hello.elf'

every time i try to incorporate graphics.h into my app.

Any ideas?

*Edit*

This is my Makefile

Code: Select all

TARGET = hello
OBJS = main.o graphics.o framebuffer.o

CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LIBS = -lpspgu -lpng -lz -lm
LDFLAGS =

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Dump

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
Thanks...
AntiBNI
User avatar
Wally
Posts: 663
Joined: Mon Sep 26, 2005 11:25 am

Post by Wally »

Whereabouts is graphics.h hidden?

I got a feeling you havent linked them properly.

Try to keep them in the same directory unless you know what you are doing :P
FreePlay
Posts: 71
Joined: Wed Jan 04, 2006 6:53 pm
Location: Schenectady, New York, USA

Post by FreePlay »

Do you have graphics.c and framebuffer.c in there?

It's trying to build the object files. The error you get implies that you don't actually have the code for them anywhere.
AntiBNI
Posts: 15
Joined: Mon Sep 24, 2007 1:15 pm
Location: Planet Earth

Post by AntiBNI »

where should they be in?
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Given your makefile, the same directory main.c is in.
AntiBNI
Posts: 15
Joined: Mon Sep 24, 2007 1:15 pm
Location: Planet Earth

Post by AntiBNI »

oh,lol xD

Il try it when i get home cuz im at the University right now.

Thnaks for the answer.
AntiBNI
Posts: 15
Joined: Mon Sep 24, 2007 1:15 pm
Location: Planet Earth

Post by AntiBNI »

I have placed graphics.h and graphics.c in the same directory of my app and now i get an error like if i wouldn't been calling the graphics lib o.0

like
undefined reference to 'initGraphics()' and stuff

Im just experimenting with PNGs with PSP tho,il work on a brew after i finish with this error >_<

heres my code and here is my make file.

Code:

Code: Select all


//PSP Header Files
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspctrl.h>
#include <pspdisplay.h>
#include <pspgu.h>
#include <png.h>
#include <stdio.h>
#include "graphics.h"
//This is the programs &#40;Prog Name,major ver,minor ver&#41;
PSP_MODULE_INFO &#40;"Dump",0,1,1&#41;;

//Define Print as pspDebugScreenPrintf
#define printf pspDebugScreenPrintf

//Code Body
SceCtrlData pad;
int main&#40;&#41;
&#123;


          char buffer&#91;200&#93;;
          Image* ourImage;


	pspDebugScreenInit&#40;&#41;;
          initGraphics&#40;&#41;;
		sprintf&#40;buffer, "ourImage.png"&#41;;
          ourImage = loadImage&#40;buffer&#41;;

		   blitAlphaImageToScreen&#40;0 ,0 ,480 , 272, ourImage, 0, 0&#41;;
		   flipScreen&#40;&#41;;
sceCtrlReadBufferPositive&#40;&pad, 1&#41;;
		   while &#40;1&#41;
		   &#123;
			   if&#40;pad.Buttons & PSP_CTRL_SQUARE&#41;
			   &#123;
				   sceKernelExitGame&#40;&#41;;
			   &#125;
		   &#125;



//end if


//Pause untill user press "Home"
sceKernelSleepThread&#40;&#41;;

return 0;

&#125;
// end of code

Makefile:

Code: Select all

TARGET = hello
OBJS = main.o graphics.o framebuffer.o

CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $&#40;CFLAGS&#41; -fno-exceptions -fno-rtti
ASFLAGS = $&#40;CFLAGS&#41;

LIBDIR =
LIBS = -lpspgu -lpng -lz -lm
LDFLAGS =

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Image Example

PSPSDK=$&#40;shell psp-config --pspsdk-path&#41;
include $&#40;PSPSDK&#41;/lib/build.mak
I don't know whats with the error...

Thanks.
Post Reply