| View previous topic :: View next topic |
| Author |
Message |
Heretic
Joined: 02 Feb 2006 Posts: 33 Location: Pittsburgh, PA, USA
|
Posted: Sat Feb 18, 2006 2:38 pm Post subject: Problem compiling multiple files |
|
|
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 |
|
 |
.: Smerity :.
Joined: 04 Feb 2006 Posts: 9
|
Posted: Sat Feb 18, 2006 4:14 pm Post subject: |
|
|
If you just want to recompile all your source files every time,
make clean; make kxploit
should do it. |
|
| Back to top |
|
 |
Heretic
Joined: 02 Feb 2006 Posts: 33 Location: Pittsburgh, PA, USA
|
Posted: Sat Feb 18, 2006 5:13 pm Post subject: |
|
|
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 |
|
 |
HaQue
Joined: 25 Nov 2005 Posts: 91 Location: Adelaide, Australia
|
Posted: Sat Feb 18, 2006 6:48 pm Post subject: |
|
|
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 |
|
 |
sandberg
Joined: 05 Oct 2005 Posts: 90 Location: Denmark
|
Posted: Sat Feb 18, 2006 7:44 pm Post subject: |
|
|
| 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 |
|
 |
Heretic
Joined: 02 Feb 2006 Posts: 33 Location: Pittsburgh, PA, USA
|
Posted: Sun Feb 19, 2006 3:42 am Post subject: |
|
|
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 |
|
 |
|