makefile

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

Moderators: cheriff, TyRaNiD

Post Reply
King_Kong
Posts: 4
Joined: Wed Apr 26, 2006 6:43 am

makefile

Post by King_Kong »

I get this error when i enter 'make' under the projects/helloworld directory:
$ make
Makefile:2: *** missing separator. Stop.
Here is my makefile:

Code: Select all

//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
moonlight
Posts: 567
Joined: Wed Oct 26, 2005 7:46 pm

Re: makefile

Post by moonlight »

King_Kong wrote:I get this error when i enter 'make' under the projects/helloworld directory:
$ make
Makefile:2: *** missing separator. Stop.
Here is my makefile:

Code: Select all

//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: Select all

//Makefile for Hello World!! 

Code: Select all

#Makefile for Hello World!! 
King_Kong
Posts: 4
Joined: Wed Apr 26, 2006 6:43 am

Post by King_Kong »

This program is in C so therefore the "//" represent a comment line. I think you're talking about C++. Any suggestions?
User avatar
Jim
Posts: 476
Joined: Sat Jul 02, 2005 10:06 pm
Location: Sydney
Contact:

Post by Jim »

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

Jim
King_Kong
Posts: 4
Joined: Wed Apr 26, 2006 6:43 am

Post by King_Kong »

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]
User avatar
dot_blank
Posts: 498
Joined: Wed Sep 28, 2005 8:47 am
Location: Brasil

Post by dot_blank »

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
Post Reply