A simple payload for ejecting disks
| 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 ---------- |
| 11 | MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) |
| 12 | PS4_PAYLOAD_SDK ?= $(MAKEFILE_DIR)../external/ps4-payload-sdk |
| 13 | |
| 14 | # ---------- Include PS4 Toolchain ---------- |
| 15 | include $(PS4_PAYLOAD_SDK)/toolchain/orbis.mk |
| 16 | |
| 17 | # ---------- Output ---------- |
| 18 | ELF_PS4 := disc_eject_ps4.elf |
| 19 | |
| 20 | # ---------- Sources ---------- |
| 21 | SRC := main.c |
| 22 | |
| 23 | # ---------- Compilation flags ---------- |
| 24 | CFLAGS := -Wall -Werror -g -O2 |
| 25 | |
| 26 | # ---------- Target ---------- |
| 27 | .PHONY: all clean |
| 28 | |
| 29 | all: $(ELF_PS4) |
| 30 | |
| 31 | $(ELF_PS4): $(SRC) |
| 32 | $(CC) $(CFLAGS) -o $@ $^ |
| 33 | |
| 34 | clean: |
| 35 | rm -f $(ELF_PS4) |
| 36 |