aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxetc/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'libpsn00b/psxetc/makefile')
-rw-r--r--libpsn00b/psxetc/makefile26
1 files changed, 18 insertions, 8 deletions
diff --git a/libpsn00b/psxetc/makefile b/libpsn00b/psxetc/makefile
index 399fb91..3f938a6 100644
--- a/libpsn00b/psxetc/makefile
+++ b/libpsn00b/psxetc/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 = ../libpsxetc.a
+TARGET = libpsxetc.a
CFILES = $(notdir $(wildcard ./*.c))
AFILES = $(notdir $(wildcard ./*.s))
OFILES = $(addprefix build/,$(CFILES:.c=.o) $(AFILES:.s=.o))
-CFLAGS = -g -O2 -msoft-float -fno-builtin -nostdlib -fdata-sections -ffunction-sections -Wa,--strip-local-absolute
+CFLAGS = -g -O2 -msoft-float -fno-builtin -nostdlib -fdata-sections \
+ -ffunction-sections -Wa,--strip-local-absolute
AFLAGS = -g -msoft-float -strip-local-absolute
-CC = $(PREFIX)gcc
-AS = $(PREFIX)as
-AR = $(PREFIX)ar
-RANLIB = $(PREFIX)ranlib
+INCLUDE = -I../include
+
+ifndef PSN00BSDK_LIBS
+
+PSN00BSDK_LIBS = ..
+
+endif
all: $(TARGET)
@@ -32,5 +36,11 @@ 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)