mirror of
https://github.com/Collins3560/Cinebreak.git
synced 2026-10-17 14:00:27 +02:00
Fork of Gezine's MIT-licensed BD-JB5 (BD-J sandbox escape) extended into a full userland -> kernel -> root -> homebrew chain with automation tooling: ps5chain.py (full-chain orchestrator), ps5find.py (LAN discovery), probe payload, and local test harness. All original copyright headers and licenses preserved. Credits: Gezine, TheFlow, ufm42, john-tornblom, hammer-83, kuba-.
76 lines
2.5 KiB
Makefile
76 lines
2.5 KiB
Makefile
# Copyright (C) 2022 John Törnblom
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify it
|
|
# under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful, but
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
# General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; see the file COPYING. If not see
|
|
# <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
DISC_LABEL := BD-JB5-2.0
|
|
|
|
#
|
|
# Host tools
|
|
#
|
|
MAKEFILE_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
BDJSDK_HOME ?= $(MAKEFILE_DIR)/../../
|
|
BDSIGNER := $(BDJSDK_HOME)/host/bin/bdsigner
|
|
MAKEFS := $(BDJSDK_HOME)/host/bin/makefs
|
|
JAVA8_HOME ?= $(BDJSDK_HOME)/host/jdk8
|
|
JAVA11_HOME ?= $(BDJSDK_HOME)/host/jdk11
|
|
JAVAC := $(JAVA8_HOME)/bin/javac
|
|
JAR := $(JAVA8_HOME)/bin/jar
|
|
|
|
export JAVA8_HOME
|
|
export JAVA11_HOME
|
|
|
|
#
|
|
# Compilation artifacts
|
|
#
|
|
CLASSPATH := $(BDJSDK_HOME)/target/lib/enhanced-stubs.zip:$(BDJSDK_HOME)/target/lib/bdjstack.jar:$(BDJSDK_HOME)/target/lib/rt.jar
|
|
SOURCES := $(wildcard src/jdk/internal/misc/*.java) $(wildcard src/org/bdj/*.java) $(wildcard src/org/bdj/api/*.java) $(wildcard src/org/bdj/sandbox/*.java)
|
|
JFLAGS := -Xlint:-options -source 1.4 -target 1.4
|
|
|
|
#
|
|
# Disc files
|
|
#
|
|
TMPL_DIRS := $(shell find $(BDJSDK_HOME)/resources/AVCHD/ -type d)
|
|
TMPL_FILES := $(shell find $(BDJSDK_HOME)/resources/AVCHD/ -type f)
|
|
|
|
DISC_DIRS := $(patsubst $(BDJSDK_HOME)/resources/AVCHD%,discdir%,$(TMPL_DIRS)) \
|
|
discdir/BDMV/JAR
|
|
DISC_FILES := $(patsubst $(BDJSDK_HOME)/resources/AVCHD%,discdir%,$(TMPL_FILES)) \
|
|
discdir/BDMV/JAR/00000.jar
|
|
|
|
|
|
all: $(DISC_LABEL).iso
|
|
|
|
discdir:
|
|
mkdir -p $(DISC_DIRS)
|
|
|
|
discdir/BDMV/JAR/00000.jar: discdir $(SOURCES)
|
|
$(JAVAC) $(JFLAGS) -cp $(CLASSPATH) $(SOURCES)
|
|
$(JAR) cf $@ -C src/ .
|
|
$(BDSIGNER) -keystore $(BDJSDK_HOME)/resources/sig.ks $@
|
|
|
|
discdir/%: discdir
|
|
cp $(BDJSDK_HOME)/resources/AVCHD/$* $@
|
|
|
|
|
|
$(DISC_LABEL).iso: $(DISC_FILES)
|
|
cp -r BDMV/META discdir/BDMV/
|
|
cp -r BDMV/BDJO discdir/BDMV/
|
|
$(JAR) cfM discdir/BDMV/JAR/00001.jar -C 00001 .
|
|
$(MAKEFS) -m 16m -t udf -o T=bdre,v=2.50,L=$(DISC_LABEL) $@ discdir
|
|
|
|
clean:
|
|
rm -rf META-INF $(DISC_LABEL).iso discdir src/jdk/internal/misc/*.class src/org/bdj/*.class src/org/bdj/sandbox/*.class src/org/bdj/api/*.class
|