forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

makefile

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
King_Kong



Joined: 26 Apr 2006
Posts: 4

PostPosted: Wed May 24, 2006 6:23 am    Post subject: makefile Reply with quote

I get this error when i enter 'make' under the projects/helloworld directory:

Quote:
$ make
Makefile:2: *** missing separator. Stop.


Here is my makefile:
Code:

//Makefile for Hello World!!

TARGET = hello
OBJS = main.o

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

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak


Any ideas what's wrong? I presume the source code is fine as it doesnt say any other errors.
Thanks
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Wed May 24, 2006 6:50 am    Post subject: Re: makefile Reply with quote

King_Kong wrote:
I get this error when i enter 'make' under the projects/helloworld directory:

Quote:
$ make
Makefile:2: *** missing separator. Stop.


Here is my makefile:
Code:

//Makefile for Hello World!!

TARGET = hello
OBJS = main.o

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

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak


Any ideas what's wrong? I presume the source code is fine as it doesnt say any other errors.
Thanks


USe '#' for the comments.

Code:

//Makefile for Hello World!!




Code:

#Makefile for Hello World!!
Back to top
View user's profile Send private message
King_Kong



Joined: 26 Apr 2006
Posts: 4

PostPosted: Wed May 24, 2006 7:50 am    Post subject: Reply with quote

This program is in C so therefore the "//" represent a comment line. I think you're talking about C++. Any suggestions?
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Wed May 24, 2006 8:03 am    Post subject: Reply with quote

# is for comment in makefile, and you have used //
// is comment in C99 or C++ files

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
King_Kong



Joined: 26 Apr 2006
Posts: 4

PostPosted: Wed May 24, 2006 8:25 am    Post subject: Reply with quote

Thanks a lot. Although now there are loads of errors in my 'main.c'. This could take a while. By the way, isnt it ok to comment using '//' and /* */ in my 'main.c' (source code)?[/img]
Back to top
View user's profile Send private message
dot_blank



Joined: 28 Sep 2005
Posts: 498
Location: Brasil

PostPosted: Wed May 24, 2006 10:04 am    Post subject: Reply with quote

like jim has just told you
// was introduced to work in C source with C99
and /* */ has always been used, so you can
decide what style of commenting youd like but remember
only one thing that // comments out a entire line so you
cannot insert that between any normal C source and
should always be on its own line

ex. Good
//my how commenting is great
char* comment[] = "really great";

ex. BAD
//this is not good commenting char* badComment;
_________________
10011011 00101010 11010111 10001001 10111010
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group