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 

Problem compiling multiple files

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



Joined: 02 Feb 2006
Posts: 33
Location: Pittsburgh, PA, USA

PostPosted: Sat Feb 18, 2006 2:38 pm    Post subject: Problem compiling multiple files Reply with quote

Okay so I have 4 .c source files, 3 of which have headers, and I'm trying to compile them all. It has worked perfectly for a long time now (altogether this code has about 40+ hours of work into it), but all of the sudden, when i make the files not all of them are being recompiled (even though I'm changing them drastically). Is there a compiler flag or something I can change to have it always recompile everything? (I know dev cpp has an option like that)
This is the makefile i use if it helps:
Code:
TARGET = Game
OBJS = main.o CalnGFX.o Font.o BreakIn.o

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

LIBDIR =
LIBS = -lpsprtc
LDFLAGS =

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Break_In

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


Please remember I'm not very good at all with makefiles (I tried just putting the "rm" command in that didnt work :P )
_________________
http://omegagames.netfirms.com -- Support struggling programmers by suffering through their crappy games! (Ok, you don't have to...)
Back to top
View user's profile Send private message Visit poster's website AIM Address
.: Smerity :.



Joined: 04 Feb 2006
Posts: 9

PostPosted: Sat Feb 18, 2006 4:14 pm    Post subject: Reply with quote

If you just want to recompile all your source files every time,

make clean; make kxploit

should do it.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Heretic



Joined: 02 Feb 2006
Posts: 33
Location: Pittsburgh, PA, USA

PostPosted: Sat Feb 18, 2006 5:13 pm    Post subject: Reply with quote

I'm sorry to sound so noobish, (well, actually, I kinda am one...) but how do I include non-psp include files like math.h? I included the file but got an undefined reference... blah... so por favor... gracias. lo siento.
_________________
http://omegagames.netfirms.com -- Support struggling programmers by suffering through their crappy games! (Ok, you don't have to...)
Back to top
View user's profile Send private message Visit poster's website AIM Address
HaQue



Joined: 25 Nov 2005
Posts: 91
Location: Adelaide, Australia

PostPosted: Sat Feb 18, 2006 6:48 pm    Post subject: Reply with quote

have a look in C:\cygwin\usr\local\pspdev\psp\include or full path:

C:\cygwin\usr\local\pspdev\psp\include\math.h

hope that helps...
_________________
www.smartwave-wireless.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sandberg



Joined: 05 Oct 2005
Posts: 90
Location: Denmark

PostPosted: Sat Feb 18, 2006 7:44 pm    Post subject: Reply with quote

Heretic wrote:
I'm sorry to sound so noobish, (well, actually, I kinda am one...) but how do I include non-psp include files like math.h? I included the file but got an undefined reference... blah... so por favor... gracias. lo siento.


If you include math.h and uses funtionality from that, you also need to link with the math library, otherwise you get undefined references. modify your LIBS variable in your makefile as shown below.

LIBS = -lm -lpsprtc
_________________
Br, Sandberg
Back to top
View user's profile Send private message
Heretic



Joined: 02 Feb 2006
Posts: 33
Location: Pittsburgh, PA, USA

PostPosted: Sun Feb 19, 2006 3:42 am    Post subject: Reply with quote

that was my problem... with all the psp libs it slike -lpsp + libname, so i tried -lmath and cygwin told me I was retarded :( Thanks!
_________________
http://omegagames.netfirms.com -- Support struggling programmers by suffering through their crappy games! (Ok, you don't have to...)
Back to top
View user's profile Send private message Visit poster's website AIM Address
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