Seregon/BD-EJ

A simple payload for ejecting disks

C/44 B/No license
disc_eject/Makefile.ps4
BD-EJ / disc_eject / Makefile.ps4
1# Copyright (C) 2026
2#
3# PS4 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))))
12PS4_PAYLOAD_SDK ?= $(MAKEFILE_DIR)../external/ps4-payload-sdk
13 
14# ---------- Include PS4 Toolchain ----------
15include $(PS4_PAYLOAD_SDK)/toolchain/orbis.mk
16 
17# ---------- Output ----------
18ELF_PS4 := disc_eject_ps4.elf
19 
20# ---------- Sources ----------
21SRC := main.c
22 
23# ---------- Compilation flags ----------
24CFLAGS := -Wall -Werror -g -O2
25 
26# ---------- Target ----------
27.PHONY: all clean
28 
29all: $(ELF_PS4)
30 
31$(ELF_PS4): $(SRC)
32 $(CC) $(CFLAGS) -o $@ $^
33 
34clean:
35 rm -f $(ELF_PS4)
36