From 9f4891f95070c66ea9f1aba99d72724d4ab24e5a Mon Sep 17 00:00:00 2001 From: "John Wilbert M. Villamor" Date: Sat, 19 Sep 2020 20:43:05 +0800 Subject: Revised makefiles, added strtok(), command line arguments, SetHeapSize(), moved ISR and callback system to psxetc, moved debug font to psxgpu, fixed CD-ROM library crashing on PSIO, fixed interrupt callback setup to fix crashing on ResetGraph() --- libpsn00b/psxspu/makefile | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) (limited to 'libpsn00b/psxspu/makefile') diff --git a/libpsn00b/psxspu/makefile b/libpsn00b/psxspu/makefile index c492ffe..25ec051 100644 --- a/libpsn00b/psxspu/makefile +++ b/libpsn00b/psxspu/makefile @@ -1,18 +1,26 @@ -include ../common.mk +# Run using make (Linux) or gmake (BSD) +# Part of the PSn00bSDK Project +# 2019 - 2020 Lameguy64 / Meido-Tek Productions -TARGET = ../libpsxspu.a +include ../../psn00bsdk-setup.mk -CFILES = $(notdir $(wildcard ./*.c)) -AFILES = $(notdir $(wildcard ./*.s)) -OFILES = $(addprefix build/,$(CFILES:.c=.o) $(AFILES:.s=.o)) +TARGET = libpsxspu.a -CFLAGS = -g -O2 -msoft-float -fdata-sections -ffunction-sections -Wa,--strip-local-absolute -AFLAGS = -g -msoft-float -strip-local-absolute +INCLUDE = -I../include -CC = $(PREFIX)gcc -AS = $(PREFIX)as -AR = $(PREFIX)ar -RANLIB = $(PREFIX)ranlib +CFILES = $(notdir $(wildcard ./*.c)) +AFILES = $(notdir $(wildcard ./*.s)) +OFILES = $(addprefix build/,$(CFILES:.c=.o) $(AFILES:.s=.o)) + +CFLAGS = -g -O2 -msoft-float -fdata-sections -ffunction-sections \ + -Wa,--strip-local-absolute +AFLAGS = -g -msoft-float -strip-local-absolute + +ifndef PSN00BSDK_LIBS + +PSN00BSDK_LIBS = .. + +endif all: $(TARGET) @@ -27,6 +35,12 @@ build/%.o: %.c build/%.o: %.s @mkdir -p $(dir $@) $(AS) $(AFLAGS) $(INCLUDE) $< -o $@ + +install: +ifneq ($(PSN00BSDK_LIBS), "..") + @mkdir -p $(PSN00BSDK_LIBS) +endif + cp $(TARGET) $(PSN00BSDK_LIBS)/$(TARGET) clean: rm -Rf build $(TARGET) -- cgit v1.2.3