Files
ps5debug-NG/installer/Makefile
T
OpenSourcereR-dev 81b8e07fd9 Add .gitattributes; normalize our sources to LF
Pin LF endings for our C/H/S/Makefile/Markdown/shell/Python files so edits no longer produce spurious whole-file CRLF/LF diffs across machines or editors. Converts the 6 previously-CRLF tracked files to LF (PROTOCOL.md, README.md, debugger/Makefile, debugger/source/proc_remote.c, installer/Makefile, installer/source/main.c). Vendored trees (ps5-payload-sdk, third_party, debugger/third_party) are marked -text and left byte-for-byte unchanged. EOL-only change; no code changes.
2026-06-03 07:55:57 +00:00

43 lines
1.1 KiB
Makefile

# SPDX-License-Identifier: GPL-3.0-only
SDK := ../ps5-payload-sdk/install
ifeq (,$(wildcard $(SDK)/toolchain/prospero.mk))
$(error SDK not built - run ../build.sh from the project root)
endif
include $(SDK)/toolchain/prospero.mk
ELF := build/ps5debug-NG.elf
BUILD_DIR := build
PAYLOAD_ELF := ../debugger/build/debugger.elf
EMBEDDED_BIN := $(BUILD_DIR)/embedded_inner.elf.bin
EMBEDDED_OBJ := $(BUILD_DIR)/embedded_inner.o
EMBEDDED_S := source/embedded_inner.S
CFLAGS := -Wall -O2 -I../common/include -ffunction-sections -fdata-sections
LDFLAGS := -Wl,--gc-sections
LDLIBS := -lSceLibcInternal -lkernel_sys -lSceNet -lSceNetCtl -lSceSysCore
CFILES := $(wildcard ../common/source/*.c) $(wildcard source/*.c)
all: $(ELF)
$(BUILD_DIR):
mkdir -p $(BUILD_DIR)
$(EMBEDDED_BIN): $(PAYLOAD_ELF) | $(BUILD_DIR)
cp $< $@
$(EMBEDDED_OBJ): $(EMBEDDED_S) $(EMBEDDED_BIN) | $(BUILD_DIR)
$(CC) -c -o $@ $(EMBEDDED_S) -I$(BUILD_DIR)
$(ELF): $(CFILES) $(EMBEDDED_OBJ) | $(BUILD_DIR)
$(CC) $(CFLAGS) -o $@ $(CFILES) $(EMBEDDED_OBJ) $(LDFLAGS) $(LDLIBS)
clean:
rm -rf $(BUILD_DIR)
.PHONY: all clean