I know there are still problems in my Makefile but maybe someone can take a look at this...
Code: Select all
TARGET = bor
INCDIR = psp generic sdl
CFLAGS= -O3 -Wall -fstrict-aliasing -ffast-math \
-DINLINE="static inline" -DLOWERCASEFILES \
CFLAGS += $(shell $(PSPBIN)/sdl-config --cflags)
PSPBIN = $(PSPSDK)/../bin
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
USE_PSPSDK_LIBC=1
LIBS = -lm -lpspaudio -lpspgu -lpsppower -lz -lSDLmain
EXTRA_TARGETS = EBOOT.PBP
EXTRA_CLEAN = pspclean
PSP_EBOOT_TITLE = "BOR"
PSP_EBOOT_ICON = data/icon0.png
PSP_EBOOT_PIC1 = data/pic1.png
PSP_EBOOT_SND0 = data/snd0.at3
# Object files
MAINOBJS = adpcm.o anigif.o bitmap.o bor.o draw.o font.o loadimg.o \
packfile.o palette.o savepcx.o screen.o soundmix.o sprite.o \
spriteq.o ssprite.o texture.o psp/mylib.o generic/rand32.o \
psp/timer.o generic/asmcopy.o psp/control.o psp/sblaster.o \
psp/video.o $(RES)
OBJS= $(MAINOBJS)
# Rules to make libraries
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
.PHONY: all all-before all-after clean clean-custom
all: all-before bor.exe all-after
clean: clean-custom
${RM} $(OBJS) $(BIN)
$(BIN): $(LINKOBJ)
$(CC) $(LINKOBJ) -o "bor.exe" $(LIBS) $(LDFLAGS)
.c.o:
$(CC) -c $(CFLAGS) $< -o $@
pspclean:
@rm -rf obj
obj/%.o: src/%.c
$(CC) $(CDEFS) $(CFLAGS) -c $< -o$@
obj/%.a:
$(AR) -r $@ $^
I also find that there are redefinitions of functions in syscall.h that are already included in the pspSDK.
Thank You.