diff options
Diffstat (limited to 'libpsn00b/libc/makefile')
| -rw-r--r-- | libpsn00b/libc/makefile | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/libpsn00b/libc/makefile b/libpsn00b/libc/makefile index c925b53..f639823 100644 --- a/libpsn00b/libc/makefile +++ b/libpsn00b/libc/makefile @@ -1,24 +1,29 @@ # 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 = ../libc.a +TARGET = libc.a -CFILES = $(notdir $(wildcard ./*.c)) -CXXFILES = $(notdir $(wildcard ./*.cxx)) -AFILES = $(notdir $(wildcard ./*.s)) -OFILES = $(addprefix build/,$(CFILES:.c=.o) $(CXXFILES:.cxx=.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 +CFLAGS = -g -O2 -msoft-float -fno-builtin -fdata-sections \ + -ffunction-sections -Wa,--strip-local-absolute +AFLAGS = -g -msoft-float -Wa,-strip-local-absolute -CC = $(PREFIX)gcc -CXX = $(PREFIX)g++ -AS = $(PREFIX)as -AR = $(PREFIX)ar -RANLIB = $(PREFIX)ranlib +CFILES = $(notdir $(wildcard ./*.c)) +CXXFILES = $(notdir $(wildcard ./*.cxx)) +AFILES = $(notdir $(wildcard ./*.s)) + +OFILES = $(addprefix build/,$(CFILES:.c=.o) $(CXXFILES:.cxx=.o) \ + $(AFILES:.s=.o)) + +ifndef PSN00BSDK_LIBS + +PSN00BSDK_LIBS = .. + +endif all: $(TARGET) @@ -39,5 +44,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) |
