A simple payload for ejecting disks
| 1 | # Copyright (C) 2026 |
| 2 | # |
| 3 | # PS5 Disc Eject Payload - Platform-specific Makefile |
| 4 | # |
| 5 | # This file is free software; you can redistribute it and/or modify it |
| 6 | # under the terms of the GNU General Public License as published by |
| 7 | # the Free Software Foundation; either version 3 of the License, or |
| 8 | # (at your option) any later version. |
| 9 | |
| 10 | # ---------- SDK Path ---------- |
| 11 | MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) |
| 12 | PS5_PAYLOAD_SDK ?= $(MAKEFILE_DIR)../external/ps5-payload-sdk |
| 13 | |
| 14 | # ---------- Include PS5 Toolchain ---------- |
| 15 | include $(PS5_PAYLOAD_SDK)/toolchain/prospero.mk |
| 16 | |
| 17 | # ---------- Output ---------- |
| 18 | ELF_PS5 := disc_eject_ps5.elf |
| 19 | |
| 20 | # ---------- Sources ---------- |
| 21 | SRC := main.c |
| 22 | |
| 23 | # ---------- Compilation flags ---------- |
| 24 | CFLAGS := -Wall -Werror -g -O2 |
| 25 | |
| 26 | ifdef MODERN_NOTIFY |
| 27 | CFLAGS += -DUSE_SCE_NOTIFICATION -lSceNotification |
| 28 | endif |
| 29 | |
| 30 | # ---------- Target ---------- |
| 31 | .PHONY: all clean |
| 32 | |
| 33 | all: $(ELF_PS5) |
| 34 | |
| 35 | $(ELF_PS5): $(SRC) |
| 36 | $(CC) $(CFLAGS) -o $@ $^ |
| 37 | |
| 38 | clean: |
| 39 | rm -f $(ELF_PS5) |
| 40 |