build a PSP file

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

Moderators: cheriff, TyRaNiD

Post Reply
Flammy
Posts: 7
Joined: Fri Sep 30, 2005 8:02 pm

build a PSP file

Post by Flammy »

Hello,
I installed cygwin and pspchain like explained in http://wiki.pspdev.org/psp:programming_faq.Now i would like to build a little test. I tryed this :
I created a cpp file and i pasted it in the "C:\cygwin\home\my_name" directory.
i enterer "$ make test1" and it work! It created test1.exe ... ... an "exe" file on a PSP ?!
ashleydb
Posts: 26
Joined: Mon Oct 03, 2005 2:06 am
Location: USA
Contact:

Post by ashleydb »

Where did the makefile come from?
www.PSP-Files.com - PSP News, Hacks etc.

www.HiAsh.com - My work and stuff
xoclipse
Posts: 5
Joined: Mon Oct 03, 2005 8:08 am
Location: Phoenix, Arizona
Contact:

Post by xoclipse »

PSP's do not take "exe" files. Your makefile is most likely incorrect. Issuing the command 'make' should result in creating EBOOT.PBP, an elf binary, and a PARAM.SFO file. Your makefile should look something like this:
TARGET = app-name
OBJS = src/main.o

USE_PSPSDK_LIBC = 1
INCDIR = include/
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS =
LIBS = -lstdc++

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Eboot title

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
Flammy
Posts: 7
Joined: Fri Sep 30, 2005 8:02 pm

Post by Flammy »

Think u very mutch but where is the makefile plz?
xoclipse
Posts: 5
Joined: Mon Oct 03, 2005 8:08 am
Location: Phoenix, Arizona
Contact:

Post by xoclipse »

The makefile is usually in the directory where your project resides. You must create it for a new project, and use something to similiar to what I posted below. I suggest you read a tutorial on what makefiles do and how to use them properly. You can find one here: http://www.eng.hawaii.edu/Tutor/Make/.

Also, if you want to just build a test, the pspsdk comes with some sample projects. To compile those, just go into the directory of the sample you want to compile and issue the command 'make' or 'make kxploit'. For example, if you are in your cygwin shell...
cd /usr/local/pspdev/psp/sdk/samples/wlan
make kxploit
Flammy
Posts: 7
Joined: Fri Sep 30, 2005 8:02 pm

Post by Flammy »

It's ok i understood thank you!!!
Flammy
Posts: 7
Joined: Fri Sep 30, 2005 8:02 pm

Post by Flammy »

It is an obligation to to create the project in the "C:\cygwin\usr\local\pspdev\psp\sdk" directory?
User avatar
dot_blank
Posts: 498
Joined: Wed Sep 28, 2005 8:47 am
Location: Brasil

Post by dot_blank »

if your running cygwin you can
create a directory holding
your project files anywhere on any drive

just cd to that dir and build as usual
your project/s as you did the pspsdk
samples (make kxploit)....just make sure you
have makefile in order and all
needed includes and data in that
current project directory
10011011 00101010 11010111 10001001 10111010
Post Reply