Seregon/BD-EJ

A simple payload for ejecting disks

C/44 B/No license
disc_eject/Makefile.ps5
BD-EJ / disc_eject / Makefile.ps5
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 ----------
11MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
12PS5_PAYLOAD_SDK ?= $(MAKEFILE_DIR)../external/ps5-payload-sdk
13 
14# ---------- Include PS5 Toolchain ----------
15include $(PS5_PAYLOAD_SDK)/toolchain/prospero.mk
16 
17# ---------- Output ----------
18ELF_PS5 := disc_eject_ps5.elf
19 
20# ---------- Sources ----------
21SRC := main.c
22 
23# ---------- Compilation flags ----------
24CFLAGS := -Wall -Werror -g -O2
25 
26ifdef MODERN_NOTIFY
27 CFLAGS += -DUSE_SCE_NOTIFICATION -lSceNotification
28endif
29 
30# ---------- Target ----------
31.PHONY: all clean
32 
33all: $(ELF_PS5)
34 
35$(ELF_PS5): $(SRC)
36 $(CC) $(CFLAGS) -o $@ $^
37 
38clean:
39 rm -f $(ELF_PS5)
40