Code: Select all
#include <pspkernel.h>
#include <pspdebug.h>
PSP_MODULE_INFO("HelloWorld_cpp",0,1,1);
PSP_MAIN_THREAD_ATTR(THREAD_ATTR_USER);
#define printf pspDebugScreenPrintf
int global = 0;
int main() {
int var1=0;
pspDebugScreenInit();
printf("Hello World\n");
var1 = 1;
var1 = 2;
global = 2;
printf("after vars\n");
return 0;
}
Code: Select all
TARGET = helloworld
OBJS = main.o
CFLAGS = -g -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LIBS = -lm -lpspaudio -lpspgu -lpsppower -lpsprtc -lstdc++
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Hello World
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak