diff options
Diffstat (limited to 'libpsn00b/psxgpu/makefile')
| -rw-r--r-- | libpsn00b/psxgpu/makefile | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/libpsn00b/psxgpu/makefile b/libpsn00b/psxgpu/makefile index 980e311..2e984d0 100644 --- a/libpsn00b/psxgpu/makefile +++ b/libpsn00b/psxgpu/makefile @@ -1,22 +1,26 @@ # Run using make (Linux) or gmake (BSD) # Part of the PSn00bSDK Project -# 2019 Lameguy64 / Meido-Tek Productions +# 2019 - 2020 Lameguy64 / Meido-Tek Productions -include ../common.mk +include ../../psn00bsdk-setup.mk -TARGET = ../libpsxgpu.a +TARGET = libpsxgpu.a -CFILES = $(notdir $(wildcard ./*.c)) -AFILES = $(notdir $(wildcard ./*.s)) -OFILES = $(addprefix build/,$(CFILES:.c=.o) $(AFILES:.s=.o)) +INCLUDE = -I../include -CFLAGS = -g -O2 -msoft-float -fno-builtin -fdata-sections -ffunction-sections -Wa,--strip-local-absolute -AFLAGS = -g -msoft-float -Wa,--strip-local-absolute +CFILES = $(notdir $(wildcard ./*.c)) +AFILES = $(notdir $(wildcard ./*.s)) +OFILES = $(addprefix build/,$(CFILES:.c=.o) $(AFILES:.s=.o)) -CC = $(PREFIX)gcc -AS = $(PREFIX)as -AR = $(PREFIX)ar -RANLIB = $(PREFIX)ranlib +CFLAGS = -g -O2 -msoft-float -fno-builtin -fdata-sections \ + -ffunction-sections -Wa,--strip-local-absolute +AFLAGS = -g -msoft-float -Wa,--strip-local-absolute + +ifndef PSN00BSDK_LIBS + +PSN00BSDK_LIBS = .. + +endif all: $(TARGET) @@ -32,5 +36,11 @@ build/%.o: %.s @mkdir -p $(dir $@) $(CC) $(AFLAGS) $(INCLUDE) -c $< -o $@ +install: +ifneq ($(PSN00BSDK_LIBS), "..") + @mkdir -p $(PSN00BSDK_LIBS) +endif + cp $(TARGET) $(PSN00BSDK_LIBS)/$(TARGET) + clean: rm -Rf build $(TARGET) |
