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 

Compiling for the ps2?

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



Joined: 10 Mar 2006
Posts: 1

PostPosted: Fri Mar 10, 2006 3:57 am    Post subject: Compiling for the ps2? Reply with quote

Hello everyone, my first post here.
I just got the toolchain on my linux boxxen, and it seems to be working.
I'm pretty new to programming in general though, and have no idea how makefiles work, so I can't decipher how it calls the compiler and what flags it passes. This makes it pretty hard to compile my own code.
I can compile the examples using make but I don't really know how the different processors work together. One sample I tried was cube, I moved the elf to my ps2 and it ran just fine, but the hello sample produces an .erl, how do those work?

So basically, what I'd like to know is:
    How do I compile my code using the ps2sdk?
    How do I use the different processors?

It'd be great to hear from anyone on this!
Back to top
View user's profile Send private message
JorDy



Joined: 11 Dec 2005
Posts: 121

PostPosted: Fri Mar 10, 2006 6:14 am    Post subject: Reply with quote

basicly to answer your first question you need this in your makefile in the same directory as you c files

EE_BIN = callstacktest.elf
EE_OBJS = callstacktest.o
EE_LIBS = -ldebug -lc
EE_LINK = debug/callstacktest
all: $(EE_BIN)

clean:
rm -f *.elf *.o *.a

include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal

the EE_BIN is the name of your elf you want to create
the EE_OBS is the c files names but with an o these are created once you compile
the EE_LIBS are the librarys you need to include for you project
EE_link is not always needed
clean is what file type are removed when you type "make clean"
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 -> PS2 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