mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-09 17:29:21 -10:00
Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fca7bc52ed | ||
|
|
159190cc14 | ||
|
|
984c3a22a3 | ||
|
|
1e11cbf6b4 | ||
|
|
ecebcf8215 | ||
|
|
8f7646ded8 | ||
|
|
b96fd5933c | ||
|
|
03676061b4 | ||
|
|
777ba7c5c3 | ||
|
|
bfb5f58b90 |
No files matched your search
@@ -1,16 +0,0 @@
|
||||
;;; Directory Local Variables
|
||||
;;; See Info node `(emacs) Directory Variables' for more information.
|
||||
|
||||
(
|
||||
(c-mode . ((standard-indent . 3)
|
||||
(c-basic-offset . 3)
|
||||
(c-file-offsets . ((arglist-intro . ++)
|
||||
(arglist-cont-nonempty . ++)
|
||||
(block-close . 0)
|
||||
(block-open . 0)))
|
||||
(eval . (setq-local c-cleanup-list
|
||||
(cl-set-difference c-cleanup-list
|
||||
'(brace-else-brace
|
||||
brace-elseif-brace))))))
|
||||
(objc-mode . ((c-basic-offset . 3)))
|
||||
)
|
||||
+1
-6
@@ -1,4 +1,4 @@
|
||||
# EditorConfig: https://EditorConfig.org
|
||||
# EditorConfig: http://EditorConfig.org
|
||||
|
||||
# Top-most EditorConfig file
|
||||
root = true
|
||||
@@ -15,11 +15,6 @@ charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 3
|
||||
|
||||
# 2 space indentation
|
||||
[*.{json,xml,yaml,yml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
# Tab indentation
|
||||
[Makefile*]
|
||||
indent_style = tab
|
||||
@@ -0,0 +1,35 @@
|
||||
# First and foremost consider this:
|
||||
- Only RetroArch bugs should be filed here. Not core bugs or game bugs
|
||||
- This is not a forum or a help section, this is strictly developer oriented
|
||||
|
||||
## Description
|
||||
|
||||
[Description of the bug]
|
||||
|
||||
### Expected behavior
|
||||
|
||||
[What you expected to happen]
|
||||
|
||||
### Actual behavior
|
||||
|
||||
[What is actually happening]
|
||||
|
||||
### Steps to reproduce the bug
|
||||
|
||||
1. [First step]
|
||||
2. [Second step]
|
||||
3. [and so on...]
|
||||
|
||||
### Bisect Results
|
||||
|
||||
[Try to bisect and tell us when this started happening]
|
||||
|
||||
### Version/Commit
|
||||
You can find this information under Information/System Information
|
||||
|
||||
- RetroArch: [version/commit]
|
||||
|
||||
### Environment information
|
||||
|
||||
- OS: [The operating system you're running]
|
||||
- Compiler: [In case you are running local builds]
|
||||
@@ -1,100 +0,0 @@
|
||||
name: Bug report
|
||||
description: This is not a forum or a help section, this is strictly developer oriented.
|
||||
body:
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Is there an existing issue for this?
|
||||
description: Only RetroArch bugs should be filed here. Not core bugs or game bugs
|
||||
options:
|
||||
- label: This is a bug in RetroArch frontend
|
||||
required: true
|
||||
- label: I have searched the existing issues
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Description
|
||||
description: Description of the actual behavior of the bug
|
||||
placeholder: What is actually happening
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
description: What you expected to happen
|
||||
|
||||
- type: textarea
|
||||
id: reproduce_steps
|
||||
attributes:
|
||||
label: Steps to reproduce the bug
|
||||
description: List all steps to reproduce the problem
|
||||
placeholder: |
|
||||
1. [First step]
|
||||
2. [Second step]
|
||||
3. [and so on...]
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Version/Commit
|
||||
description: You can find this information under Information/System Information
|
||||
placeholder: 1.20.0 (Git ab3b175)
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: bisecting
|
||||
attributes:
|
||||
label: Bisect Results
|
||||
description: Did this work with any older RetroArch version? Can you point to a version (or even commit) where it broke?
|
||||
placeholder: 43105ab
|
||||
|
||||
- type: dropdown
|
||||
id: nigthly
|
||||
attributes:
|
||||
label: Present in the nightly version
|
||||
description: Is the issue reproducible with current [nightly builds](https://buildbot.libretro.com/nightly/)?
|
||||
options:
|
||||
- I don't know
|
||||
- Yes, this is reproduced in the nightly build
|
||||
- No, looks like this is already resolved
|
||||
default: 0
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: platform
|
||||
attributes:
|
||||
label: Platform & operating system
|
||||
description: The system you're running RetroArch on
|
||||
placeholder: Linux aarch64, Windows 11 23H2, Android 14, PS Vita
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: cores
|
||||
attributes:
|
||||
label: Affected Cores
|
||||
description: List the affected cores and their versions here, if applicable. If the issue **only occurs with a single core** then the bug may not be with RetroArch; in that case, you should report it in that core's repository instead of here.
|
||||
placeholder: bsnes (115), FCEUmm ((SVN) aebea87), Snes9x (1.63.229933ea)
|
||||
|
||||
- type: textarea
|
||||
id: environment
|
||||
attributes:
|
||||
label: Environment information
|
||||
description: Additional information about hardware and software
|
||||
placeholder: |
|
||||
* Window Manager: dwm/X11
|
||||
* Affected video drivers: sdl2, glcore
|
||||
* Installed through Flatpak
|
||||
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant log output
|
||||
description: Paste [RetroArch log](https://docs.libretro.com/guides/generating-retroarch-logs/) and/or [GDB backtrace](https://docs.libretro.com/development/retroarch/debugging/). This will be automatically formatted into code, so no need for backticks.
|
||||
render: shell
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
title: "[Feature Request] <FEATURE NAME>"
|
||||
about: Is there something you'd like to see in RetroArch?
|
||||
labels: feature request
|
||||
---
|
||||
@@ -1,14 +0,0 @@
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Libretro Forums
|
||||
url: https://forums.libretro.com
|
||||
about: A place to discuss all things libretro
|
||||
- name: Discord
|
||||
url: https://ra-link.web.app/discord
|
||||
about: Join our Discord server for help
|
||||
- name: RetroArch/libretro subreddit
|
||||
url: https://www.reddit.com/r/RetroArch
|
||||
about: Subreddit dedicated to RetroArch and the libretro API framework
|
||||
- name: Documentation
|
||||
url: https://docs.libretro.com
|
||||
about: Official RetroArch documentation for users and developers
|
||||
@@ -3,7 +3,6 @@
|
||||
1. Rebase before opening a pull request
|
||||
2. If you are sending several unrelated fixes or features, use a branch and a separate pull request for each
|
||||
3. If possible try squashing everything in a single commit. This is particularly beneficial in the case of feature merges since it allows easy bisecting when a problem arises
|
||||
4. RetroArch codebase follows C89 coding rules for portability across many old platforms check using `C89_BUILD=1`
|
||||
|
||||
## Description
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
@@ -1,36 +0,0 @@
|
||||
name: CI 3DS
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-devkitpro:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: taiki-e/checkout-action@v1
|
||||
|
||||
- name: Compile Salamander
|
||||
run: |
|
||||
make -f Makefile.ctr.salamander -j$(getconf _NPROCESSORS_ONLN) USE_CTRULIB_2=1 clean
|
||||
make -f Makefile.ctr.salamander -j$(getconf _NPROCESSORS_ONLN) USE_CTRULIB_2=1
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.ctr -j$(getconf _NPROCESSORS_ONLN) USE_CTRULIB_2=1 clean
|
||||
make -f Makefile.ctr -j$(getconf _NPROCESSORS_ONLN) USE_CTRULIB_2=1 HAVE_STATIC_DUMMY=1 info all
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
@@ -1,44 +0,0 @@
|
||||
name: CI Android
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up JDK 25
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '25'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
cd pkg/android/phoenix
|
||||
./gradlew assembleDebug
|
||||
find . -iname "*.apk" -exec ls -l "{}" \;
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: retroarch-android-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
pkg/android/phoenix/build/outputs/apk/normal/debug/phoenix-normal-debug.apk
|
||||
pkg/android/phoenix/build/outputs/apk/aarch64/debug/phoenix-aarch64-debug.apk
|
||||
@@ -1,145 +0,0 @@
|
||||
name: CI Apple
|
||||
|
||||
# Umbrella workflow for Apple-specific checks that are not a plain
|
||||
# "does it build" - the full builds live in MacOS.yml and iOS.yml.
|
||||
#
|
||||
# Add new jobs here rather than as new top-level workflows: things like
|
||||
# build-graph integrity checks, xcconfig assertions, extra Apple
|
||||
# targets, and anything else that is Apple-shaped but does not warrant
|
||||
# its own entry in the Actions sidebar. Each job carries its own
|
||||
# rationale in a comment above it.
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
# ------------------------------------------------------------------
|
||||
# Build-graph guard: the Bonjour/mDNS netplay discovery path.
|
||||
#
|
||||
# network/netplay/netplay_nsnetservice.m is a member of no target.
|
||||
# It reaches the compiler only through griffin/griffin_objc.m, behind
|
||||
#
|
||||
# #if defined(HAVE_NETWORKING) && defined(HAVE_NETPLAYDISCOVERY) \
|
||||
# && defined(HAVE_NETPLAYDISCOVERY_NSNET)
|
||||
#
|
||||
# and those macros arrive from pkg/apple/BaseConfig.xcconfig by way
|
||||
# of an $(inherited) chain: the CI builds pass
|
||||
# -xcconfig GitHubCI.xcconfig on the command line, which includes
|
||||
# Metal.xcconfig, whose OTHER_CFLAGS[sdk=macosx*] assignment relies
|
||||
# on $(inherited) to pull the project-level BaseConfig settings back
|
||||
# in. Metal.xcconfig defines none of the three macros itself.
|
||||
#
|
||||
# Every link in that chain can be broken without breaking the build.
|
||||
# Drop the file from griffin's include list, drop griffin_objc.m from
|
||||
# a Sources phase, drop $(inherited) from Metal.xcconfig, or move the
|
||||
# -D out of BaseConfig, and the file simply stops being compiled - CI
|
||||
# stays green while an entire Apple-only source file goes unbuilt.
|
||||
# That is not hypothetical: the file parses a remote peer's mDNS TXT
|
||||
# records into fixed-size buffers, so it is exactly the sort of thing
|
||||
# that should not be able to rot unnoticed.
|
||||
#
|
||||
# This asserts the preconditions rather than duplicating the build.
|
||||
# The existing "CI macOS" and "CI iOS (13)" jobs already compile the
|
||||
# file; what they cannot tell you is whether they still are.
|
||||
# ------------------------------------------------------------------
|
||||
netplay-discovery-guard:
|
||||
name: Build graph - netplay mDNS discovery
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
# Source-level checks. These need no toolchain and give a precise
|
||||
# message when the wiring, rather than the code, is what broke.
|
||||
- name: griffin still imports the file
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if ! grep -q 'netplay_nsnetservice\.m' griffin/griffin_objc.m; then
|
||||
echo "::error file=griffin/griffin_objc.m::netplay_nsnetservice.m is no longer imported; it is a member of no target, so nothing else compiles it"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: griffin_objc.m is still in both Sources build phases
|
||||
run: |
|
||||
set -euo pipefail
|
||||
rc=0
|
||||
for proj in RetroArch_Metal RetroArch_iOS13; do
|
||||
pbx="pkg/apple/$proj.xcodeproj/project.pbxproj"
|
||||
n=$(awk '/Begin PBXSourcesBuildPhase/,/End PBXSourcesBuildPhase/' "$pbx" \
|
||||
| grep -c 'griffin_objc\.m in Sources' || true)
|
||||
echo "$proj: griffin_objc.m appears in Sources x$n"
|
||||
if [ "$n" -eq 0 ]; then
|
||||
echo "::error file=$pbx::griffin_objc.m is not in any Sources build phase"
|
||||
rc=1
|
||||
fi
|
||||
done
|
||||
exit $rc
|
||||
|
||||
- name: The three guard macros survive the xcconfig chain
|
||||
run: |
|
||||
set -euo pipefail
|
||||
rc=0
|
||||
|
||||
check() {
|
||||
# $1 = human label, remaining args = xcodebuild selector
|
||||
label="$1"; shift
|
||||
echo "--- $label ---"
|
||||
settings=$(xcodebuild -showBuildSettings "$@" \
|
||||
-xcconfig pkg/apple/GitHubCI.xcconfig 2>/dev/null \
|
||||
| grep -E '^\s*OTHER_CFLAGS =' || true)
|
||||
if [ -z "$settings" ]; then
|
||||
echo "::error::could not resolve OTHER_CFLAGS for $label"
|
||||
rc=1
|
||||
return
|
||||
fi
|
||||
echo "$settings" | tr ' ' '\n' | grep -E '^-DHAVE_NETPLAY|^-DHAVE_NETWORKING' || true
|
||||
for macro in HAVE_NETWORKING HAVE_NETPLAYDISCOVERY HAVE_NETPLAYDISCOVERY_NSNET; do
|
||||
if ! echo "$settings" | grep -qE -- "-D$macro([[:space:]]|=|$)"; then
|
||||
echo "::error::$label does not define $macro - netplay_nsnetservice.m is NOT being compiled"
|
||||
rc=1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
check "macOS (scheme RetroArch)" \
|
||||
-workspace pkg/apple/RetroArch.xcworkspace \
|
||||
-scheme RetroArch -config Release
|
||||
|
||||
check "iOS (scheme RetroArch iOS Release)" \
|
||||
-workspace pkg/apple/RetroArch.xcworkspace \
|
||||
-destination generic/platform=iOS \
|
||||
-scheme "RetroArch iOS Release" -config Release
|
||||
|
||||
exit $rc
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# tvOS. The one Apple target with no build job of its own, so a break
|
||||
# in code it shares with iOS - netplay_nsnetservice.m included - ships
|
||||
# unnoticed there. Not gating: unrelated problems in the tvOS scheme
|
||||
# should not hold up the tree.
|
||||
# ------------------------------------------------------------------
|
||||
tvos:
|
||||
name: tvOS build (non-gating)
|
||||
runs-on: macos-latest
|
||||
continue-on-error: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Compile RA (tvOS)
|
||||
run: |
|
||||
set -o pipefail
|
||||
xcodebuild -workspace pkg/apple/RetroArch.xcworkspace \
|
||||
-destination generic/platform=tvOS -config Release \
|
||||
-scheme "RetroArch tvOS Release" \
|
||||
-xcconfig pkg/apple/GitHubCI.xcconfig \
|
||||
CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO \
|
||||
CODE_SIGN_IDENTITY="" PROVISIONING_PROFILE_SPECIFIER="" \
|
||||
-derivedDataPath build
|
||||
@@ -1,25 +0,0 @@
|
||||
name: CI Compile Matrix [Codec Combinations]
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
compile-matrix: # every codec combination real builds select, not just this one
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y build-essential
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Compile matrix
|
||||
run: ./.github/workflows/scripts/compile-matrix.sh
|
||||
@@ -1,38 +0,0 @@
|
||||
name: CI DOS/DJGPP
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-djgpp-build-container:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.dos -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.dos -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1 info all
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: RA-DOS-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retrodos.exe
|
||||
@@ -1,33 +0,0 @@
|
||||
name: CI Emscripten
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-emscripten:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: taiki-e/checkout-action@v1
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
emmake make -f Makefile.emscripten -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
emmake make -f Makefile.emscripten -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
name: CI GameCube
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-devkitpro:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: taiki-e/checkout-action@v1
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.ngc -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.ngc -j$(getconf _NPROCESSORS_ONLN) EXTERNAL_LIBOGC=1 GX_PTHREAD_LEGACY=0 HAVE_STATIC_DUMMY=1 info all
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
name: CI Linux Headless [No Menu] (i686)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
linux-nomenu: # Smoketest build with no menu support compiled in
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install build-essential libxkbcommon-dev libx11-xcb-dev zlib1g-dev libfreetype6-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev nvidia-cg-toolkit nvidia-cg-dev libavcodec-dev libsdl2-dev libsdl-image1.2-dev libxml2-dev yasm
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Configure
|
||||
run: ./configure --disable-menu
|
||||
- name: Build
|
||||
run: make
|
||||
@@ -1,374 +0,0 @@
|
||||
name: CI Linux ASan + UBSan [No Menu]
|
||||
|
||||
# Builds full RetroArch with -fsanitize=address,undefined and runs
|
||||
# headless smoke invocations. Three coverage tiers, in increasing
|
||||
# order of how much of the binary they actually instrument:
|
||||
#
|
||||
# 1. --help and --features. Exit(0) directly after printing.
|
||||
# Coverage scope: libc init, main(), frontend driver bootstrap,
|
||||
# argv duplication, the getopt walk, and the print functions.
|
||||
# Strict ASan + UBSan -- baseline confirmed clean (run #1).
|
||||
#
|
||||
# 2. Headless imageviewer core under Xvfb + sdl2 video driver +
|
||||
# null audio driver, --max-frames=300 for a clean shutdown
|
||||
# through the normal runloop teardown. Exercises core loading
|
||||
# via dlopen, the imageviewer's stb_image-driven loader, the
|
||||
# SDL2 + X11 + MIT-SHM rendering pipeline, the runloop, and
|
||||
# cleanup-on-shutdown. Soft-fail (continue-on-error) on this
|
||||
# first iteration: lots can go wrong (libGL leaks, driver
|
||||
# init noise) that aren't RetroArch bugs but would fail the
|
||||
# run if treated strictly. Sanitizer findings are still
|
||||
# surfaced in step output for triage.
|
||||
#
|
||||
# The per-sample tests under .github/workflows/Linux-samples-gfx.yml,
|
||||
# Linux-samples-tasks.yml, and Linux-libretro-{db,common}-samples.yml
|
||||
# regression-test specific predicates that previously had bugs. This
|
||||
# job is complementary -- it covers everything those harnesses can't
|
||||
# reach because the code only runs from main(), and catches future
|
||||
# heap-corruption / UB regressions across the whole code base for
|
||||
# free as a side effect of any change that can be exercised by a
|
||||
# headless run.
|
||||
#
|
||||
# Build configuration matches Linux-Headless.yml (--disable-menu) with
|
||||
# additional --disable-discord --disable-cheevos --disable-networking
|
||||
# to shrink the third-party surface on this first iteration. Each can
|
||||
# be re-enabled once the baseline is green.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
asan-ubsan:
|
||||
name: Build with ASan+UBSan and run headless smoke
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 25
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
# Mirrors Linux-Headless.yml's apt set so the build matches a
|
||||
# known-good headless configuration. Adds:
|
||||
# xvfb / x11-utils -- virtual X server for the imageviewer
|
||||
# smoke step + xdpyinfo for diagnostics
|
||||
# libsdl2-dev (already in the base set) provides the SDL2
|
||||
# video driver used by that smoke -- see the smoke step's
|
||||
# comment for why SDL2 over xvideo. No sanitizer-specific
|
||||
# packages required; libasan / libubsan ship with the gcc
|
||||
# that ubuntu-latest has installed by default.
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
libxkbcommon-dev libx11-xcb-dev \
|
||||
xvfb x11-utils \
|
||||
zlib1g-dev libfreetype6-dev \
|
||||
libegl1-mesa-dev libgles2-mesa-dev libgbm-dev \
|
||||
nvidia-cg-toolkit nvidia-cg-dev \
|
||||
libavcodec-dev libsdl2-dev libsdl-image1.2-dev \
|
||||
libxml2-dev yasm
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Configure (no menu, no discord/cheevos/networking, sdl2 on)
|
||||
# Trim the build surface for the first iteration so any
|
||||
# sanitizer hit is a RetroArch-internal bug rather than noise
|
||||
# from a vendored third-party subsystem. The disabled
|
||||
# subsystems will be re-enabled in follow-up patches as the
|
||||
# baseline stays green. --enable-sdl2 is explicit because
|
||||
# the imageviewer smoke step below selects sdl2 as the video
|
||||
# driver; if its build deps were ever missing, a silent fall-
|
||||
# back to a different driver would skew the smoke's coverage
|
||||
# without warning.
|
||||
run: |
|
||||
./configure \
|
||||
--disable-menu \
|
||||
--disable-discord \
|
||||
--disable-cheevos \
|
||||
--disable-networking \
|
||||
--enable-sdl2
|
||||
|
||||
- name: Build with -fsanitize=address,undefined
|
||||
# The top-level Makefile (line 153) propagates SANITIZER into
|
||||
# CFLAGS / CXXFLAGS / LDFLAGS for every translation unit and
|
||||
# the final link. ASan defaults to abort-on-heap-corruption;
|
||||
# UBSan recovery is controlled at runtime via UBSAN_OPTIONS
|
||||
# (see the smoke-run steps below).
|
||||
run: |
|
||||
make -j$(getconf _NPROCESSORS_ONLN) \
|
||||
SANITIZER=address,undefined
|
||||
test -x retroarch
|
||||
file retroarch
|
||||
|
||||
- name: Smoke run --help (ASan + UBSan strict)
|
||||
# `--help` exits cleanly via exit(0) after printing the usage
|
||||
# banner. Coverage scope: libc init, main(), frontend
|
||||
# driver bootstrap, argv duplication, the getopt walk over
|
||||
# the full option table, and retroarch_print_help() itself.
|
||||
# Doesn't reach into core loading / video init / cleanup-on-
|
||||
# shutdown; the imageviewer smoke step below covers those.
|
||||
# ASan and UBSan both run in halt-on-error mode: the first
|
||||
# run of this workflow (Apr 28 2026, run #1) reported zero
|
||||
# distinct UBSan diagnostics across both --help and
|
||||
# --features, so the baseline for these two surfaces is
|
||||
# clean and we enforce it. If a future change introduces
|
||||
# signed-overflow / alignment / shift-too-large UB along
|
||||
# the option-parsing or print paths, this step will fail
|
||||
# and the diagnostic line will be in the captured stderr.
|
||||
env:
|
||||
ASAN_OPTIONS: abort_on_error=1:detect_leaks=0:print_stacktrace=1:strict_string_checks=1
|
||||
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
|
||||
# Avoid noise from libGL / Mesa / Wayland symbol-resolution
|
||||
# leaks at process shutdown; those are not RetroArch bugs.
|
||||
LSAN_OPTIONS: exitcode=0
|
||||
run: |
|
||||
set -eu
|
||||
timeout 30 ./retroarch --help > /tmp/help.out 2> /tmp/help.err || rc=$?
|
||||
echo "exit=${rc:-0}"
|
||||
echo "=== stdout (head) ==="
|
||||
head -40 /tmp/help.out
|
||||
echo "=== stderr ==="
|
||||
cat /tmp/help.err
|
||||
# ASan abort_on_error sends the process to exit code 1 + a
|
||||
# SUMMARY: line on stderr. Treat any "AddressSanitizer:"
|
||||
# or UBSan "runtime error:" marker as fatal regardless of
|
||||
# exit code -- belt-and-suspenders to the runtime options
|
||||
# in case a future sanitizer release changes its default
|
||||
# exit semantics.
|
||||
if grep -q "AddressSanitizer:" /tmp/help.err; then
|
||||
echo "[FAIL] AddressSanitizer reported a finding"
|
||||
exit 1
|
||||
fi
|
||||
if grep -q "runtime error:" /tmp/help.err; then
|
||||
echo "[FAIL] UBSan reported a finding"
|
||||
exit 1
|
||||
fi
|
||||
echo "[pass] retroarch --help under ASan+UBSan"
|
||||
|
||||
- name: Smoke run --features (ASan + UBSan strict)
|
||||
# `--features` exits cleanly via exit(0) after printing the
|
||||
# compile-time feature list. Coverage scope is the same as
|
||||
# --help (libc init / main / frontend bootstrap / arg parse)
|
||||
# plus retroarch_print_features(), which walks the static
|
||||
# video / audio / input / camera / location / record / cheats
|
||||
# / network / database / overlay / hid feature tables. Each
|
||||
# such walk reads pointers into a static-string table -- low
|
||||
# corruption surface but a useful sanity check that the link-
|
||||
# time feature flags resolve consistently. Doesn't reach
|
||||
# core loading or cleanup-on-shutdown. Like the --help step
|
||||
# this enforces UBSan strict because the baseline is clean.
|
||||
env:
|
||||
ASAN_OPTIONS: abort_on_error=1:detect_leaks=0:print_stacktrace=1:strict_string_checks=1
|
||||
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1
|
||||
LSAN_OPTIONS: exitcode=0
|
||||
run: |
|
||||
set -eu
|
||||
timeout 30 ./retroarch --features > /tmp/features.out 2> /tmp/features.err || rc=$?
|
||||
echo "exit=${rc:-0}"
|
||||
echo "=== stdout (head) ==="
|
||||
head -40 /tmp/features.out
|
||||
echo "=== stderr ==="
|
||||
cat /tmp/features.err
|
||||
if grep -q "AddressSanitizer:" /tmp/features.err; then
|
||||
echo "[FAIL] AddressSanitizer reported a finding"
|
||||
exit 1
|
||||
fi
|
||||
if grep -q "runtime error:" /tmp/features.err; then
|
||||
echo "[FAIL] UBSan reported a finding"
|
||||
exit 1
|
||||
fi
|
||||
echo "[pass] retroarch --features under ASan+UBSan"
|
||||
|
||||
- name: Build imageviewer core under ASan + UBSan
|
||||
# The standalone Makefile under cores/libretro-imageviewer/
|
||||
# honours the same SANITIZER= knob as the top-level Makefile
|
||||
# (added in the v9 Makefile cleanup, efae310). Building the
|
||||
# core with sanitizers enabled means the stb_image-driven
|
||||
# decode path is fully instrumented when RetroArch dlopens
|
||||
# it -- ASan would otherwise only catch heap corruption via
|
||||
# the global allocator interceptor and would miss stack-
|
||||
# buffer-overflow / use-after-return inside stb_image
|
||||
# itself. Same SANITIZER= value as the main build.
|
||||
run: |
|
||||
set -eu
|
||||
cd cores/libretro-imageviewer
|
||||
make clean
|
||||
make SANITIZER=address,undefined
|
||||
test -x image_core.so
|
||||
file image_core.so
|
||||
|
||||
- name: Generate test PNG for imageviewer
|
||||
# Tiny 8x8 solid-red PNG, 75 bytes. Hand-rolled via Python
|
||||
# struct + zlib to avoid an apt dependency on imagemagick or
|
||||
# similar. Python ships on every ubuntu-latest by default.
|
||||
# Saved under /tmp because the workspace lives on a path
|
||||
# GitHub Actions cleans up post-run anyway.
|
||||
run: |
|
||||
set -eu
|
||||
python3 - <<'PY'
|
||||
import struct, zlib
|
||||
def chunk(name, data):
|
||||
crc = zlib.crc32(name + data)
|
||||
return struct.pack('>I', len(data)) + name + data + \
|
||||
struct.pack('>I', crc)
|
||||
sig = b'\x89PNG\r\n\x1a\n'
|
||||
ihdr = chunk(b'IHDR',
|
||||
struct.pack('>IIBBBBB', 8, 8, 8, 2, 0, 0, 0))
|
||||
raw = b''
|
||||
for _ in range(8):
|
||||
raw += b'\x00' + b'\xff\x00\x00' * 8
|
||||
idat = chunk(b'IDAT', zlib.compress(raw))
|
||||
iend = chunk(b'IEND', b'')
|
||||
with open('/tmp/test.png', 'wb') as f:
|
||||
f.write(sig + ihdr + idat + iend)
|
||||
PY
|
||||
file /tmp/test.png
|
||||
|
||||
- name: Smoke run imageviewer headless under Xvfb (soft-fail)
|
||||
# Loads cores/libretro-imageviewer/image_core.so against a
|
||||
# tiny PNG, runs --max-frames=300 (~5s nominal at 60fps,
|
||||
# ~15-25s under sanitizer overhead), then exits via the
|
||||
# normal runloop teardown path. Covers what the --help and
|
||||
# --features smokes can't: dlopen of a libretro core,
|
||||
# retro_load_game, the stb_image decode path, the SDL2 +
|
||||
# X11 + MIT-SHM rendering pipeline, the runloop, and full
|
||||
# cleanup-on-shutdown.
|
||||
#
|
||||
# Why sdl2 specifically: the v10 first attempt selected
|
||||
# xvideo (smaller, more self-contained, real YUV color
|
||||
# tables). Run #1 of that workflow tripped on Xvfb
|
||||
# exposing the XVideo extension but providing zero
|
||||
# adaptors:
|
||||
#
|
||||
# [XVideo] XvQueryAdaptors() found 0 adaptors.
|
||||
# [Video] Cannot open video driver. Exiting...
|
||||
#
|
||||
# That's correct defensive code in the xvideo driver, not
|
||||
# a bug -- but it means xvideo can't be exercised on Xvfb
|
||||
# without real video hardware, which the runner doesn't
|
||||
# have. SDL2 over X11 / MIT-SHM works on Xvfb out of the
|
||||
# box (verified via a standalone SDL_CreateRenderer probe
|
||||
# before this patch landed). Coverage tradeoff: we lose
|
||||
# xvideo's YUV color-conversion path but keep all the
|
||||
# high-leverage surface (dlopen, core lifecycle, stb_image,
|
||||
# runloop, video driver init, full cleanup).
|
||||
#
|
||||
# Soft-fail (continue-on-error: true) on this iteration.
|
||||
# Reasoning: lots can go wrong here that aren't RetroArch
|
||||
# bugs -- libGL / Mesa software-rasterizer leaks at
|
||||
# shutdown, X11 driver init noise -- and forcing strict
|
||||
# cleanliness before measuring the baseline would block
|
||||
# merges on noise. Sanitizer findings ARE still surfaced
|
||||
# in the step output for triage; they just don't fail
|
||||
# the job. Once the baseline is characterised, this step
|
||||
# can be flipped to strict the same way the --help step
|
||||
# was in v8.
|
||||
#
|
||||
# Audio driver is "null" (no PulseAudio / ALSA dependency
|
||||
# on the runner). Verbose output is on so the run captures
|
||||
# the full log for triage.
|
||||
continue-on-error: true
|
||||
env:
|
||||
# detect_leaks=0 because libGL / Mesa symbol-resolution
|
||||
# plus X11 connection caches produce non-trivial leaks at
|
||||
# process shutdown that aren't RetroArch bugs. Can be
|
||||
# flipped on later with a suppression file. Heap
|
||||
# corruption / UAF / double-free still abort under
|
||||
# abort_on_error=1.
|
||||
ASAN_OPTIONS: abort_on_error=1:detect_leaks=0:print_stacktrace=1:strict_string_checks=1
|
||||
# halt_on_error=0 so a single signed-overflow somewhere
|
||||
# in the runloop doesn't truncate the stderr log before
|
||||
# we see the full picture. The grep below still
|
||||
# surfaces every "runtime error:" line for triage.
|
||||
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=0
|
||||
LSAN_OPTIONS: exitcode=0
|
||||
run: |
|
||||
set -eu
|
||||
|
||||
# Start Xvfb on display :99. -screen geometry is small
|
||||
# because the imageviewer doesn't care about resolution
|
||||
# and we're trying to minimise X server memory. SDL2's
|
||||
# X11 backend uses MIT-SHM (which Xvfb provides by
|
||||
# default) for image transfer.
|
||||
Xvfb :99 -screen 0 320x240x24 -nolisten tcp &
|
||||
XVFB_PID=$!
|
||||
# Ensure cleanup on any exit (including soft-fail ones).
|
||||
trap "kill $XVFB_PID 2>/dev/null || true" EXIT
|
||||
# Give Xvfb time to come up; xdpyinfo confirms MIT-SHM is
|
||||
# available before we waste cycles trying to use it.
|
||||
# Extension names in xdpyinfo output are indented with
|
||||
# leading whitespace, hence ^[[:space:]]+.
|
||||
for i in 1 2 3 4 5; do
|
||||
if DISPLAY=:99 xdpyinfo -queryExtensions 2>/dev/null \
|
||||
| grep -qE "^[[:space:]]+MIT-SHM\b"; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
DISPLAY=:99 xdpyinfo -queryExtensions \
|
||||
| grep -E "^[[:space:]]+MIT-SHM\b" || true
|
||||
|
||||
# Minimal config: sdl2 video, null audio. Everything
|
||||
# else takes built-in defaults.
|
||||
mkdir -p /tmp/asan-cfg
|
||||
cat > /tmp/asan-cfg/retroarch.cfg <<EOF
|
||||
video_driver = "sdl2"
|
||||
audio_driver = "null"
|
||||
video_threaded = "false"
|
||||
video_fullscreen = "false"
|
||||
video_windowed_fullscreen = "false"
|
||||
EOF
|
||||
|
||||
# Run. --max-frames triggers a clean shutdown via the
|
||||
# normal runloop teardown after N frames, which is what
|
||||
# we want for cleanup-path coverage. Wall-clock timeout
|
||||
# is a safety net at 60s; --max-frames at 300 should
|
||||
# finish in well under that even with sanitizer overhead.
|
||||
set +e
|
||||
DISPLAY=:99 timeout 60 ./retroarch \
|
||||
-c /tmp/asan-cfg/retroarch.cfg \
|
||||
-L cores/libretro-imageviewer/image_core.so \
|
||||
/tmp/test.png \
|
||||
--max-frames=300 \
|
||||
--verbose \
|
||||
> /tmp/imageviewer.out 2> /tmp/imageviewer.err
|
||||
rc=$?
|
||||
set -e
|
||||
|
||||
echo "exit=${rc}"
|
||||
echo "=== stdout (last 80) ==="
|
||||
tail -80 /tmp/imageviewer.out || true
|
||||
echo "=== stderr (last 200) ==="
|
||||
tail -200 /tmp/imageviewer.err || true
|
||||
|
||||
# Surface sanitizer findings explicitly (informational --
|
||||
# we do NOT exit 1 because this step is soft-fail). Once
|
||||
# the baseline is characterised, this section will gate
|
||||
# on findings the same way the --help / --features steps
|
||||
# do.
|
||||
if grep -q "AddressSanitizer:" /tmp/imageviewer.err; then
|
||||
echo ""
|
||||
echo "[INFO] AddressSanitizer reported finding(s):"
|
||||
grep -A 2 "AddressSanitizer:" /tmp/imageviewer.err \
|
||||
| head -40
|
||||
fi
|
||||
ub_count=$(grep -c "runtime error:" /tmp/imageviewer.err \
|
||||
2>/dev/null || true)
|
||||
if [ "${ub_count:-0}" != "0" ]; then
|
||||
echo ""
|
||||
echo "[INFO] UBSan reported ${ub_count} runtime error(s):"
|
||||
grep -h "runtime error:" /tmp/imageviewer.err \
|
||||
| sort -u | head -20
|
||||
fi
|
||||
echo "[done] imageviewer headless smoke (soft-fail)"
|
||||
@@ -1,52 +0,0 @@
|
||||
name: CI Linux autoconfig regression
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
autoconf-tests:
|
||||
name: Build and run the autoconfig regression suite
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y build-essential zlib1g-dev libfreetype6-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Configure (headless, test drivers)
|
||||
run: |
|
||||
set -eu
|
||||
# The suite drives the test input/joypad drivers with the
|
||||
# null video/audio/menu drivers - no X11/Vulkan/menu needed.
|
||||
# HAVE_TEST_DRIVERS is on by default; assert it survived
|
||||
# configure so a silent drop turns into a clear failure
|
||||
# rather than a skipped test.
|
||||
./configure --disable-menu --disable-ffmpeg --disable-x11 --disable-wayland
|
||||
grep -q '^HAVE_TEST_DRIVERS = 1' config.mk
|
||||
|
||||
- name: Build
|
||||
run: make -j"$(nproc)"
|
||||
|
||||
- name: Run autoconfig regression suite
|
||||
shell: bash
|
||||
run: |
|
||||
set -eu
|
||||
test -x ./retroarch
|
||||
./tests-other/test_autoconf.sh ./retroarch
|
||||
@@ -1,673 +0,0 @@
|
||||
name: CI Linux libretro-common samples
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
samples:
|
||||
name: Build and run libretro-common/samples
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y build-essential zlib1g-dev clang
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build and run samples
|
||||
shell: bash
|
||||
working-directory: libretro-common/samples
|
||||
env:
|
||||
# Build samples under AddressSanitizer + UndefinedBehaviorSanitizer.
|
||||
# Most overflow tests under libretro-common/samples (rpng_chunk_
|
||||
# overflow_test, rbmp_test, vfs_read_overflow_test, cdrom_cuesheet
|
||||
# _overflow_test, cdfs_dir_record_test, chd_meta_overflow_test, ...)
|
||||
# use ASan as the regression discriminator for the bound-check
|
||||
# they verify, so make ASan the default for this workflow. Each
|
||||
# test's Makefile honours SANITIZER= via the conventional opt-in
|
||||
# block (matching samples/tasks/http/Makefile). Test sources
|
||||
# that don't have the opt-in block treat the variable as
|
||||
# ignored.
|
||||
MAKE_ARGS: "SANITIZER=address,undefined"
|
||||
run: |
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
# Samples whose binary, when invoked with no arguments, runs a
|
||||
# self-contained test and exits 0 on success / non-zero on
|
||||
# failure. These are built AND executed.
|
||||
declare -a RUN_TARGETS=(
|
||||
compat_fnmatch_test
|
||||
snprintf
|
||||
unbase64_test
|
||||
crc32_test
|
||||
archive_zip_test
|
||||
archive_zstd_test
|
||||
config_file_test
|
||||
path_resolve_realpath_test
|
||||
fill_pathname_test
|
||||
nbio_test
|
||||
rpng
|
||||
rzip_chunk_size_test
|
||||
rzip_matches_buf_test
|
||||
data_transfer_source_test
|
||||
data_transfer_prefix_test
|
||||
data_transfer_window_test
|
||||
audio_transfer_window_test
|
||||
rjpeg_test
|
||||
r7z_lzma_props_test
|
||||
vcdiff_test
|
||||
net_ifinfo
|
||||
vfs_read_overflow_test
|
||||
vfs_mapped_ptr_test
|
||||
vfs_large_file_test
|
||||
vfs_seek_contract_test
|
||||
vfs_hybrid_test
|
||||
cdrom_cuesheet_overflow_test
|
||||
cdfs_dir_record_test
|
||||
chd_meta_overflow_test
|
||||
strlcpy_append_test
|
||||
http_parse_test
|
||||
rjson_test
|
||||
rtga_test
|
||||
rbmp_test
|
||||
rpng_chunk_overflow_test
|
||||
rpng_roundtrip_test
|
||||
rpng_decode_corpus_test
|
||||
word_wrap_overflow_test
|
||||
task_queue_title_error_test
|
||||
tpool_wait_test
|
||||
data_transfer_pool_scrub_test
|
||||
retro_atomic_test
|
||||
retro_atomic_extern_c_linkage_test
|
||||
retro_atomic_extern_c_linkage_test_cxx
|
||||
retro_spsc_test
|
||||
audio_mixer_loop_test
|
||||
)
|
||||
|
||||
# Targets that are built but deliberately not executed, each
|
||||
# for a reason that is not "we forgot". Anything built and
|
||||
# listed in neither this nor RUN_TARGETS is an error below,
|
||||
# because a silent "not in run allowlist" skip is
|
||||
# indistinguishable from an omission - which is how seven
|
||||
# self-contained regression tests came to be compiled every
|
||||
# run and never executed.
|
||||
declare -a NORUN_TARGETS=(
|
||||
# CLI tools that print usage and exit non-zero without
|
||||
# arguments; they have no self-test mode.
|
||||
rzip
|
||||
# Performs real HTTP requests against an external host, so
|
||||
# running it would make this job depend on a third party
|
||||
# being up.
|
||||
http_test
|
||||
)
|
||||
|
||||
# Per-binary run command (overrides ./<binary> if present).
|
||||
# config_file_test's leak exemption is gone: the harness now
|
||||
# frees everything it allocates and the parser's own include
|
||||
# leak is fixed, so LeakSanitizer runs at full strictness and
|
||||
# any surviving allocation is a real config_file regression.
|
||||
declare -A RUN_ENV=(
|
||||
)
|
||||
|
||||
# Samples that are build-only (either they require command-line
|
||||
# arguments, open network sockets, need extra fixtures, or are
|
||||
# interactive demos). They are compiled to catch build-time
|
||||
# regressions but not executed.
|
||||
declare -a BUILD_ONLY_DIRS=(
|
||||
formats/xml
|
||||
)
|
||||
|
||||
# Samples that are currently broken at build time on a stock
|
||||
# Ubuntu host and are therefore neither built nor run.
|
||||
declare -a SKIP_DIRS=(
|
||||
)
|
||||
|
||||
is_in() {
|
||||
local needle=$1; shift
|
||||
local h
|
||||
for h in "$@"; do [[ "$h" == "$needle" ]] && return 0; done
|
||||
return 1
|
||||
}
|
||||
|
||||
fails=0
|
||||
builds=0
|
||||
runs=0
|
||||
|
||||
# Collect all Makefile directories (one or two levels deep).
|
||||
mapfile -t MKDIRS < <(find . -name Makefile -printf '%h\n' | sort)
|
||||
|
||||
printf '\n==> %d sample directories found\n' "${#MKDIRS[@]}"
|
||||
for d in "${MKDIRS[@]}"; do printf ' %s\n' "${d#./}"; done
|
||||
printf '\n'
|
||||
|
||||
for d in "${MKDIRS[@]}"; do
|
||||
rel=${d#./}
|
||||
printf '========================================\n'
|
||||
printf '[%s] %s\n' "$(is_in "$rel" "${SKIP_DIRS[@]}" && echo skip || echo build)" "$rel"
|
||||
printf '========================================\n'
|
||||
|
||||
if is_in "$rel" "${SKIP_DIRS[@]}"; then
|
||||
printf '[skip] %s is on the skip list\n\n' "$rel"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Build
|
||||
if ! ( cd "$d" && make clean all $MAKE_ARGS ); then
|
||||
printf '\n::error title=Build failed::%s failed to build\n' "$rel"
|
||||
fails=$((fails+1))
|
||||
continue
|
||||
fi
|
||||
builds=$((builds+1))
|
||||
|
||||
# Skip run for build-only dirs
|
||||
if is_in "$rel" "${BUILD_ONLY_DIRS[@]}"; then
|
||||
printf '[skip-run] %s (build-only list)\n\n' "$rel"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Extract targets from Makefile. Handles:
|
||||
# TARGET := foo
|
||||
# TARGETS = a b c
|
||||
# TARGET_TEST := foo_test (second target in same Makefile)
|
||||
# TARGET_TEST2 := foo_test2 (third target, fourth, ...)
|
||||
mapfile -t targets < <(
|
||||
grep -hE '^(TARGET|TARGETS|TARGET_TEST[0-9]*)[[:space:]]*[:?]?=' "$d/Makefile" \
|
||||
| sed -E 's/^[^=]*=[[:space:]]*//' \
|
||||
| tr -s ' \t' '\n' \
|
||||
| grep -v '^$' \
|
||||
| sort -u
|
||||
)
|
||||
|
||||
for t in "${targets[@]}"; do
|
||||
if ! is_in "$t" "${RUN_TARGETS[@]}"; then
|
||||
if is_in "$t" "${NORUN_TARGETS[@]}"; then
|
||||
printf '[skip-run] %s/%s (deliberately not run)\n' "$rel" "$t"
|
||||
continue
|
||||
fi
|
||||
printf '::error title=Target not classified::%s/%s is built but appears in neither RUN_TARGETS nor NORUN_TARGETS. Add it to one of them.\n' "$rel" "$t"
|
||||
fails=$((fails+1))
|
||||
continue
|
||||
fi
|
||||
|
||||
bin="$d/$t"
|
||||
if [[ ! -x "$bin" ]]; then
|
||||
printf '::error title=Missing binary::%s was in the run allowlist but %s does not exist after build\n' "$t" "$bin"
|
||||
fails=$((fails+1))
|
||||
continue
|
||||
fi
|
||||
|
||||
extra_env=${RUN_ENV[$t]:-}
|
||||
|
||||
printf '\n[run] %s\n' "$bin"
|
||||
if ( cd "$d" && env $extra_env timeout 60 "./$t" ); then
|
||||
printf '[pass] %s\n\n' "$t"
|
||||
runs=$((runs+1))
|
||||
else
|
||||
rc=$?
|
||||
printf '\n::error title=Test failed::%s exited with status %d\n' "$t" "$rc"
|
||||
fails=$((fails+1))
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
printf '========================================\n'
|
||||
printf 'Summary\n'
|
||||
printf '========================================\n'
|
||||
printf ' Built: %d\n' "$builds"
|
||||
printf ' Ran: %d\n' "$runs"
|
||||
printf ' Failed: %d\n' "$fails"
|
||||
|
||||
if [[ $fails -gt 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Compile-test retro_atomic.h from a C++11 TU
|
||||
shell: bash
|
||||
working-directory: libretro-common
|
||||
run: |
|
||||
# The C++11 backend in retro_atomic.h is a fresh code path that
|
||||
# none of the C samples above exercise. Compile a tiny inline
|
||||
# C++11 TU against the in-tree header to catch regressions like
|
||||
# accidentally re-introducing an extern "C" wrapper around the
|
||||
# std::atomic include, or breaking the __cplusplus / _MSVC_LANG
|
||||
# gate. This step is build-and-run, single-threaded only -- the
|
||||
# behavioural SPSC stress is already covered by the C test
|
||||
# binary above on this same host, and the C++11 backend bottoms
|
||||
# out through the same libstdc++ __atomic_* builtins.
|
||||
#
|
||||
# Two fixtures share the g++/clang++ x c++11/14/17 sweep:
|
||||
#
|
||||
# cxx_smoke.cpp : header included at C++ linkage,
|
||||
# the "ordinary" C++ TU shape.
|
||||
# cxx_smoke_extern_c.cpp : header included from inside an
|
||||
# extern "C" { ... } wrap, the
|
||||
# shape ui_qt.cpp uses under
|
||||
# !CXX_BUILD. This is the
|
||||
# regression case for the
|
||||
# RETRO_BEGIN_DECLS_CXX shield in
|
||||
# retro_atomic.h's C++11 backend.
|
||||
# The standalone build of the
|
||||
# sample at samples/atomic/
|
||||
# retro_atomic_extern_c_linkage/
|
||||
# covers the same case under the
|
||||
# default toolchain; this matrix
|
||||
# extends coverage to clang++ and
|
||||
# the higher language standards.
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
tmpdir=$(mktemp -d)
|
||||
cat > "$tmpdir/cxx_smoke.cpp" <<'EOF'
|
||||
#include <cstdio>
|
||||
#include <cstddef>
|
||||
#include <retro_atomic.h>
|
||||
|
||||
#if !defined(HAVE_RETRO_ATOMIC) || !defined(RETRO_ATOMIC_LOCK_FREE)
|
||||
# error "retro_atomic.h: capability flags not set on a C++11 host"
|
||||
#endif
|
||||
|
||||
int main(void) {
|
||||
retro_atomic_int_t ai; retro_atomic_int_init(&ai, 0);
|
||||
retro_atomic_size_t as; retro_atomic_size_init(&as, 0);
|
||||
|
||||
retro_atomic_store_release_int(&ai, 42);
|
||||
retro_atomic_store_release_size(&as, (std::size_t)42);
|
||||
|
||||
int li = retro_atomic_load_acquire_int(&ai);
|
||||
int ls = (int)retro_atomic_load_acquire_size(&as);
|
||||
|
||||
int pi = retro_atomic_fetch_add_int(&ai, 1);
|
||||
int ps = (int)retro_atomic_fetch_add_size(&as, 1);
|
||||
|
||||
retro_atomic_inc_int(&ai);
|
||||
retro_atomic_dec_size(&as);
|
||||
|
||||
int qi = retro_atomic_load_acquire_int(&ai);
|
||||
int qs = (int)retro_atomic_load_acquire_size(&as);
|
||||
|
||||
std::printf("backend: %s\n", RETRO_ATOMIC_BACKEND_NAME);
|
||||
|
||||
bool ok = (li == 42) && (ls == 42)
|
||||
&& (pi == 42) && (ps == 42)
|
||||
&& (qi == 44) && (qs == 42);
|
||||
std::puts(ok ? "ALL OK" : "FAIL");
|
||||
return ok ? 0 : 1;
|
||||
}
|
||||
EOF
|
||||
|
||||
# Regression fixture: include retro_atomic.h from inside an
|
||||
# extern "C" wrap. Faithful mirror of ui_qt.cpp's pattern.
|
||||
# Pre-fix retro_atomic.h would emit ~80 "template with C
|
||||
# linkage" errors here; the RETRO_BEGIN_DECLS_CXX shield
|
||||
# around <atomic> makes this compile cleanly.
|
||||
cat > "$tmpdir/cxx_smoke_extern_c.cpp" <<'EOF'
|
||||
#include <cstdio>
|
||||
#include <cstddef>
|
||||
|
||||
extern "C" {
|
||||
#include <retro_atomic.h>
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
retro_atomic_int_t ai; retro_atomic_int_init(&ai, 0);
|
||||
retro_atomic_store_release_int(&ai, 7);
|
||||
int v = retro_atomic_load_acquire_int(&ai);
|
||||
std::printf("backend: %s\n", RETRO_ATOMIC_BACKEND_NAME);
|
||||
std::puts(v == 7 ? "ALL OK" : "FAIL");
|
||||
return v == 7 ? 0 : 1;
|
||||
}
|
||||
EOF
|
||||
|
||||
for cxx in g++ clang++; do
|
||||
for std in c++11 c++14 c++17; do
|
||||
for fixture in cxx_smoke cxx_smoke_extern_c; do
|
||||
echo "==> compile-test with $cxx -std=$std ($fixture)"
|
||||
$cxx -std=$std -Wall -Wextra -pedantic -O2 \
|
||||
-I include \
|
||||
"$tmpdir/$fixture.cpp" \
|
||||
-o "$tmpdir/$fixture" \
|
||||
|| { echo "::error title=C++ compile failed::$cxx -std=$std $fixture"; exit 1; }
|
||||
"$tmpdir/$fixture" \
|
||||
|| { echo "::error title=C++ smoke failed::$cxx -std=$std $fixture"; exit 1; }
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
rm -rf "$tmpdir"
|
||||
|
||||
- name: Run retro_atomic_test under Clang + ThreadSanitizer
|
||||
shell: bash
|
||||
working-directory: libretro-common/samples/atomic/retro_atomic_test
|
||||
run: |
|
||||
# The native samples job above runs with GCC and ASan/UBSan.
|
||||
# Clang is the toolchain on every Apple platform, Android NDK
|
||||
# (since r18), Emscripten, and PS4-ORBIS, so a Clang lane is
|
||||
# not optional coverage. ThreadSanitizer is the strict
|
||||
# validator for this test in particular: it instruments every
|
||||
# atomic load and store and would flag a missing acquire /
|
||||
# release barrier as a race in the 1M-iteration SPSC stress
|
||||
# (a class of bug that x86 TSO would otherwise hide on the
|
||||
# native runner).
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
make clean
|
||||
CC=clang make all SANITIZER=thread
|
||||
|
||||
TSAN_OPTIONS=halt_on_error=1 ./retro_atomic_test
|
||||
|
||||
- name: Run retro_spsc_test under Clang + ThreadSanitizer
|
||||
shell: bash
|
||||
working-directory: libretro-common/samples/queues/retro_spsc_test
|
||||
run: |
|
||||
# retro_spsc.c is a lock-free SPSC byte queue built on
|
||||
# retro_atomic.h. Its correctness contract is acquire-load
|
||||
# / release-store on the head and tail cursors, with the
|
||||
# buffer reads/writes between them ordered by those barriers.
|
||||
# Missing or weakened barriers produce torn data on the
|
||||
# consumer side, observable as content mismatches in the
|
||||
# stress harness AND as TSan-reported races. The default
|
||||
# ASan/UBSan pass above catches the content mismatches but
|
||||
# not the races; this lane catches both.
|
||||
#
|
||||
# halt_on_error=1 makes TSan exit non-zero on the first race
|
||||
# rather than continuing -- which is what we want for CI:
|
||||
# any race here means the SPSC contract is broken.
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
make clean
|
||||
CC=clang make all SANITIZER=thread
|
||||
|
||||
TSAN_OPTIONS=halt_on_error=1 ./retro_spsc_test
|
||||
|
||||
- name: Run crc32_test under Clang + ThreadSanitizer
|
||||
shell: bash
|
||||
working-directory: libretro-common/samples/encodings/crc32
|
||||
run: |
|
||||
# encoding_crc32() caches x86 feature detection on first use.
|
||||
# The failure that matters is publishing that result without
|
||||
# release/acquire ordering, which is invisible to the value
|
||||
# checks -- every thread still computes the right number on
|
||||
# x86 TSO -- and only shows up as a race. The test holds its
|
||||
# threads on a gate so they all make their first dispatching
|
||||
# call at once; see the comment above crc_first_touch_worker
|
||||
# for why that section makes exactly one call per thread.
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
make clean
|
||||
CC=clang make all SANITIZER=thread
|
||||
|
||||
TSAN_OPTIONS=halt_on_error=1 ./crc32_test
|
||||
|
||||
# Cross-architecture validation lane for retro_atomic_test.
|
||||
#
|
||||
# The samples job above runs on x86_64, which is a strongly-ordered
|
||||
# (TSO) architecture. retro_atomic.h's contract is that acquire-load
|
||||
# / release-store / acq_rel-RMW emit real barriers on weakly-ordered
|
||||
# SMP targets (ARM, AArch64, PowerPC, MIPS). An x86_64 host run
|
||||
# cannot exercise that property, because TSO masks reordering bugs
|
||||
# at the hardware level even when the macros emit no barriers at all.
|
||||
#
|
||||
# This job cross-compiles retro_atomic_test for AArch64 and ARMv7 and
|
||||
# runs the binary under qemu-user-static. qemu-user emulates the
|
||||
# weak memory model faithfully enough to expose missing-barrier bugs
|
||||
# in the SPSC stress test, and is cheap enough to run on every push.
|
||||
#
|
||||
# We deliberately do NOT run the full samples sweep here -- the rest
|
||||
# of the samples don't have architecture-dependent codegen that
|
||||
# warrants the extra CI time. retro_atomic_test is the one that
|
||||
# benefits from cross-arch coverage.
|
||||
#
|
||||
# Real ARM hardware still beats qemu (see e.g. PostgreSQL's 2025
|
||||
# Win11/ARM64 atomic ordering bug, found only on real silicon),
|
||||
# but qemu catches most categorical errors and is much cheaper than
|
||||
# provisioning ARM runners.
|
||||
config-file-fuzz-smoke:
|
||||
name: config_file differential fuzz (smoke)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y clang
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build fuzz target
|
||||
shell: bash
|
||||
working-directory: libretro-common/samples/file/config_file
|
||||
run: |
|
||||
set -eu
|
||||
LC=../../..
|
||||
clang -O1 -g -fsanitize=fuzzer,address,undefined \
|
||||
-fno-sanitize-recover=all \
|
||||
-I$LC/include -o config_file_fuzz config_file_fuzz.c \
|
||||
$LC/file/config_file.c \
|
||||
$LC/file/file_path.c \
|
||||
$LC/compat/compat_strl.c \
|
||||
$LC/compat/compat_strcasestr.c \
|
||||
$LC/compat/compat_posix_string.c \
|
||||
$LC/encodings/encoding_utf.c \
|
||||
$LC/lists/string_list.c \
|
||||
$LC/time/rtime.c
|
||||
|
||||
- name: Run fuzz smoke
|
||||
shell: bash
|
||||
working-directory: libretro-common/samples/file/config_file
|
||||
run: |
|
||||
set -eu
|
||||
# Seed corpus: representative config shapes plus the byte
|
||||
# patterns the target's invariants care about (embedded NUL,
|
||||
# comment-in-literal, directives, duplicate keys, CRLF).
|
||||
# Generated here rather than committed so no binary files
|
||||
# live in the tree.
|
||||
mkdir -p corpus
|
||||
printf 'video_driver = "vulkan"\nvideo_fullscreen = "true"\naudio_rate = "48000"\n' > corpus/basic
|
||||
printf '# comment\nkey = "has # inside"\ndup = "a"\ndup = "b"\n spaced = bare\r\nempty = ""\n' > corpus/edge
|
||||
printf '#include "sub.cfg"\n#reference "other.cfg"\nafter = "1"\n' > corpus/directives
|
||||
python3 -c "import sys; sys.stdout.buffer.write(b'a = \"1\"\nb\x00c = \"2\"\nd = \"3\"\n')" > corpus/embedded_nul
|
||||
# 60 seconds of coverage-guided differential fuzzing:
|
||||
# every input is parsed whole and again through the
|
||||
# streaming push API in input-derived packet splits, then
|
||||
# entry-list equality, hash-map coherence and tail
|
||||
# validity are enforced (see config_file_fuzz.c). Any
|
||||
# divergence or sanitizer report fails the job.
|
||||
./config_file_fuzz -max_len=512 -max_total_time=60 \
|
||||
-print_final_stats=1 corpus/
|
||||
|
||||
retro-atomic-cross:
|
||||
name: Cross-arch retro_atomic_test (${{ matrix.arch }})
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- arch: aarch64
|
||||
cc: aarch64-linux-gnu-gcc
|
||||
apt_pkgs: gcc-aarch64-linux-gnu
|
||||
qemu: qemu-aarch64-static
|
||||
sysroot: /usr/aarch64-linux-gnu
|
||||
- arch: armv7
|
||||
cc: arm-linux-gnueabihf-gcc
|
||||
apt_pkgs: gcc-arm-linux-gnueabihf
|
||||
qemu: qemu-arm-static
|
||||
sysroot: /usr/arm-linux-gnueabihf
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y build-essential ${{ matrix.apt_pkgs }} qemu-user-static
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build retro_atomic_test for ${{ matrix.arch }}
|
||||
working-directory: libretro-common/samples/atomic/retro_atomic_test
|
||||
run: |
|
||||
set -u
|
||||
set -o pipefail
|
||||
make clean
|
||||
CC=${{ matrix.cc }} make all
|
||||
|
||||
- name: Run retro_atomic_test under qemu-user
|
||||
working-directory: libretro-common/samples/atomic/retro_atomic_test
|
||||
run: |
|
||||
set -u
|
||||
set -o pipefail
|
||||
${{ matrix.qemu }} -L ${{ matrix.sysroot }} ./retro_atomic_test
|
||||
|
||||
- name: Inspect emitted atomic instructions
|
||||
working-directory: libretro-common/samples/atomic/retro_atomic_test
|
||||
run: |
|
||||
set -u
|
||||
set -o pipefail
|
||||
# Spot-check the codegen. If retro_atomic.h were silently
|
||||
# falling through to a no-barrier backend on this arch, the
|
||||
# asm would be conspicuously missing acquire/release
|
||||
# instructions. This is a cheap sanity check on top of the
|
||||
# behavioural SPSC test above.
|
||||
${{ matrix.cc }} -O2 -S \
|
||||
-I../../../include -DHAVE_THREADS \
|
||||
retro_atomic_test.c -o /tmp/retro_atomic_test.s
|
||||
echo
|
||||
echo '== Unique barrier-emitting mnemonics =='
|
||||
case "${{ matrix.arch }}" in
|
||||
aarch64)
|
||||
# Expect: ldar, stlr, and __aarch64_ldadd*_acq_rel libcalls
|
||||
# (or inline ldaddal LSE on +lse builds).
|
||||
pattern='\b(ldar|stlr|ldax|stlx|dmb|ldadd[a-z0-9_]*|swp[a-z0-9_]*|__aarch64_(ldadd|swp)[a-z0-9_]*acq_rel)\b'
|
||||
;;
|
||||
armv7)
|
||||
# Expect: dmb (data memory barrier) and ldrex/strex pairs.
|
||||
pattern='\b(dmb|ldrex|strex|ldrexb|strexb|ldrexh|strexh)\b'
|
||||
;;
|
||||
esac
|
||||
mnemonics=$(grep -oE "$pattern" /tmp/retro_atomic_test.s | sort -u)
|
||||
echo "$mnemonics"
|
||||
if [[ -z "$mnemonics" ]]; then
|
||||
echo
|
||||
echo '::error title=No barrier instructions emitted::retro_atomic_test.s contains no acquire/release/barrier mnemonics for ${{ matrix.arch }}; retro_atomic.h may have fallen through to a no-barrier backend.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# encoding_crc32() picks a different implementation per target: the
|
||||
# ARMv8 CRC32 instructions when the compiler advertises +crc, a
|
||||
# PCLMULQDQ fold on x86, and a slicing-by-8 table everywhere else.
|
||||
# The table path reads the input as little-endian 32-bit words and
|
||||
# byte-swaps under MSB_FIRST, so a big-endian target is the only
|
||||
# place a missing or wrong swap is visible -- on x86 the swap
|
||||
# compiles away and every test still passes. powerpc is carried
|
||||
# here for exactly that reason, and is the only big-endian lane in
|
||||
# the sample suite.
|
||||
#
|
||||
# aarch64 appears twice on purpose. Stock aarch64 gcc does not
|
||||
# define __ARM_FEATURE_CRC32, so a default build exercises the table
|
||||
# path; only Makefile.libnx passes +crc today, and the second entry
|
||||
# is what covers the intrinsic path at all.
|
||||
#
|
||||
# qemu-user cannot run the sanitizer runtimes, so these lanes rely on
|
||||
# the test's own bitwise reference and its guard-page section, which
|
||||
# catches an overread as a SIGSEGV rather than a redzone hit.
|
||||
crc32-cross:
|
||||
name: Cross-arch crc32_test (${{ matrix.name }})
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: aarch64
|
||||
cc: aarch64-linux-gnu-gcc
|
||||
cflags: ""
|
||||
apt_pkgs: gcc-aarch64-linux-gnu
|
||||
qemu: qemu-aarch64-static
|
||||
sysroot: /usr/aarch64-linux-gnu
|
||||
- name: aarch64+crc
|
||||
cc: aarch64-linux-gnu-gcc
|
||||
cflags: "-march=armv8-a+crc"
|
||||
apt_pkgs: gcc-aarch64-linux-gnu
|
||||
qemu: qemu-aarch64-static
|
||||
sysroot: /usr/aarch64-linux-gnu
|
||||
- name: armv7
|
||||
cc: arm-linux-gnueabihf-gcc
|
||||
cflags: ""
|
||||
apt_pkgs: gcc-arm-linux-gnueabihf
|
||||
qemu: qemu-arm-static
|
||||
sysroot: /usr/arm-linux-gnueabihf
|
||||
- name: powerpc-big-endian
|
||||
cc: powerpc-linux-gnu-gcc
|
||||
cflags: ""
|
||||
apt_pkgs: gcc-powerpc-linux-gnu
|
||||
qemu: qemu-ppc-static
|
||||
sysroot: /usr/powerpc-linux-gnu
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y build-essential ${{ matrix.apt_pkgs }} qemu-user-static
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build crc32_test for ${{ matrix.name }}
|
||||
working-directory: libretro-common/samples/encodings/crc32
|
||||
run: |
|
||||
set -u
|
||||
set -o pipefail
|
||||
# HAVE_THREADS=0: rthreads needs a target libpthread that the
|
||||
# cross toolchains here do not reliably provide. The threaded
|
||||
# sections are covered by the native Clang/TSan lane above;
|
||||
# what these lanes are for is the per-architecture arithmetic.
|
||||
make clean
|
||||
CC="${{ matrix.cc }}" CFLAGS="${{ matrix.cflags }}" make all HAVE_THREADS=0
|
||||
|
||||
- name: Run crc32_test under qemu-user
|
||||
working-directory: libretro-common/samples/encodings/crc32
|
||||
run: |
|
||||
set -u
|
||||
set -o pipefail
|
||||
${{ matrix.qemu }} -L ${{ matrix.sysroot }} ./crc32_test
|
||||
|
||||
- name: Run vfs_mapped_ptr_test without mappings (MMAP=0)
|
||||
shell: bash
|
||||
working-directory: libretro-common/samples/file/vfs
|
||||
run: |
|
||||
set -eu
|
||||
# The default build has HAVE_MMAP, where filestream_matches_buf()
|
||||
# compares against the memory map in a single memcmp and its
|
||||
# windowed fallback never executes - so the window-boundary
|
||||
# cases in the run above assert on code that did not run.
|
||||
# This lane is where that path is actually under test, and it
|
||||
# is also the only coverage the platforms without mappings
|
||||
# get. Verified to fail here with the window advance off by
|
||||
# one, which the mapped lane does not notice at all.
|
||||
make clean all MMAP=0 SANITIZER=address,undefined
|
||||
ASAN_OPTIONS=detect_leaks=1:detect_stack_use_after_return=1 \
|
||||
UBSAN_OPTIONS=print_stacktrace=1 timeout 120 \
|
||||
./vfs_mapped_ptr_test
|
||||
echo "[pass] vfs_mapped_ptr_test (MMAP=0, ASan)"
|
||||
@@ -1,98 +0,0 @@
|
||||
name: CI Linux libretro-common tests
|
||||
|
||||
# libretro-common/Makefile.test builds and runs the libcheck unit
|
||||
# suites under -fsanitize=address -fsanitize=undefined. Nothing ran
|
||||
# it, which is how three of its suites came to reference sources that
|
||||
# had moved and one referenced a library it never linked: a suite that
|
||||
# cannot be built reads exactly like a suite that passes.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
libretro-common-tests:
|
||||
name: Build and run libretro-common/Makefile.test
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y build-essential check pkg-config \
|
||||
zlib1g-dev lcov \
|
||||
gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 wine wine64
|
||||
# mingw and wine are for the Windows A/W configuration matrix
|
||||
# in Makefile.test. libretro-common selects between the ANSI
|
||||
# and the wide Win32 entry points three ways and, until these
|
||||
# were installed, no job built two of them: the ANSI branch
|
||||
# was compiled by nothing, so nothing noticed when it stopped
|
||||
# compiling. wine takes it past a build check - an ANSI build
|
||||
# under wine really does call CreateFileA and
|
||||
# GetFileAttributesA, so the branch is executed rather than
|
||||
# merely parsed. Both are optional to the recipe: without
|
||||
# them it says which tool is missing and passes, so a
|
||||
# contributor's local run is not blocked.
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build and run the unit test suites
|
||||
shell: bash
|
||||
working-directory: libretro-common
|
||||
env:
|
||||
# Keep wine quiet and out of $HOME; the first invocation
|
||||
# creates the prefix.
|
||||
WINEDEBUG: "-all"
|
||||
WINEPREFIX: "/tmp/wineprefix"
|
||||
run: |
|
||||
set -eu
|
||||
# The recipe builds each suite, runs it, and collects
|
||||
# coverage, in order -- coverage files collide otherwise.
|
||||
# Any suite failing to build, or any check failing, or any
|
||||
# sanitizer report, fails the job.
|
||||
make -f Makefile.test \
|
||||
LIBCHECK_CFLAGS="$(pkg-config --cflags check)" \
|
||||
CFLAGS="$(pkg-config --cflags check)"
|
||||
echo "[pass] libretro-common unit test suites"
|
||||
|
||||
- name: Check VFS backend symbol parity
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
set -eu
|
||||
# vfs_implementation_uwp.cpp replaces vfs_implementation.c on
|
||||
# UWP rather than extending it, so a function added to the C
|
||||
# backend and called from the shared file_stream.c compiles
|
||||
# everywhere and fails to link on UWP alone - at the end of a
|
||||
# long MSVC build, on a runner most contributors do not have.
|
||||
# That is how retro_vfs_file_get_mapped_ptr_impl reached the
|
||||
# branch broken. This is the same check at source level, for
|
||||
# free, on Linux.
|
||||
python3 tools/vfs_backend_parity.py
|
||||
|
||||
- name: Check stack frame budget
|
||||
shell: bash
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
set -eu
|
||||
# PSP and GX threads get 8 KiB of stack (STACKSIZE in
|
||||
# rthreads/psp_pthread.h and rthreads/gx_pthread.h). Nothing
|
||||
# warns when a local buffer outgrows that: it builds
|
||||
# everywhere and overflows only on a target most contributors
|
||||
# cannot build. config_file_write() carried a 16 KiB stdio
|
||||
# buffer as a local - twice that stack - on a path reached
|
||||
# from a task handler, and nothing noticed.
|
||||
python3 tools/stack_budget.py
|
||||
@@ -1,160 +0,0 @@
|
||||
name: CI Linux libretro-db samples
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
samples:
|
||||
name: Build and run libretro-db/samples
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y build-essential zlib1g-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build and run samples
|
||||
shell: bash
|
||||
working-directory: libretro-db/samples
|
||||
env:
|
||||
# Build samples under AddressSanitizer + UndefinedBehaviorSanitizer.
|
||||
# Both libretro-db sample tests support this via the SANITIZER=
|
||||
# convention also used in samples/tasks/http/Makefile. ASan
|
||||
# catches any reintroduced leak (intfstream_t in libretrodb_open
|
||||
# / cursor_close, etc.) and any out-of-bounds memory access, so
|
||||
# this is the regression-protective build for these tests.
|
||||
MAKE_ARGS: "SANITIZER=address,undefined"
|
||||
run: |
|
||||
set -u
|
||||
set -o pipefail
|
||||
|
||||
# Samples whose binary, when invoked with no arguments, runs a
|
||||
# self-contained test and exits 0 on success / non-zero on
|
||||
# failure. These are built AND executed.
|
||||
declare -a RUN_TARGETS=(
|
||||
rmsgpack_overflow_test
|
||||
libretrodb_leak_test
|
||||
)
|
||||
|
||||
# Per-binary run command (overrides ./<binary> if present).
|
||||
declare -A RUN_ENV=()
|
||||
|
||||
# Samples that are build-only.
|
||||
declare -a BUILD_ONLY_DIRS=(
|
||||
)
|
||||
|
||||
# Samples that are currently broken at build time on a stock
|
||||
# Ubuntu host and are therefore neither built nor run.
|
||||
declare -a SKIP_DIRS=(
|
||||
)
|
||||
|
||||
is_in() {
|
||||
local needle=$1; shift
|
||||
local h
|
||||
for h in "$@"; do [[ "$h" == "$needle" ]] && return 0; done
|
||||
return 1
|
||||
}
|
||||
|
||||
fails=0
|
||||
builds=0
|
||||
runs=0
|
||||
|
||||
# Collect all Makefile directories (one or two levels deep).
|
||||
mapfile -t MKDIRS < <(find . -name Makefile -printf '%h\n' | sort)
|
||||
|
||||
printf '\n==> %d sample directories found\n' "${#MKDIRS[@]}"
|
||||
for d in "${MKDIRS[@]}"; do printf ' %s\n' "${d#./}"; done
|
||||
printf '\n'
|
||||
|
||||
for d in "${MKDIRS[@]}"; do
|
||||
rel=${d#./}
|
||||
printf '========================================\n'
|
||||
printf '[%s] %s\n' "$(is_in "$rel" "${SKIP_DIRS[@]}" && echo skip || echo build)" "$rel"
|
||||
printf '========================================\n'
|
||||
|
||||
if is_in "$rel" "${SKIP_DIRS[@]}"; then
|
||||
printf '[skip] %s is on the skip list\n\n' "$rel"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Build
|
||||
if ! ( cd "$d" && make clean all $MAKE_ARGS ); then
|
||||
printf '\n::error title=Build failed::%s failed to build\n' "$rel"
|
||||
fails=$((fails+1))
|
||||
continue
|
||||
fi
|
||||
builds=$((builds+1))
|
||||
|
||||
# Skip run for build-only dirs
|
||||
if is_in "$rel" "${BUILD_ONLY_DIRS[@]}"; then
|
||||
printf '[skip-run] %s (build-only list)\n\n' "$rel"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Extract targets from Makefile. Handles:
|
||||
# TARGET := foo
|
||||
# TARGETS = a b c
|
||||
# TARGET_TEST := foo_test
|
||||
# TARGET_TEST2 := foo_test2
|
||||
mapfile -t targets < <(
|
||||
grep -hE '^(TARGET|TARGETS|TARGET_TEST[0-9]*)[[:space:]]*[:?]?=' "$d/Makefile" \
|
||||
| sed -E 's/^[^=]*=[[:space:]]*//' \
|
||||
| tr -s ' \t' '\n' \
|
||||
| grep -v '^$' \
|
||||
| sort -u
|
||||
)
|
||||
|
||||
for t in "${targets[@]}"; do
|
||||
if ! is_in "$t" "${RUN_TARGETS[@]}"; then
|
||||
printf '[skip-run] %s/%s (not in run allowlist)\n' "$rel" "$t"
|
||||
continue
|
||||
fi
|
||||
|
||||
bin="$d/$t"
|
||||
if [[ ! -x "$bin" ]]; then
|
||||
printf '::error title=Missing binary::%s was in the run allowlist but %s does not exist after build\n' "$t" "$bin"
|
||||
fails=$((fails+1))
|
||||
continue
|
||||
fi
|
||||
|
||||
extra_env=${RUN_ENV[$t]:-}
|
||||
|
||||
printf '\n[run] %s\n' "$bin"
|
||||
if ( cd "$d" && env $extra_env timeout 60 "./$t" ); then
|
||||
printf '[pass] %s\n\n' "$t"
|
||||
runs=$((runs+1))
|
||||
else
|
||||
rc=$?
|
||||
printf '\n::error title=Test failed::%s exited with status %d\n' "$t" "$rc"
|
||||
fails=$((fails+1))
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
printf '========================================\n'
|
||||
printf 'Summary\n'
|
||||
printf '========================================\n'
|
||||
printf ' Built: %d\n' "$builds"
|
||||
printf ' Ran: %d\n' "$runs"
|
||||
printf ' Failed: %d\n' "$fails"
|
||||
|
||||
if [[ $fails -gt 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,70 +0,0 @@
|
||||
name: CI Linux samples/formats
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
samples-formats:
|
||||
name: Build and run samples/formats
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y build-essential
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build and run image_decode_fuzz_test (ASan + UBSan + LSan)
|
||||
shell: bash
|
||||
working-directory: samples/formats/image_decode_fuzz
|
||||
run: |
|
||||
set -eu
|
||||
# Malformed-input sweep for the BMP, TGA, DDS and WebP decoders in
|
||||
# libretro-common/formats. All three take dimensions and
|
||||
# layout from a header the file supplies and size their
|
||||
# output from it, which is where this kind of arithmetic
|
||||
# goes wrong, and none of the four had any test at all.
|
||||
# (WebP is told its buffer length, so it is the least
|
||||
# exposed of them; its chunk walk still trusts sizes that
|
||||
# came out of the file.)
|
||||
#
|
||||
# It found one on its first run: rbmp_proc_reset() gated the
|
||||
# free of output_image on phase != RBMP_PHASE_IDLE, but
|
||||
# rbmp_begin() allocates that surface before it sets any
|
||||
# phase and returns false between the two for a palette
|
||||
# header claiming a bits-per-pixel other than 4 or 8. Every
|
||||
# such image leaked the surface, reachable from any
|
||||
# malformed or hostile BMP. Leak detection is therefore
|
||||
# switched on explicitly here rather than left to the
|
||||
# default.
|
||||
#
|
||||
# The sweep truncates each seed at every length and sets
|
||||
# every header byte to each of six interesting values,
|
||||
# including the ones that make dimensions enormous. The
|
||||
# count of inputs that decode successfully is asserted
|
||||
# inside the test, so a sweep where the seeds stopped being
|
||||
# accepted would fail rather than exercise only the reject
|
||||
# paths and report a pass. That count is kept per format, not
|
||||
# just in total, so one decoder quietly ceasing to accept its
|
||||
# seed cannot hide behind the other three.
|
||||
make clean all SANITIZER=address,undefined
|
||||
test -x image_decode_fuzz_test
|
||||
ASAN_OPTIONS=detect_leaks=1 UBSAN_OPTIONS=print_stacktrace=1 \
|
||||
timeout 120 ./image_decode_fuzz_test
|
||||
echo "[pass] image_decode_fuzz_test"
|
||||
@@ -1,499 +0,0 @@
|
||||
name: CI Linux samples/gfx
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
samples-gfx:
|
||||
name: Build and run samples/gfx
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y build-essential \
|
||||
libx11-dev libxrandr-dev libdrm-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build and run vulkan_extension_count_test (ASan)
|
||||
shell: bash
|
||||
working-directory: samples/gfx/vulkan_extension_count
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the heap-overflow fix in
|
||||
# gfx/common/vulkan_common.c::vulkan_find_device_extensions.
|
||||
# Pre-fix the function appended the required-extension list
|
||||
# twice -- once via memcpy at the top of the body, then
|
||||
# again in a per-element loop -- consuming
|
||||
# (count_initial + 2*num_required + num_optional) slots in
|
||||
# the caller's buffer. vulkan_context_create_device_wrapper
|
||||
# sized its malloc for (count_initial + num_required +
|
||||
# num_optional) entries, so a libretro core using the Vulkan
|
||||
# HW context-negotiation interface against a GPU exposing at
|
||||
# least one optional extension hit a one-element heap-buffer-
|
||||
# overflow (8 bytes on 64-bit) at the end of the malloc'd
|
||||
# block. Build under AddressSanitizer so any reintroduction
|
||||
# of the duplicate write is caught at the bounds level. If
|
||||
# vulkan_common.c amends the append-to-enabled[] block, the
|
||||
# verbatim copy in vulkan_extension_count_test.c must follow.
|
||||
make clean all SANITIZER=address
|
||||
test -x vulkan_extension_count_test
|
||||
timeout 60 ./vulkan_extension_count_test
|
||||
echo "[pass] vulkan_extension_count_test"
|
||||
|
||||
- name: Build and run vulkan_swapchain_clamp_test (ASan)
|
||||
shell: bash
|
||||
working-directory: samples/gfx/vulkan_swapchain_clamp
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the unclamped-swapchain-image-count
|
||||
# fix in gfx/common/vulkan_common.c::vulkan_create_swapchain.
|
||||
# Pre-fix the two vkGetSwapchainImagesKHR calls (count
|
||||
# query + image fill) had no clamp between them, so a driver
|
||||
# returning more than VULKAN_MAX_SWAPCHAIN_IMAGES (16) images
|
||||
# on the second call wrote past context.swapchain_images[16]
|
||||
# and every loop bounded by num_swapchain_images walked past
|
||||
# its compile-time-sized companion array (~12 such loops
|
||||
# across init/deinit/textures/buffers/descriptor pools/
|
||||
# command buffers/readback and direct vk->swapchain[i]
|
||||
# uses). Build under AddressSanitizer so any reintroduction
|
||||
# of either the request-side or the post-create clamp is
|
||||
# caught at the bounds level. If vulkan_common.c amends
|
||||
# the cap or the post-create clamp, the verbatim copies in
|
||||
# vulkan_swapchain_clamp_test.c must follow.
|
||||
make clean all SANITIZER=address
|
||||
test -x vulkan_swapchain_clamp_test
|
||||
timeout 60 ./vulkan_swapchain_clamp_test
|
||||
echo "[pass] vulkan_swapchain_clamp_test"
|
||||
|
||||
- name: Build and run vulkan_texture_size_test (ASan)
|
||||
shell: bash
|
||||
working-directory: samples/gfx/vulkan_texture_size
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the 32-bit-overflow fix in
|
||||
# gfx/drivers/vulkan.c::vulkan_create_texture's staging-
|
||||
# buffer sizing. Pre-fix the buffer_info.size calculation
|
||||
# (buffer_width * height) was unsigned*unsigned in 32-bit
|
||||
# before being widened to VkDeviceSize on assignment. With
|
||||
# dimensions large enough to wrap (e.g. 65536x16385x4 ->
|
||||
# 0x1_0004_0000 truncates to 0x40000), the staging buffer
|
||||
# was malloc'd at the wrapped (small) size while the per-row
|
||||
# upload memcpy loop walked the full width x height,
|
||||
# writing past the mapped region into adjacent heap memory.
|
||||
# Reachable from libretro cores supplying oversized
|
||||
# retro_framebuffer dimensions and from vulkan_load_texture
|
||||
# / vulkan_set_texture_frame. Build under AddressSanitizer
|
||||
# so any reintroduction of the 32-bit arithmetic is caught
|
||||
# at the bounds level. If vulkan.c amends the size
|
||||
# calculation or upload-loop strides, the verbatim copies
|
||||
# in vulkan_texture_size_test.c must follow.
|
||||
make clean all SANITIZER=address
|
||||
test -x vulkan_texture_size_test
|
||||
timeout 60 ./vulkan_texture_size_test
|
||||
echo "[pass] vulkan_texture_size_test"
|
||||
|
||||
- name: Build and run slang_texture_index_bounds_test (ASan)
|
||||
shell: bash
|
||||
working-directory: samples/gfx/slang_texture_index_bounds
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the texture-semantic index-bounds
|
||||
# fix in gfx/drivers_shader/slang_process.cpp::
|
||||
# validate_texture_semantic_index(). Pre-fix only
|
||||
# SLANG_TEXTURE_SEMANTIC_PASS_OUTPUT was bounded against
|
||||
# reflection->pass_number; ORIGINAL_HISTORY, PASS_FEEDBACK
|
||||
# and USER had no upper bound on their array index. The
|
||||
# index suffix in arrayed semantic names like
|
||||
# `OriginalHistory42` is parsed via strtoul in
|
||||
# slang_name_to_texture_semantic_array() and propagates
|
||||
# into the downstream resize_minimum() calls in
|
||||
# set_ubo_texture_offset() and the direct sampler-binding
|
||||
# loop. A malicious slang shader declaring
|
||||
# `OriginalHistory4294967294` makes std::vector::resize
|
||||
# request ~128 GiB, throwing std::bad_alloc which
|
||||
# propagates unhandled out of the filter-chain create
|
||||
# path, terminating the process. Reachable from any
|
||||
# malicious slang preset (downloaded via Online Updater
|
||||
# or shipped third-party). Build under AddressSanitizer
|
||||
# so any reintroduction is caught at the bounds level.
|
||||
# If slang_process.cpp amends the cap table or the
|
||||
# dispatch structure, the verbatim copy in
|
||||
# slang_texture_index_bounds_test.c must follow.
|
||||
make clean all SANITIZER=address
|
||||
test -x slang_texture_index_bounds_test
|
||||
timeout 60 ./slang_texture_index_bounds_test
|
||||
echo "[pass] slang_texture_index_bounds_test"
|
||||
|
||||
- name: Build and run vulkan_mailbox_init_leak_test (ASan + LSan)
|
||||
shell: bash
|
||||
working-directory: samples/gfx/vulkan_mailbox_init_leak
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the partial-init leak fix in
|
||||
# gfx/common/vulkan_common.c::vulkan_emulated_mailbox_init.
|
||||
# Pre-fix the function had three sequential allocations
|
||||
# (scond_new, slock_new, sthread_create) and on any of the
|
||||
# latter two failures returned `false` directly, leaking
|
||||
# the already-allocated cond and/or lock. Both production
|
||||
# call sites in vulkan_create_swapchain ignore the return
|
||||
# value, so an init failure also left vk->mailbox.lock ==
|
||||
# NULL and vk->mailbox.cond == NULL while VK_DATA_FLAG_
|
||||
# EMULATING_MAILBOX was still set, setting up a NULL-deref
|
||||
# the next time vulkan_acquire_next_image routed into
|
||||
# vulkan_emulated_mailbox_acquire_next_image (slock_lock
|
||||
# on a NULL pointer). Fix routes every early failure
|
||||
# through `goto error` to a single deinit call, which is
|
||||
# null-safe and ends with a memset, leaving the struct in
|
||||
# the same shape the deinit-on-shutdown path produces and
|
||||
# tripping the existing `mailbox.swapchain == VK_NULL_
|
||||
# HANDLE` guard at vulkan_acquire_next_image. Build under
|
||||
# AddressSanitizer with leak detection so any
|
||||
# reintroduction is caught at the leak level. If
|
||||
# vulkan_common.c amends the init or deinit, the verbatim
|
||||
# copies in vulkan_mailbox_init_leak_test.c must follow.
|
||||
make clean all SANITIZER=address
|
||||
test -x vulkan_mailbox_init_leak_test
|
||||
ASAN_OPTIONS=detect_leaks=1 timeout 60 \
|
||||
./vulkan_mailbox_init_leak_test
|
||||
echo "[pass] vulkan_mailbox_init_leak_test"
|
||||
|
||||
- name: Build and run vulkan_ctx_double_free_test (ASan)
|
||||
shell: bash
|
||||
working-directory: samples/gfx/vulkan_ctx_double_free
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the double-free / use-after-free
|
||||
# fix in the Vulkan context drivers' set_video_mode error
|
||||
# paths: gfx/drivers_context/wayland_vk_ctx.c,
|
||||
# w_vk_ctx.c, x_vk_ctx.c. Pre-fix each set_video_mode
|
||||
# called its own destroy()/destroy_resources()+free() on
|
||||
# ctx_data before returning false; the caller in
|
||||
# gfx/drivers/vulkan.c::vulkan_init then ran
|
||||
# vulkan_free()->ctx_driver->destroy(ctx_data) on the
|
||||
# already-freed pointer (UAF read of struct fields, then
|
||||
# a second free of the same allocation). Reachable from
|
||||
# vulkan_surface_create() failure (missing extension /
|
||||
# driver issue), Wayland's set_video_mode_common_*
|
||||
# helpers failing, X11's XGetVisualInfo returning NULL,
|
||||
# or win32_set_video_mode failing. Cocoa (cocoa_vk_ctx)
|
||||
# and Android (android_vk_ctx) already handle this
|
||||
# correctly by returning false without freeing -- the
|
||||
# fix makes Wayland/Win32/X11 match. Build under
|
||||
# AddressSanitizer so any reintroduction is caught at
|
||||
# the bounds level (UAF + double-free both fire). If
|
||||
# any of the three context drivers amends the
|
||||
# set_video_mode error path to once again destroy
|
||||
# ctx_data, the verbatim copy in
|
||||
# vulkan_ctx_double_free_test.c must follow.
|
||||
make clean all SANITIZER=address
|
||||
test -x vulkan_ctx_double_free_test
|
||||
timeout 60 ./vulkan_ctx_double_free_test
|
||||
echo "[pass] vulkan_ctx_double_free_test"
|
||||
|
||||
- name: Build and run gfx_thumbnail_status_atomic_test (TSan)
|
||||
shell: bash
|
||||
working-directory: samples/gfx/gfx_thumbnail_status_atomic
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the cross-thread thumbnail status
|
||||
# synchronisation in gfx/gfx_thumbnail.c. The .status
|
||||
# field is read by the video thread (gfx_thumbnail_draw)
|
||||
# and written by the upload-callback thread
|
||||
# (gfx_thumbnail_handle_upload), with a release-store /
|
||||
# acquire-load pairing that guards the texture / width /
|
||||
# height fields published alongside the AVAILABLE
|
||||
# status. Pre-port the file used a hand-rolled
|
||||
# __atomic_* / _Interlocked / volatile shim. Post-port
|
||||
# the .status field is retro_atomic_int_t and the
|
||||
# accesses route through retro_atomic_*_int macros.
|
||||
#
|
||||
# ThreadSanitizer is the right validator for this test:
|
||||
# it instruments every atomic load and store and would
|
||||
# flag a missing-barrier regression as a data race, even
|
||||
# on x86 TSO where the hardware otherwise hides the bug.
|
||||
# ASan/UBSan would not catch barrier removal at all
|
||||
# (no out-of-bounds access, no UB). The test also
|
||||
# carries static-assertion checks that validate the
|
||||
# struct layout invariant (.status size == sizeof(int))
|
||||
# so the field's atomic type does not change the
|
||||
# gfx_thumbnail_t ABI. If gfx_thumbnail.c amends
|
||||
# GFX_THUMB_STATUS_STORE / GFX_THUMB_STATUS_LOAD or the
|
||||
# .status field type, the verbatim copies in
|
||||
# gfx_thumbnail_status_atomic_test.c must follow.
|
||||
#
|
||||
# STRESS_ITERS is bounded here because the default of
|
||||
# 1000000 measures ~145 s on a single core before TSan
|
||||
# multiplies it, and this step allows 60 s. 20000 runs
|
||||
# in ~2.4 s under TSan on one core and still routes every
|
||||
# round trip through the instrumented release/acquire
|
||||
# pair; the default stays at 1000000 for local soak runs.
|
||||
make clean all SANITIZER=thread EXTRA_CFLAGS="-DSTRESS_ITERS=20000"
|
||||
test -x gfx_thumbnail_status_atomic_test
|
||||
TSAN_OPTIONS=halt_on_error=1 timeout 60 \
|
||||
./gfx_thumbnail_status_atomic_test
|
||||
echo "[pass] gfx_thumbnail_status_atomic_test"
|
||||
|
||||
- name: Build and run gfx_widgets_msg_queue_race_test (TSan)
|
||||
shell: bash
|
||||
working-directory: samples/gfx/gfx_widgets_msg_queue_race
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the producer-producer race fix on
|
||||
# dispgfx_widget_t::msg_queue in gfx/gfx_widgets.c.
|
||||
# Pre-fix the FIFO had no dedicated lock: producers could
|
||||
# be invoked from any thread (the threaded task system at
|
||||
# libretro-common/queues/task_queue.c runs a worker
|
||||
# thread; gfx/video_driver.c::video_driver_frame released
|
||||
# RUNLOOP_MSG_QUEUE_LOCK before calling the producer, so
|
||||
# main-thread producers ran unlocked) yet there was no
|
||||
# lock dedicated to msg_queue itself. Post-fix a
|
||||
# msg_queue_lock is acquired around every fifo_write (in
|
||||
# gfx_widgets_msg_queue_push), every fifo_read (in
|
||||
# gfx_widgets_iterate), and the avail-check that gates
|
||||
# them. The outer fast-path FIFO_*_AVAIL checks that
|
||||
# used to wrap the function bodies were dropped: reading
|
||||
# the FIFO cursors outside the lock is itself a data
|
||||
# race against the locked writes (TSan-detectable;
|
||||
# benign on x86 TSO but real on weak-memory hardware).
|
||||
#
|
||||
# ThreadSanitizer is the right validator: it instruments
|
||||
# every memory access on fifo_buffer_t::end and
|
||||
# ::first and would flag a missing-lock regression as a
|
||||
# data race on the producer side, the consumer side, or
|
||||
# the avail check. ASan/UBSan would not catch the lock
|
||||
# removal at all. halt_on_error=1 makes TSan exit
|
||||
# non-zero on the first observed race, which is what we
|
||||
# want for CI: any race here means the production
|
||||
# locking discipline is broken.
|
||||
#
|
||||
# The test mirrors the post-fix locking protocol of
|
||||
# gfx_widgets_msg_queue_push and gfx_widgets_iterate's
|
||||
# FIFO interaction; the widget allocation, font
|
||||
# measurement, and animation push that wrap the actual
|
||||
# FIFO calls in production are not part of the race and
|
||||
# are stripped from the test. If gfx_widgets.c amends
|
||||
# the locking around msg_queue, the verbatim copies in
|
||||
# gfx_widgets_msg_queue_race_test.c must follow.
|
||||
make clean all SANITIZER=thread
|
||||
test -x gfx_widgets_msg_queue_race_test
|
||||
TSAN_OPTIONS=halt_on_error=1 timeout 60 \
|
||||
./gfx_widgets_msg_queue_race_test
|
||||
echo "[pass] gfx_widgets_msg_queue_race_test"
|
||||
|
||||
- name: Build and run gfx_animation_sanitize_test (ASan + UBSan)
|
||||
shell: bash
|
||||
working-directory: samples/gfx/gfx_animation_sanitize
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the stack overflow in
|
||||
# gfx/gfx_animation.c::gfx_animation_ticker(). Pre-fix it
|
||||
# passed PATH_MAX_LENGTH to utf8cpy() as the destination
|
||||
# size, in all five places it copies, regardless of what the
|
||||
# caller had provided. utf8cpy()'s second argument is a
|
||||
# size in BYTES; ticker->len, which the surrounding logic
|
||||
# uses, is a width in GLYPHS -- so the guard
|
||||
# `str_len <= ticker->len` compared glyph counts and then
|
||||
# copied bytes, and one glyph of CJK or emoji is three or
|
||||
# four of them. PATH_MAX_LENGTH is 512 and not one of the
|
||||
# 27 call sites in tree provides that much (mostly
|
||||
# NAME_MAX_LENGTH, 64 bytes in one RGUI case), so the
|
||||
# function was licensed to write 511 bytes plus a
|
||||
# terminator into any of them. Reachable from content: RGUI
|
||||
# sets ticker.len from term_layout.width and ticker.s to a
|
||||
# NAME_MAX_LENGTH stack buffer, so a playlist entry with a
|
||||
# long enough Japanese, Cyrillic or emoji title overran it.
|
||||
# Fixed by giving the struct an s_len field carrying the
|
||||
# destination size in bytes, mirroring the dst_str_len that
|
||||
# gfx_animation_ticker_smooth() had all along.
|
||||
#
|
||||
# AddressSanitizer is the validator: the test allocates
|
||||
# every ticker destination at exactly the length it hands
|
||||
# over, so a single byte past the end is a report rather
|
||||
# than a stomp on whatever followed. It also sweeps every
|
||||
# easing type through push/update/expire, frees animation
|
||||
# subjects while their animation is in flight, and deinits
|
||||
# with animations still running. If gfx_animation.c amends
|
||||
# the destination sizing, this goes red.
|
||||
make clean all SANITIZER=address,undefined
|
||||
test -x gfx_animation_sanitize_test
|
||||
ASAN_OPTIONS=detect_leaks=1 timeout 120 \
|
||||
./gfx_animation_sanitize_test
|
||||
echo "[pass] gfx_animation_sanitize_test"
|
||||
|
||||
|
||||
- name: Build and run gfx_widgets_sanitize_test (ASan + UBSan)
|
||||
shell: bash
|
||||
working-directory: samples/gfx/gfx_widgets_sanitize
|
||||
run: |
|
||||
set -eu
|
||||
# Sanitizer sweep of gfx/gfx_widgets.c, focused on the
|
||||
# message queue: it has the same shape as the
|
||||
# gfx_animation ticker overflow -- a caller-supplied
|
||||
# string, internal fixed buffers, and arithmetic that has
|
||||
# to keep glyphs and bytes apart. Multi-byte text,
|
||||
# over-long text, text with no break opportunity, embedded
|
||||
# newlines and empty strings across every message/title
|
||||
# pairing, a 256-message overflow to drive eviction and
|
||||
# free, and eight init/deinit cycles with messages still
|
||||
# outstanding at teardown.
|
||||
#
|
||||
# Like the thumbnail sweep this pins no historical defect
|
||||
# and is a tripwire. Two things decide whether it sweeps
|
||||
# anything: the font metric stubs return a non-zero
|
||||
# proportional width (a zero-width font makes every "does
|
||||
# this fit" test succeed and the layout paths are never
|
||||
# entered), and gfx_widgets_init() returning false makes
|
||||
# the whole run vacuous -- hence the asserted push and
|
||||
# frame counters.
|
||||
make clean all SANITIZER=address,undefined
|
||||
test -x gfx_widgets_sanitize_test
|
||||
ASAN_OPTIONS=detect_leaks=1 timeout 120 \
|
||||
./gfx_widgets_sanitize_test
|
||||
echo "[pass] gfx_widgets_sanitize_test (ASan)"
|
||||
make clean all SANITIZER=thread
|
||||
TSAN_OPTIONS=halt_on_error=1 timeout 120 \
|
||||
./gfx_widgets_sanitize_test
|
||||
echo "[pass] gfx_widgets_sanitize_test (TSan)"
|
||||
- name: Build and run display_servers_test (ASan + UBSan)
|
||||
shell: bash
|
||||
working-directory: samples/gfx/display_servers
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the XRandR query handling in
|
||||
# gfx/display_servers/dispserv_x11.c. Pre-fix every query
|
||||
# was treated as infallible: XRRGetOutputInfo() returns NULL
|
||||
# for an output the server cannot describe and
|
||||
# info->connection was read straight off it; likewise
|
||||
# XRRGetCrtcInfo() and crtc->width, XRRGetScreenResources(),
|
||||
# and XRRGetScreenInfo() feeding a XRRFreeScreenConfigInfo()
|
||||
# that is not NULL-tolerant. On any X server advertising
|
||||
# RandR without a usable output -- Xvfb, a headless box, a
|
||||
# display with everything disconnected -- RetroArch died
|
||||
# inside video_display_server_init() before drawing
|
||||
# anything. Both orientation walks also indexed
|
||||
# screen->crtcs with the output's ncrtc, reading past the
|
||||
# end and then configuring a crtc other than the one whose
|
||||
# geometry had just been read.
|
||||
#
|
||||
# The test stubs libXrandr and the handful of Xlib entry
|
||||
# points the driver reaches, so it needs the headers but no
|
||||
# X server, no display and no RandR extension: what is under
|
||||
# test is what happens when the queries FAIL, and a working
|
||||
# display is exactly the environment that cannot produce
|
||||
# that. The stub numbers screen crtcs from 100 and output
|
||||
# crtcs from 200 so which array was walked is read off the
|
||||
# call log, and tracks every pointer it hands out so a
|
||||
# double free or leak is attributed to the case that caused
|
||||
# it. If dispserv_x11.c amends the query handling, this
|
||||
# goes red.
|
||||
make clean all SANITIZER=address,undefined
|
||||
test -x display_servers_test
|
||||
timeout 60 ./display_servers_test
|
||||
echo "[pass] display_servers_test"
|
||||
|
||||
- name: Build and run display_servers_kms_test (ASan + UBSan)
|
||||
shell: bash
|
||||
working-directory: samples/gfx/display_servers_kms
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for two defects in
|
||||
# gfx/display_servers/dispserv_kms.c::
|
||||
# kms_display_server_get_resolution_list(). g_drm_connector
|
||||
# is owned by gfx/common/drm_common.c and set to NULL by
|
||||
# drm_free(), which runs on every context teardown -- a
|
||||
# resolution change, a fullscreen toggle, a driver reinit --
|
||||
# while the display server object outlives it, so the menu
|
||||
# could ask for the list with no connector to describe and
|
||||
# the function read straight through NULL. g_drm_mode, the
|
||||
# sibling global, was already tested for exactly this a few
|
||||
# lines earlier. Separately the qsort() at the end was
|
||||
# passed `count`, which was declared zero and never
|
||||
# assigned; `j` is the element count. So the sort ran over
|
||||
# zero elements and the resolution list came back in
|
||||
# whatever order the connector reported its modes -- no
|
||||
# crash, no diagnostic, just an unsorted list that looks
|
||||
# plausible.
|
||||
#
|
||||
# The test fabricates the drmModeConnector the driver reads,
|
||||
# so it needs the libdrm headers but links nothing from
|
||||
# libdrm: presenting a connector that is absent, empty, or
|
||||
# reporting modes in an awkward order is the whole exercise
|
||||
# and a real one will not do it on request. The ordering
|
||||
# check feeds modes in descending size, which a working sort
|
||||
# must reverse and a broken one leaves untouched. If
|
||||
# dispserv_kms.c amends either, this goes red.
|
||||
make clean all SANITIZER=address,undefined
|
||||
test -x display_servers_kms_test
|
||||
timeout 60 ./display_servers_kms_test
|
||||
echo "[pass] display_servers_kms_test"
|
||||
|
||||
- name: Build and run gfx_thumbnail_anim_test (ASan + UBSan, TSan)
|
||||
shell: bash
|
||||
working-directory: samples/gfx/gfx_thumbnail_anim
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the two faults that froze animated
|
||||
# thumbnails in the file browser, in gfx/gfx_thumbnail.c.
|
||||
#
|
||||
# gfx_thumbnail_request_file malloc'd its tag and never set
|
||||
# tag->path, so gfx_thumbnail_anim_open - which
|
||||
# gfx_thumbnail_handle_upload feeds that field for every
|
||||
# load with no video stream to adopt - read uninitialised
|
||||
# heap and returned without touching the file. Undefined
|
||||
# behaviour rather than a stable failure: a freed tag is
|
||||
# the size of the next one, so the allocator commonly
|
||||
# handed back a block still holding the previous entry's
|
||||
# path, which opened an animation and looked like the
|
||||
# feature working. gfx_thumbnail_request fills the field
|
||||
# for playlist entries, which is why playlists animated and
|
||||
# the browser did not.
|
||||
#
|
||||
# Separately, anim_install marked windowed animations
|
||||
# 'read pending' via !data_transfer_complete(). A window
|
||||
# never completes - done stays clear for its whole life -
|
||||
# and the pump animate() uses (iterate_while) declines
|
||||
# windows by design, so pending forced the pump branch, the
|
||||
# pump was a no-op, and animate() returned before ever
|
||||
# advancing a frame, every vsync, forever. That is every
|
||||
# path-based open: animated WEBP, APNG, and any WEBM/MP4
|
||||
# with no still stream to adopt.
|
||||
#
|
||||
# The oracle links the real gfx_thumbnail.c and measures
|
||||
# animation as DISTINCT FRAMES REACHING THE TEXTURE - the
|
||||
# video-driver stub CRCs every upload - not as internal
|
||||
# flags, which is what every earlier test in this area got
|
||||
# wrong and why neither fault was caught. A 188-byte
|
||||
# 3-frame lossless WEBP is embedded, so there are no
|
||||
# fixtures. One lane drives anim_open with a garbage path
|
||||
# and requires no stream; one opens the real animation and
|
||||
# requires multiple distinct uploads within bounded paced
|
||||
# vsyncs, naming the windowed+pending deadlock explicitly
|
||||
# before the timeout would. Both pre-fix trees score zero
|
||||
# uploads in 240 vsyncs. If gfx_thumbnail.c amends the
|
||||
# pending decision or the request plumbing, this goes red.
|
||||
make clean all SANITIZER=address,undefined
|
||||
test -x gfx_thumbnail_anim_test
|
||||
ASAN_OPTIONS=detect_leaks=1 timeout 120 \
|
||||
./gfx_thumbnail_anim_test
|
||||
echo "[pass] gfx_thumbnail_anim_test (ASan)"
|
||||
make clean all SANITIZER=thread
|
||||
TSAN_OPTIONS=halt_on_error=1 timeout 120 \
|
||||
./gfx_thumbnail_anim_test
|
||||
echo "[pass] gfx_thumbnail_anim_test (TSan)"
|
||||
@@ -1,824 +0,0 @@
|
||||
name: CI Linux samples/tasks
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
samples-tasks:
|
||||
name: Build and run samples/tasks
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y build-essential zlib1g-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build database_task
|
||||
shell: bash
|
||||
working-directory: samples/tasks/database
|
||||
run: |
|
||||
set -eu
|
||||
make clean all
|
||||
test -x database_task
|
||||
|
||||
- name: Smoke-test database_task argv parsing
|
||||
shell: bash
|
||||
working-directory: samples/tasks/database
|
||||
run: |
|
||||
set -u
|
||||
# database_task with no args should print the usage line and
|
||||
# exit non-zero. This catches build regressions in the argv
|
||||
# parsing / main() entry path without depending on the task
|
||||
# queue actually running to completion -- task_push_dbscan
|
||||
# delegates to task_push_manual_content_scan which does not
|
||||
# plumb through the caller's completion callback, so the
|
||||
# loop can only be terminated externally (by timeout or
|
||||
# signal). The full loop is exercised in local testing; in
|
||||
# CI we settle for the argv smoke.
|
||||
#
|
||||
# We capture the exit status via "|| rc=$?" so that the
|
||||
# expected non-zero exit does NOT trip the default "set -e"
|
||||
# that GitHub Actions' bash shell injects (it wraps with
|
||||
# "bash --noprofile --norc -eo pipefail"). Without this
|
||||
# guard the step exits at the binary invocation before our
|
||||
# assertion runs.
|
||||
rc=0
|
||||
./database_task > /dev/null 2>&1 || rc=$?
|
||||
if [[ $rc -eq 0 ]]; then
|
||||
echo "::error title=Test failed::database_task with no args exited 0; expected non-zero (usage)"
|
||||
exit 1
|
||||
fi
|
||||
echo "[pass] database_task no-args exit=$rc (expected non-zero)"
|
||||
|
||||
- name: Build and run archive_name_safety_test
|
||||
shell: bash
|
||||
working-directory: samples/tasks/decompress
|
||||
run: |
|
||||
set -eu
|
||||
make clean all
|
||||
test -x archive_name_safety_test
|
||||
# Regression test for the Zip Slip / absolute-path defences
|
||||
# in tasks/task_decompress.c::archive_name_is_safe(). The
|
||||
# test keeps a verbatim copy of the predicate and runs it
|
||||
# against 23 safe and unsafe inputs. If task_decompress.c
|
||||
# ever amends the predicate, the copy here must follow.
|
||||
timeout 60 ./archive_name_safety_test
|
||||
echo "[pass] archive_name_safety_test"
|
||||
|
||||
- name: Build and run http_method_match_test (ASan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/http
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the heap-buffer-overflow fix in
|
||||
# tasks/task_http.c::task_push_http_transfer_generic().
|
||||
# Pre-fix, an unsafe memcmp(method, "GET", 3) read past
|
||||
# the strdup'd buffer when method was NULL or shorter
|
||||
# than 3 bytes. Build under AddressSanitizer so a
|
||||
# regression to the unsafe expression is caught at the
|
||||
# bounds level, not just the truth-table level. If
|
||||
# task_http.c amends the GET-dispatch predicate, the
|
||||
# copy in http_method_match_test.c must follow.
|
||||
make clean all SANITIZER=address
|
||||
test -x http_method_match_test
|
||||
timeout 60 ./http_method_match_test
|
||||
echo "[pass] http_method_match_test"
|
||||
|
||||
- name: Build and run video_shader_wildcard_test (ASan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/video_shader_parse
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the buffer-overflow defences in
|
||||
# gfx/video_shader_parse.c::video_shader_replace_wildcards_impl().
|
||||
# Pre-fix, _len = strlcpy(replace_text, source, 256)
|
||||
# returned strlen(source) regardless of the 256-byte
|
||||
# cap. When source was a $CONTENT-DIR$ / $PRESET-DIR$
|
||||
# / $CORE$ value longer than 256 bytes (DIR_MAX_LENGTH
|
||||
# is 4096, NAME_MAX_LENGTH 256), the subsequent
|
||||
# memcpy(dst + prefix, replace_text, _len) read off
|
||||
# the end of replace_text and the strlcpy's size
|
||||
# argument PATH_MAX_LENGTH - prefix - _len underflowed
|
||||
# size_t. Build under AddressSanitizer so the OOB
|
||||
# read on replace_text and the underflow-driven OOB
|
||||
# write on dst are both caught at the bounds level.
|
||||
# If video_shader_parse.c amends the post-replacement
|
||||
# arithmetic, the verbatim copy in
|
||||
# video_shader_wildcard_test.c must follow.
|
||||
make clean all SANITIZER=address
|
||||
test -x video_shader_wildcard_test
|
||||
timeout 60 ./video_shader_wildcard_test
|
||||
echo "[pass] video_shader_wildcard_test"
|
||||
|
||||
- name: Build and run input_remap_bounds_test (ASan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/input_remap
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the input-remap analog-axis OOB-
|
||||
# write fixes in configuration.c::input_remapping_load_file()
|
||||
# and input/input_driver.c. Pre-fix a malformed .rmp
|
||||
# could supply a remap target outside [0, RARCH_ANALOG_
|
||||
# BIND_LIST_END), which the use sites in input_driver.c
|
||||
# then indexed into a fixed-size analog_value[][8] array
|
||||
# without bounds (button -> analog branch) or with a
|
||||
# broken bound that compared elements against bytes
|
||||
# (analog -> analog branch using sizeof instead of
|
||||
# ARRAY_SIZE). Build under AddressSanitizer so any
|
||||
# reintroduction of either primitive is caught at the
|
||||
# bounds level. If configuration.c or input_driver.c
|
||||
# amends the relevant predicates, the verbatim copies
|
||||
# in input_remap_bounds_test.c must follow.
|
||||
make clean all SANITIZER=address
|
||||
test -x input_remap_bounds_test
|
||||
timeout 60 ./input_remap_bounds_test
|
||||
echo "[pass] input_remap_bounds_test"
|
||||
|
||||
- name: Build and run bsv_replay_bounds_test (ASan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/bsv_replay
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the .bsv replay-file event-count
|
||||
# bounds in input/bsv/bsvmovie.c. Pre-fix a malformed
|
||||
# replay file with key_event_count > 128 or
|
||||
# input_event_count > 512 caused a heap-buffer-overflow
|
||||
# write into bsv_movie_t (a calloc'd struct) with
|
||||
# attacker-chosen 8/12-byte payloads at attacker-chosen
|
||||
# offsets up to ~500KB. Build under AddressSanitizer
|
||||
# so any reintroduction of the unbounded count is caught
|
||||
# at the bounds level. If input/bsv/bsvmovie.c amends
|
||||
# the predicate, the verbatim copy in
|
||||
# bsv_replay_bounds_test.c must follow.
|
||||
make clean all SANITIZER=address
|
||||
test -x bsv_replay_bounds_test
|
||||
timeout 60 ./bsv_replay_bounds_test
|
||||
echo "[pass] bsv_replay_bounds_test"
|
||||
|
||||
- name: Build and run bps_patch_bounds_test (ASan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/bps_patch
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the .bps patch parser bounds in
|
||||
# tasks/task_patch.c::bps_apply_patch. Pre-fix a
|
||||
# malicious .bps could write attacker-chosen bytes
|
||||
# past the malloc'd target_data buffer (heap-buffer-
|
||||
# overflow WRITE), read past source_data (info leak),
|
||||
# and read past modify_data via TARGET_READ. The
|
||||
# size-prelude was also unbounded, allowing 32-bit
|
||||
# truncation of modify_target_size to drive a
|
||||
# smaller-than-expected allocation. Build under
|
||||
# AddressSanitizer so any reintroduction is caught
|
||||
# at the bounds level. If task_patch.c amends the
|
||||
# action-loop predicates, the verbatim copy in
|
||||
# bps_patch_bounds_test.c must follow.
|
||||
make clean all SANITIZER=address
|
||||
test -x bps_patch_bounds_test
|
||||
timeout 60 ./bps_patch_bounds_test
|
||||
echo "[pass] bps_patch_bounds_test"
|
||||
|
||||
- name: Build and run patch_stream_test (ASan/UBSan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/patch_stream
|
||||
run: |
|
||||
set -eu
|
||||
# Differential harness for the streaming patch appliers in
|
||||
# tasks/patch_stream.c. Each streamed applier must produce
|
||||
# output byte-identical to the whole-buffer applier it
|
||||
# mirrors in tasks/task_patch.c, at every chunk size - the
|
||||
# oracle for IPS, UPS and BPS is a copy of that whole-buffer
|
||||
# logic held in the test, so if task_patch.c changes its
|
||||
# appliers the copy has to follow. The .xdelta case checks
|
||||
# the delegation to the VCDIFF decoder instead, since that
|
||||
# decoder is verified separately against the reference
|
||||
# implementation.
|
||||
#
|
||||
# The cases that matter most are the ones a whole-buffer
|
||||
# applier cannot have: an empty source, a source that ends
|
||||
# short of its declared length, and chunk boundaries landing
|
||||
# inside a patch command. A truncated feed must be refused
|
||||
# rather than answered with a target built from a partial
|
||||
# source.
|
||||
make clean all SANITIZER=address,undefined
|
||||
test -x patch_stream_test
|
||||
timeout 900 ./patch_stream_test
|
||||
echo "[pass] patch_stream_test"
|
||||
|
||||
- name: Build and run task_file_transfer_test (ASan + UBSan, TSan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/file_transfer
|
||||
run: |
|
||||
set -eu
|
||||
# Oracle for tasks/task_file_transfer.c, compiled from the
|
||||
# tree so it exercises the shipping translation unit. The
|
||||
# handler is a switch whose states advance at most one step
|
||||
# per tick, so what matters is how many ticks a load takes,
|
||||
# whether every input reaches a terminal at all, and what a
|
||||
# caller reading task_get_progress() sees on the way - a
|
||||
# test that only checks the bytes passes on every defect
|
||||
# below. Lanes run to a tick cap rather than looping, so a
|
||||
# task that never finishes reports instead of hanging CI.
|
||||
#
|
||||
# Pinned here: a NULL path and a parse callback that
|
||||
# returns success without setting is_finished, both of
|
||||
# which once left the task running forever with no flag set
|
||||
# (a per-frame call under the regular queue, a hot spin on
|
||||
# the worker thread under the threaded one); progress
|
||||
# reaching 100 on every completion path, not just the
|
||||
# single-tick one; the tick that opens the file also
|
||||
# reading, which one byte either side of the threshold used
|
||||
# to decide; a file truncated underneath an in-flight fill
|
||||
# cancelling rather than parsing a buffer whose tail was
|
||||
# never written; and every audio type reaching the mixer
|
||||
# arm, since M4A and OPUS were once absent from that switch
|
||||
# while both push paths set them, so those sounds loaded
|
||||
# and silently did not play.
|
||||
#
|
||||
# Two lanes guard the 256 MiB prefix cap that cancelled
|
||||
# every large non-faststart video. The real-demuxer lane
|
||||
# pins the premise the cap got wrong: a genuine h264 MP4
|
||||
# (real ftyp/mdat/moov, real coded frames) is written with
|
||||
# a ~300 MiB free box pushing moov to EOF - a valid file,
|
||||
# the layout most cameras produce - and the real rmp4, via
|
||||
# image_transfer's avail-aware open, must answer need_more
|
||||
# on a 1 MiB prefix and decode real frames once fully
|
||||
# resident. Anyone restoring a prefix ceiling on the
|
||||
# "a still only needs a few per cent" argument is refuted
|
||||
# by that lane directly. The task lane pins the
|
||||
# mechanism: a still ready only at EOF, over a 300 MiB
|
||||
# file, must finish uncancelled with every byte resident.
|
||||
# On the capped tree it stops at exactly 268435456 and
|
||||
# cancels - no thumbnail, no animation - and the oracle
|
||||
# exits non-zero.
|
||||
#
|
||||
# The conc lane runs disjoint handles on many threads at
|
||||
# once. data_transfer synchronises nothing by design and
|
||||
# the task layer gives one handle to one task, so it is not
|
||||
# looking for contention on a shared handle - it checks
|
||||
# that the spine keeps no hidden static state, which a
|
||||
# sanitizer build can answer and inspection cannot.
|
||||
make clean all SANITIZER=address,undefined
|
||||
test -x task_file_transfer_test
|
||||
ASAN_OPTIONS=detect_leaks=1:detect_stack_use_after_return=1 \
|
||||
UBSAN_OPTIONS=print_stacktrace=1 timeout 600 \
|
||||
./task_file_transfer_test
|
||||
ASAN_OPTIONS=detect_leaks=1 timeout 600 \
|
||||
./task_file_transfer_test conc
|
||||
echo "[pass] task_file_transfer_test (ASan)"
|
||||
make clean all SANITIZER=thread
|
||||
TSAN_OPTIONS=halt_on_error=1 timeout 600 \
|
||||
./task_file_transfer_test
|
||||
TSAN_OPTIONS=halt_on_error=1 timeout 600 \
|
||||
./task_file_transfer_test conc
|
||||
echo "[pass] task_file_transfer_test (TSan)"
|
||||
|
||||
- name: Build and run core_crc_slice_test (ASan + UBSan, TSan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/core_updater
|
||||
run: |
|
||||
set -eu
|
||||
# Oracle for the resumable CRC in
|
||||
# libretro-common/streams/interface_stream.c and the sliced
|
||||
# hashing loop tasks/task_core_updater.c drives it with.
|
||||
#
|
||||
# intfstream_get_crc() consumes a whole stream in one call,
|
||||
# so the cost of the tick that invoked it was a function of
|
||||
# core size and nothing else - 43ms for a 40MB core measured
|
||||
# cold on NVMe, an order of magnitude worse on the SD-card
|
||||
# and spinning-disk targets, and the updater hashes the
|
||||
# installed core on every update check. intfstream_crc_step()
|
||||
# hashes a bounded slice and resumes, so the work spreads
|
||||
# across ticks.
|
||||
#
|
||||
# The property that needs pinning is not "the CRC is
|
||||
# correct" - a whole-stream call gets that right too - but
|
||||
# that no single tick hashes the whole file while the answer
|
||||
# still matches the unsliced value at every chunk size,
|
||||
# including sizes that do not divide the file evenly and a
|
||||
# final slice of one byte. Both are asserted against
|
||||
# intfstream_get_crc() as the oracle.
|
||||
make clean all
|
||||
test -x core_crc_slice_test
|
||||
timeout 600 ./core_crc_slice_test
|
||||
echo "[pass] core_crc_slice_test"
|
||||
make clean all SANITIZER=address,undefined
|
||||
ASAN_OPTIONS=detect_leaks=1:detect_stack_use_after_return=1 \
|
||||
UBSAN_OPTIONS=print_stacktrace=1 timeout 600 \
|
||||
./core_crc_slice_test
|
||||
echo "[pass] core_crc_slice_test (ASan)"
|
||||
make clean all SANITIZER=thread
|
||||
TSAN_OPTIONS=halt_on_error=1 timeout 600 ./core_crc_slice_test
|
||||
make clean
|
||||
echo "[pass] core_crc_slice_test (TSan)"
|
||||
|
||||
- name: Build and run core_backup_io_test (ASan + UBSan, TSan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/core_backup
|
||||
run: |
|
||||
set -eu
|
||||
# Oracle for the file I/O in tasks/task_core_backup.c,
|
||||
# compiled from the tree so it exercises the shipping
|
||||
# translation unit. As in save_state and
|
||||
# image_decode_slice, the clock is the test's instrument:
|
||||
# cpu_features_get_time_usec is wrapped so the tick budget is
|
||||
# assertable exactly rather than measured against a wall
|
||||
# clock.
|
||||
#
|
||||
# The throughput lanes pin the budget that replaced a fixed
|
||||
# one-quantum-per-tick loop: a 4KB quantum capped a backup at
|
||||
# ~245KB/s whatever the device could do, and an automatic
|
||||
# backup runs on every core update over cores that are
|
||||
# routinely tens of megabytes. The exhausted-budget lane
|
||||
# asserts the floor from the other side - with a clock that
|
||||
# spends the budget on its first observation the handler must
|
||||
# still move exactly one quantum per tick and still produce a
|
||||
# correct backup, which is the old behaviour reached through
|
||||
# the new code and what the slowest supported storage gets.
|
||||
#
|
||||
# The read-amplification lane counts bytes at the VFS
|
||||
# boundary, which is the only place they can be counted:
|
||||
# interposing libc read()/write() silently reports zero here,
|
||||
# because glibc's stdio reaches them through internal aliases
|
||||
# that never go via the PLT. It measures 2x when the CRC is
|
||||
# unknown - the handler hashes the core to name the backup,
|
||||
# then reads it again to copy it - and 1x when the caller
|
||||
# supplies a CRC. The second figure is the one that matters:
|
||||
# tasks/task_core_updater.c hands its already-computed
|
||||
# local_crc to the automatic backup precisely so that pass is
|
||||
# skipped, and nothing in the type system enforces it. Pass
|
||||
# 0 from the updater and every automatic backup silently
|
||||
# doubles its read I/O.
|
||||
#
|
||||
# The restore lane round-trips a backup byte for byte. It is
|
||||
# worth noting why it is asserted rather than skipped: it
|
||||
# used to skip, silently, on every run. The suite stubbed
|
||||
# frontend_driver_get_core_extension() with the wrong
|
||||
# signature - const char *f(void) against the real
|
||||
# bool f(char *, size_t) - which compiles, because nothing
|
||||
# includes the real declaration, but left core_backup.c
|
||||
# comparing an extension against uninitialised stack. Every
|
||||
# archive read as CORE_BACKUP_TYPE_INVALID,
|
||||
# task_push_core_restore() refused, and the lane printed SKIP
|
||||
# while the suite reported PASSED. Both refusal paths are
|
||||
# now CHECK failures: a fixture this test builds itself
|
||||
# cannot legitimately be unavailable to it.
|
||||
make clean all
|
||||
test -x core_backup_io_test
|
||||
timeout 600 ./core_backup_io_test
|
||||
echo "[pass] core_backup_io_test"
|
||||
make clean all SANITIZER=address,undefined
|
||||
ASAN_OPTIONS=detect_leaks=1:detect_stack_use_after_return=1 \
|
||||
UBSAN_OPTIONS=print_stacktrace=1 timeout 600 \
|
||||
./core_backup_io_test
|
||||
echo "[pass] core_backup_io_test (ASan)"
|
||||
make clean all SANITIZER=thread
|
||||
TSAN_OPTIONS=halt_on_error=1 timeout 600 ./core_backup_io_test
|
||||
make clean
|
||||
echo "[pass] core_backup_io_test (TSan)"
|
||||
|
||||
- name: Build and run image_decode_slice_test (ASan + UBSan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/image_decode_slice
|
||||
run: |
|
||||
set -eu
|
||||
# Oracle for the shared decode window in tasks/task_image.c,
|
||||
# compiled from the tree so it exercises the shipping
|
||||
# translation unit. The clock is the test's instrument: the
|
||||
# sample provides cpu_features_get_time_usec() itself,
|
||||
# advancing a fixed quantum per observation, so the decode
|
||||
# loops are budget-bound deterministically and the cost of a
|
||||
# gather is readable as the fake-clock delta across
|
||||
# task_queue_check() - no wall-clock measurement, no
|
||||
# flakiness.
|
||||
#
|
||||
# The regression it pins has two faces, both verified to
|
||||
# fail it: the pre-window code, where eight concurrent
|
||||
# decodes each took a full frame_duration per gather (~8
|
||||
# frames of decode in one gather), and the subtler
|
||||
# period == allowance variant of the window itself, where a
|
||||
# task that spends its whole allowance has aged the window a
|
||||
# full period and the next task in the same gather resets
|
||||
# it - the multiplication surviving a fix that reads
|
||||
# correct. That variant passed inspection and failed
|
||||
# simulation, which is why this oracle asserts on measured
|
||||
# gather cost rather than on the code's shape.
|
||||
#
|
||||
# It also checks the decode itself end to end - dimensions
|
||||
# and a pixel spot-check on every delivered image - so the
|
||||
# budget rework cannot silently break what it budgets.
|
||||
make clean all
|
||||
test -x image_decode_slice_test
|
||||
timeout 600 ./image_decode_slice_test
|
||||
echo "[pass] image_decode_slice_test"
|
||||
make clean all SANITIZER=address,undefined
|
||||
ASAN_OPTIONS=detect_leaks=1:detect_stack_use_after_return=1 \
|
||||
UBSAN_OPTIONS=print_stacktrace=1 timeout 600 \
|
||||
./image_decode_slice_test
|
||||
echo "[pass] image_decode_slice_test (ASan)"
|
||||
|
||||
- name: Build and run save_state_io_test (ASan + UBSan, TSan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/save_state
|
||||
run: |
|
||||
set -eu
|
||||
# Oracle for the file I/O in tasks/task_save.c, compiled
|
||||
# from the tree so it exercises the shipping translation
|
||||
# unit. As in image_decode_slice, the clock is the test's
|
||||
# instrument: the sample provides
|
||||
# cpu_features_get_time_usec() itself, advancing a fixed
|
||||
# step per observation, so the tick budget is assertable
|
||||
# exactly rather than measured against a wall clock. Step 0
|
||||
# is a budget that never expires; step >= the budget is one
|
||||
# that expires on first observation.
|
||||
#
|
||||
# The throughput regression it pins: both handlers used to
|
||||
# transfer exactly one SAVE_STATE_CHUNK per queue tick,
|
||||
# which caps a save at chunk * tick_rate (~6 MB/s) whatever
|
||||
# the device can do - a 16 MB state took 164 ticks, 2.7s at
|
||||
# 60Hz, while one 100 KB write costs ~62us of a 16667us
|
||||
# frame. A tick is now bounded by time and transfers as
|
||||
# many quanta as fit. Because a time budget is only an
|
||||
# improvement if it cannot be worse than the fixed count it
|
||||
# replaced, the exhausted-budget lane asserts the fallback
|
||||
# directly: with a clock that spends the budget on its first
|
||||
# observation the handler must still transfer exactly one
|
||||
# quantum per tick and still produce a correct file. That
|
||||
# is the old behaviour reached through the new code, and it
|
||||
# is what the slowest supported storage gets.
|
||||
#
|
||||
# The rest are the defects the audit turned up, each
|
||||
# verified to fail this oracle on the pre-fix tree:
|
||||
#
|
||||
# - The rastate block walker looped on 'input < stop', so
|
||||
# it could enter the body with one byte left and read the
|
||||
# block length out of input[4..7] - six bytes past the
|
||||
# end. content_deserialize_state had the same shape one
|
||||
# level up, reading seven bytes of magic and input[7] for
|
||||
# the version with no length check at all. Savestates
|
||||
# are shared, synced and recovered off failing media, and
|
||||
# the load handler's own short-read path produces exactly
|
||||
# this buffer, so this is a format parser on hostile
|
||||
# input. ASan reports both for any state truncated to
|
||||
# 9..15 bytes.
|
||||
#
|
||||
# - A block's declared 32-bit length was never checked
|
||||
# against the bytes actually remaining and was then
|
||||
# passed to core_unserialize as the size of the buffer at
|
||||
# that offset. The stub core here reads every byte it is
|
||||
# told the buffer holds before judging the size, exactly
|
||||
# as a real core does, so ASan - not the stub's own
|
||||
# opinion - is what catches an over-long block. A stub
|
||||
# that checked size first would pass against the unfixed
|
||||
# walker.
|
||||
#
|
||||
# - That length was also assembled as input[7] << 24 on an
|
||||
# int, undefined for every top byte >= 0x80, i.e. every
|
||||
# length at or above 2 GB - the range a corrupt length
|
||||
# lands in, and the value the bound check is asked to
|
||||
# trust. UBSan is the assertion.
|
||||
#
|
||||
# - A failed core_serialize left data NULL and size 0, at
|
||||
# which point every test in the save handler read as
|
||||
# success and the task reported COMPLETED. The file had
|
||||
# already been opened and truncated, so the user was told
|
||||
# the save succeeded and the slot held zero bytes.
|
||||
#
|
||||
# - A failed open was a bare return: not errored, not
|
||||
# finished, so the queue re-entered the task every tick
|
||||
# and it retried forever. Save tasks are
|
||||
# TASK_TYPE_BLOCKING, so that one task held the single
|
||||
# blocking slot for the rest of the session - no state
|
||||
# could be saved or loaded again without a restart. The
|
||||
# exclusion rule that makes it severe is itself pinned,
|
||||
# together with the cleanup the refusal path owes (the
|
||||
# task, its title, the state struct and the caller's
|
||||
# serialized buffer), which is why leak detection is on.
|
||||
#
|
||||
# The undo-snapshot lane is the one that needs the counting
|
||||
# allocator (-Wl,--wrap=malloc in the sample's Makefile).
|
||||
# content_load_state_cb retakes the undo snapshot on every
|
||||
# state load, and that capture used to free its destination
|
||||
# and malloc a new one each time; it now keeps the outgoing
|
||||
# allocation as a spare and swaps the two. Pointer identity
|
||||
# cannot see the difference - a state-sized block is mmap'd,
|
||||
# munmap hands the region back, and the next request of the
|
||||
# same size is usually given the same address - so a run of
|
||||
# captures looks identical either way while only one of them
|
||||
# pays the first-touch faults. Counting state-sized malloc
|
||||
# calls is the discriminator: eight captures allocate two
|
||||
# buffers after the change and eight before it.
|
||||
#
|
||||
# The conc lane runs the same round-trip under a threaded
|
||||
# queue, where the transfer loop executes on the worker
|
||||
# while content_deserialize_state and the undo bookkeeping
|
||||
# stay on the gathering thread. It is one task at a time by
|
||||
# design, not by simplification: TASK_TYPE_BLOCKING means
|
||||
# the frontend cannot produce concurrent save tasks, so a
|
||||
# lane that pushed them would be asserting against a
|
||||
# configuration that cannot occur. What it asks TSan is
|
||||
# whether a loop that newly carries a deadline across
|
||||
# iterations kept any of it shared.
|
||||
make clean all
|
||||
test -x save_state_io_test
|
||||
timeout 300 ./save_state_io_test
|
||||
timeout 300 ./save_state_io_test conc
|
||||
echo "[pass] save_state_io_test"
|
||||
make clean all SANITIZER=address,undefined
|
||||
ASAN_OPTIONS=detect_leaks=1:detect_stack_use_after_return=1 \
|
||||
UBSAN_OPTIONS=print_stacktrace=1 timeout 300 \
|
||||
./save_state_io_test
|
||||
ASAN_OPTIONS=detect_leaks=1 UBSAN_OPTIONS=print_stacktrace=1 \
|
||||
timeout 300 ./save_state_io_test conc
|
||||
echo "[pass] save_state_io_test (ASan)"
|
||||
make clean all SANITIZER=thread
|
||||
TSAN_OPTIONS=halt_on_error=1 timeout 300 \
|
||||
./save_state_io_test
|
||||
TSAN_OPTIONS=halt_on_error=1 timeout 300 \
|
||||
./save_state_io_test conc
|
||||
echo "[pass] save_state_io_test (TSan)"
|
||||
|
||||
samples-tasks-http:
|
||||
name: Build and run samples/tasks/http
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y build-essential zlib1g-dev
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: C89 syntax check for the HTTP task translation units
|
||||
shell: bash
|
||||
run: |
|
||||
set -eu
|
||||
# Fast guard for the C89 dialect rules these files are built
|
||||
# under. RetroArch's full C89 build lives in retroarch.yml
|
||||
# (make C89_BUILD=1), which does catch violations but only
|
||||
# after a configure and a complete build; a syntax-only pass
|
||||
# over the handful of translation units this area touches
|
||||
# fails in seconds instead.
|
||||
#
|
||||
# It exists because a mixed declaration slipped into
|
||||
# task_core_updater.c and reached master: the C99-style
|
||||
# "declare where first used" habit is silent under the
|
||||
# default build and only surfaces here.
|
||||
# -Werror=declaration-after-statement is the specific rule
|
||||
# that catches it; the rest of the flag set mirrors the
|
||||
# C89_BUILD block in the top-level Makefile. _GNU_SOURCE is
|
||||
# added because -ansi otherwise hides the POSIX prototypes
|
||||
# (strdup and friends) that these files legitimately use,
|
||||
# which would produce a wall of int-conversion noise
|
||||
# unrelated to the dialect rules being checked.
|
||||
C89="-std=c89 -ansi -pedantic -Werror=pedantic -Wno-long-long"
|
||||
C89="$C89 -Werror=declaration-after-statement -Wno-variadic-macros"
|
||||
C89="$C89 -D_GNU_SOURCE"
|
||||
INC="-Ilibretro-common/include -I. -Ideps"
|
||||
DEF="-DRARCH_INTERNAL -DHAVE_NETWORKING -DHAVE_THREADS -DHAVE_COMPRESSION"
|
||||
rc=0
|
||||
for f in libretro-common/net/net_http.c \
|
||||
libretro-common/queues/task_queue.c \
|
||||
tasks/task_http.c \
|
||||
tasks/task_core_updater.c \
|
||||
tasks/task_pl_thumbnail_download.c \
|
||||
tasks/task_core_backup.c \
|
||||
core_backup.c \
|
||||
libretro-common/streams/interface_stream.c; do
|
||||
if gcc -fsyntax-only $C89 $INC $DEF "$f"; then
|
||||
echo "[pass] C89 $f"
|
||||
else
|
||||
echo "::error title=C89 violation::$f"
|
||||
rc=1
|
||||
fi
|
||||
done
|
||||
exit $rc
|
||||
|
||||
- name: Build and run http_url_dedup_test (ASan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/http
|
||||
run: |
|
||||
set -eu
|
||||
# Regression test for the duplicate-download suppression key
|
||||
# in tasks/task_http.c and tasks/task_http_emscripten.c.
|
||||
# connection_url was a fixed char[NAME_MAX_LENGTH] filled by
|
||||
# strlcpy, but task_http_finder() compares that stored copy
|
||||
# against the raw candidate URL - so past NAME_MAX_LENGTH the
|
||||
# two could never compare equal and the "concurrent download
|
||||
# of the same file is not allowed" guard returned false for
|
||||
# every candidate. Playlist thumbnail URLs exceed it
|
||||
# routinely, and both tasks then reached their completion
|
||||
# callback and raced filestream_write_file() over one path.
|
||||
#
|
||||
# The failure is one-directional: truncation cannot conflate
|
||||
# two distinct URLs, since the candidate is never truncated
|
||||
# to match. So the test asserts both that the owned key
|
||||
# self-matches at any length and that distinct long URLs
|
||||
# stay distinct - the latter guarding against a future "fix"
|
||||
# that hashes the key to a fixed width and introduces the
|
||||
# false positive this bug did not have. It keeps the old
|
||||
# fixed-buffer shape as a second oracle so a revert is
|
||||
# caught. Both NAME_MAX_LENGTH values are covered: 256 on
|
||||
# most targets, 128 on the small-path platforms.
|
||||
make -f Makefile.dedup clean all SANITIZER=address
|
||||
timeout 60 ./http_url_dedup_test
|
||||
make -f Makefile.dedup clean all SANITIZER=address \
|
||||
CFLAGS_EXTRA=-DNAME_MAX_LENGTH=128
|
||||
timeout 60 ./http_url_dedup_test
|
||||
make -f Makefile.dedup clean
|
||||
echo "[pass] http_url_dedup_test"
|
||||
|
||||
- name: Build and run http_emscripten_headers_test (ASan + UBSan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/http
|
||||
run: |
|
||||
set -eu
|
||||
# Header marshalling for tasks/task_http_emscripten.c, which
|
||||
# sits between two representations: RetroArch's raw
|
||||
# CRLF-delimited blob and the NULL-terminated key/value array
|
||||
# emscripten_fetch wants, plus the response blob that has to
|
||||
# become the same "Name: Value" string_list net_http.c
|
||||
# produces. Neither conversion existed while the backend was
|
||||
# on emscripten_async_wget2_data, which has no header support
|
||||
# at all - the `headers` argument was accepted and dropped on
|
||||
# every entry point, so cloud sync could not authenticate.
|
||||
#
|
||||
# The parsing is where the sharp edges are: hand-built blobs
|
||||
# in task_push_webdav_move() and
|
||||
# task_push_http_transfer_with_content() mean bare LF,
|
||||
# missing trailing CRLF, empty values, embedded colons and
|
||||
# malformed lines all reach it. A header dropped here is an
|
||||
# auth failure rather than a crash - silent, and awkward to
|
||||
# trace back - so the degenerate cases are worth pinning.
|
||||
# Pure logic, so it runs natively without emcc.
|
||||
make -f Makefile.emsc_headers clean all SANITIZER=address
|
||||
timeout 60 ./http_emscripten_headers_test
|
||||
make -f Makefile.emsc_headers clean all SANITIZER=undefined
|
||||
UBSAN_OPTIONS=print_stacktrace=1 timeout 60 \
|
||||
./http_emscripten_headers_test
|
||||
make -f Makefile.emsc_headers clean
|
||||
echo "[pass] http_emscripten_headers_test"
|
||||
|
||||
- name: Build and run http_task_lifetime_test (ASan, TSan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/http
|
||||
run: |
|
||||
set -eu
|
||||
# Lifetime contract for task->state between tasks/task_http.c
|
||||
# and libretro-common/queues/task_queue.c. Links the real
|
||||
# task_http.c and the real task_queue.c; only
|
||||
# msg_hash_to_str() and task_window_progress_cb() are
|
||||
# stubbed, since neither participates in lifetime.
|
||||
#
|
||||
# This is the lane the other HTTP samples could not cover:
|
||||
# they drive net_http.c directly, which exercises the
|
||||
# protocol engine well and the task layer not at all - and
|
||||
# the task layer is where the crash was.
|
||||
# task_http_transfer_handler() freed its http_handle_t as
|
||||
# soon as it set RETRO_TASK_FLG_FINISHED, but a task stays
|
||||
# findable long after its handler is done:
|
||||
# retro_task_threaded_find() scans the running, finished AND
|
||||
# retiring lists, and task_http_finder() dereferences
|
||||
# task->state on every candidate. So task->state dangled for
|
||||
# the whole window between the last handler tick and full
|
||||
# retirement, and any concurrent push racing a finishing
|
||||
# download read freed memory.
|
||||
#
|
||||
# It survived for years because connection_url was an inline
|
||||
# char[NAME_MAX_LENGTH]: reading a freed-but-still-mapped
|
||||
# array yields stale bytes and strcmp() plods through them.
|
||||
# Making connection_url a pointer turned the same read into
|
||||
# "load the freed chunk's tombstone and dereference it" - a
|
||||
# hard SIGSEGV inside task_http_finder on Windows. The
|
||||
# pointer change did not introduce the defect; it removed the
|
||||
# padding hiding it.
|
||||
#
|
||||
# The shape is the one from that backtrace: threads push GETs
|
||||
# for a small set of URLs while the queue finishes and
|
||||
# retires earlier ones, so every push runs task_queue_find()
|
||||
# over all three lists and collides with retirement
|
||||
# continuously. ASan is what makes it assertable - without
|
||||
# it a use-after-free on a recently freed chunk reads
|
||||
# plausible bytes and passes. TSan matters as much, since
|
||||
# the race is what makes the window reachable.
|
||||
#
|
||||
# To confirm this test still bites, move the teardown in
|
||||
# task_http.c from task_http_transfer_cleanup() back into
|
||||
# task_http_transfer_handler() and rerun under ASan.
|
||||
make -f Makefile.task_lifetime clean all SANITIZER=address
|
||||
ASAN_OPTIONS=detect_leaks=1:detect_stack_use_after_return=1 \
|
||||
timeout 300 ./http_task_lifetime_test
|
||||
echo "[pass] http_task_lifetime_test (ASan)"
|
||||
make -f Makefile.task_lifetime clean all SANITIZER=thread
|
||||
TSAN_OPTIONS=halt_on_error=1 timeout 300 \
|
||||
./http_task_lifetime_test
|
||||
make -f Makefile.task_lifetime clean
|
||||
echo "[pass] http_task_lifetime_test (TSan)"
|
||||
|
||||
- name: Build and run http_transfer_stress_test (ASan + UBSan, TSan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/http
|
||||
run: |
|
||||
set -eu
|
||||
# Transport-level oracle for libretro-common/net/net_http.c
|
||||
# as driven by tasks/task_http.c, against a real loopback
|
||||
# server. Framing correctness comes first - Content-Length,
|
||||
# chunked across chunk sizes 1..65536, and
|
||||
# connection-close-delimited, then the same again with the
|
||||
# server dribbling a few bytes per write so every header
|
||||
# line, chunk header and chunk boundary is torn across
|
||||
# receive calls.
|
||||
#
|
||||
# Two things make the tick-cost lane mean anything. It
|
||||
# interposes socket() to pin SO_RCVBUF, because per-update
|
||||
# byte yield otherwise tracks host /proc/sys/net tuning and
|
||||
# autoscaling; and it sleeps the task-queue tick period
|
||||
# between updates, because without that the client polls
|
||||
# faster than the peer can fill the socket, every recv()
|
||||
# takes a sliver, and the number reports the server's write
|
||||
# rate rather than the structural per-tick cap - it swung
|
||||
# between 263 and 93207 B/tick across runs. Sleeping the
|
||||
# period lets the receive buffer saturate, which is the
|
||||
# regime RetroArch actually runs in and the only one where
|
||||
# ticks-per-body is stable.
|
||||
#
|
||||
# The peak-window ceiling for the streaming sink is paired
|
||||
# with a contrast case asserting the buffered path *exceeds*
|
||||
# it, so the pair cannot pass by both paths happening to stay
|
||||
# small on a given host. The teardown lane deinits,
|
||||
# re-inits and transfers again: calling net_http_deinit() is
|
||||
# what makes a leak in the DNS cache and connection pool
|
||||
# visible to LeakSan at all, since both lists hang off
|
||||
# file-scope globals and otherwise count as still reachable.
|
||||
make -f Makefile.stress clean all SANITIZER=address,undefined
|
||||
ASAN_OPTIONS=detect_leaks=1:detect_stack_use_after_return=1 \
|
||||
UBSAN_OPTIONS=print_stacktrace=1 timeout 600 \
|
||||
./http_transfer_stress_test
|
||||
echo "[pass] http_transfer_stress_test (ASan)"
|
||||
make -f Makefile.stress clean all SANITIZER=thread
|
||||
TSAN_OPTIONS=halt_on_error=1 timeout 600 \
|
||||
./http_transfer_stress_test
|
||||
make -f Makefile.stress clean
|
||||
echo "[pass] http_transfer_stress_test (TSan)"
|
||||
|
||||
- name: Build and run http_dns_evict_deadlock_test (ASan, TSan)
|
||||
shell: bash
|
||||
working-directory: samples/tasks/http
|
||||
run: |
|
||||
set -eu
|
||||
# Deadlock regression for
|
||||
# net_http_dns_cache_remove_expired(), which runs with the
|
||||
# DNS cache lock held and used to sthread_join() the resolver
|
||||
# thread of any entry it evicted. net_http_resolve() takes
|
||||
# that same lock twice, so a join against a thread blocked
|
||||
# acquiring the lock the joiner holds never returns.
|
||||
#
|
||||
# The window is not theoretical: entry->addr stays NULL for
|
||||
# the whole resolution, so the fail-timeout arm fires after
|
||||
# 30s - and getaddrinfo() against a blackholed resolver
|
||||
# routinely blocks longer. The entry looks expired precisely
|
||||
# while its own resolver is still running, hanging the task
|
||||
# thread (and in unthreaded builds the frontend) over nothing
|
||||
# worse than a slow DNS server.
|
||||
#
|
||||
# Reproducing that honestly would mean a 30s wait against an
|
||||
# unreachable nameserver, so the test wraps two symbols at
|
||||
# link time instead: getaddrinfo, to park the resolver
|
||||
# mid-flight on one nominated hostname, and
|
||||
# cpu_features_get_time_usec, to age the entry past the
|
||||
# timeout instantly. --wrap rather than a strong definition
|
||||
# because both live in libretro-common objects linked into
|
||||
# the test.
|
||||
#
|
||||
# Because the failure mode is a hang rather than a wrong
|
||||
# answer, the sweep runs behind a watchdog: on timeout the
|
||||
# test reports and exits non-zero instead of blocking CI.
|
||||
make -f Makefile.dns_evict clean all SANITIZER=address
|
||||
ASAN_OPTIONS=detect_leaks=1 timeout 300 \
|
||||
./http_dns_evict_deadlock_test
|
||||
echo "[pass] http_dns_evict_deadlock_test (ASan)"
|
||||
make -f Makefile.dns_evict clean all SANITIZER=thread
|
||||
TSAN_OPTIONS=halt_on_error=1 timeout 300 \
|
||||
./http_dns_evict_deadlock_test
|
||||
make -f Makefile.dns_evict clean
|
||||
echo "[pass] http_dns_evict_deadlock_test (TSan)"
|
||||
@@ -1,37 +0,0 @@
|
||||
name: CI Linux (i686)
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-i386-ubuntu:xenial-gcc9
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- name: Check Out Repo
|
||||
uses: taiki-e/checkout-action@v1
|
||||
|
||||
- name: Configure Build
|
||||
run: |
|
||||
./configure --disable-qt --enable-xdelta
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -j$(getconf _NPROCESSORS_ONLN) info all
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
@@ -1,58 +0,0 @@
|
||||
name: CI Windows (MSVC)
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
# These jobs run smoke tests to ensure that MSVC-specific builds work properly.
|
||||
jobs:
|
||||
|
||||
msvc:
|
||||
runs-on: windows-2022
|
||||
strategy:
|
||||
matrix:
|
||||
version: [UWP, 2019, 2022]
|
||||
configuration: [Debug, Release]
|
||||
platform: [x64]
|
||||
exclude:
|
||||
- version: UWP
|
||||
configuration: Debug
|
||||
include:
|
||||
- version: UWP
|
||||
configuration: ReleaseAngle
|
||||
platform: x64
|
||||
# Qt and Cg builds are excluded for now
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: Compile RA
|
||||
working-directory: "${{github.workspace}}/pkg/msvc${{ matrix.version == 'UWP' && '-uwp' || ''}}"
|
||||
run: |
|
||||
msbuild -p:"Configuration=${{matrix.configuration}}" -p:"Platform=${{matrix.platform}}" .\RetroArch-msvc${{matrix.version}}.sln
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
shell: powershell
|
||||
run: echo "sha8=$('${{github.sha}}'.Substring(0,8))" >> $env:GITHUB_OUTPUT
|
||||
# https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: retroarch-${{matrix.version}}-${{matrix.configuration}}-${{matrix.platform}}-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
${{ matrix.version != 'UWP' }}:
|
||||
pkg/msvc/${{matrix.platform}}/${{matrix.configuration}}/RetroArch-msvc${{matrix.version}}.exe
|
||||
${{ matrix.version == 'UWP' }}:
|
||||
pkg/msvc-uwp/AppPackages/RetroArch-msvcUWP
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
name: CI Windows (MSYS2)
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
msys2-build-test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# Existing x64 builds
|
||||
- sys: MINGW64
|
||||
runner: windows-latest
|
||||
- sys: UCRT64
|
||||
runner: windows-latest
|
||||
- sys: CLANG64
|
||||
runner: windows-latest
|
||||
|
||||
# New ARM64 build (native Windows on ARM)
|
||||
- sys: CLANGARM64
|
||||
runner: windows-11-arm
|
||||
|
||||
runs-on: ${{ matrix.runner }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: ${{ matrix.sys }}
|
||||
update: true
|
||||
install: >-
|
||||
base-devel
|
||||
git
|
||||
pacboy: >-
|
||||
gettext:p
|
||||
gobject-introspection:p
|
||||
graphite2:p
|
||||
p11-kit:p
|
||||
qt6:p
|
||||
qt6-3d:p
|
||||
qt6-charts:p
|
||||
qt6-datavis3d:p
|
||||
qt6-imageformats:p
|
||||
qt6-location:p
|
||||
qt6-lottie:p
|
||||
qt6-networkauth:p
|
||||
qt6-quick3dphysics:p
|
||||
qt6-quicktimeline:p
|
||||
qt6-remoteobjects:p
|
||||
qt6-scxml:p
|
||||
qt6-sensors:p
|
||||
qt6-serialbus:p
|
||||
qt6-speech:p
|
||||
qt6-tools:p
|
||||
qt6-translations:p
|
||||
qt6-virtualkeyboard:p
|
||||
qt6-webchannel:p
|
||||
qt6-websockets:p
|
||||
x264:p
|
||||
cc:p
|
||||
|
||||
- name: Configure and build RetroArch
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
echo "Building RetroArch in ${{ matrix.sys }} on ${{ matrix.runner }}"
|
||||
./configure
|
||||
make -j"$(nproc)" info all
|
||||
|
||||
- name: Collect DLLs and binaries
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
echo "Collecting DLLs and binaries"
|
||||
rm -rf dist
|
||||
mkdir -p dist
|
||||
cp retroarch.exe dist/
|
||||
ldd retroarch.exe | grep "$MINGW_PREFIX" | awk '{print $3}' | xargs -I {} cp {} dist/ || true
|
||||
|
||||
- name: Archive build artifacts
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: retroarch-${{ matrix.sys }}
|
||||
path: dist/
|
||||
@@ -1,33 +0,0 @@
|
||||
name: CI macOS
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
set -o pipefail
|
||||
xcodebuild -workspace pkg/apple/RetroArch.xcworkspace -scheme RetroArch -config Release -xcconfig pkg/apple/GitHubCI.xcconfig -derivedDataPath build
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: RetroArch-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
build/Build/Products/Release
|
||||
@@ -1,38 +0,0 @@
|
||||
name: CI Miyoo ARM32
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-dingux:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -j$(getconf _NPROCESSORS_ONLN) -f Makefile.miyoo clean
|
||||
make -j$(getconf _NPROCESSORS_ONLN) -f Makefile.miyoo info all
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: retroarch_miyoo_arm32${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch
|
||||
@@ -1,44 +0,0 @@
|
||||
name: CI PS2
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-ps2:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile Salamander
|
||||
run: |
|
||||
make -f Makefile.ps2.salamander -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.ps2.salamander -j$(getconf _NPROCESSORS_ONLN) release
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.ps2 -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.ps2 -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1 info release
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: RA-PS2-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
raboot.elf
|
||||
retroarchps2.elf
|
||||
@@ -1,44 +0,0 @@
|
||||
name: CI PS3/PSL1GHT
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-psl1ght:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile Salamander
|
||||
run: |
|
||||
make -f Makefile.psl1ght.salamander -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.psl1ght.salamander -j$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.psl1ght -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.psl1ght -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1 info all
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: RA-psl1ght-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch_psl1ght_salamander.elf
|
||||
retroarch_psl1ght.elf
|
||||
@@ -1,51 +0,0 @@
|
||||
name: CI PS4/ORBIS
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-orbis:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apk add ncurses-dev make bash python2
|
||||
apk add libintl icu-dev wget
|
||||
wget https://dot.net/v1/dotnet-install.sh && chmod 755 dotnet-install.sh && ./dotnet-install.sh -c 3.0 --install-dir ~/cli
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
export PATH=~/cli:$PATH # .net cli
|
||||
make -f Makefile.orbis -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1 info all
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bin-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch_orbis.elf
|
||||
retroarch_orbis.oelf
|
||||
retroarch_orbis.self
|
||||
|
||||
- name: Version of binaries
|
||||
run: |
|
||||
clang --version
|
||||
orbis-ld --version
|
||||
@@ -1,50 +0,0 @@
|
||||
name: CI PSP
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-psp:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile bootstrap
|
||||
run: |
|
||||
cd bootstrap/psp1/kernel_functions_prx
|
||||
make -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -j$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
- name: Compile Salamander
|
||||
run: |
|
||||
make -f Makefile.psp1.salamander -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.psp1.salamander -j$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.psp1 -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.psp1 -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: RA-PSP-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
kernel_functions.prx
|
||||
EBOOT.PBP
|
||||
@@ -1,42 +0,0 @@
|
||||
name: CI PSVita
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-vita:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile Salamander
|
||||
run: |
|
||||
make -f Makefile.vita.salamander -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.vita.salamander -j$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.vita -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.vita -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1 HAVE_VITAGLES=1 info all
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: RA-PSVita-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
eboot.bin
|
||||
@@ -1,38 +0,0 @@
|
||||
name: CI RS90 Odbeta MIPS32
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-dingux:odbeta
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -j$(getconf _NPROCESSORS_ONLN) -f Makefile.rs90 clean
|
||||
make -j$(getconf _NPROCESSORS_ONLN) -f Makefile.rs90 info all
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: retroarch_rs90_mips32${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch_rs90_odbeta.opk
|
||||
@@ -1,38 +0,0 @@
|
||||
name: CI RetroFW MIPS32
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-dingux:odbeta
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -j$(getconf _NPROCESSORS_ONLN) -f Makefile.retrofw clean
|
||||
make -j$(getconf _NPROCESSORS_ONLN) -f Makefile.retrofw info all
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: retroarch_retrofw_mips32${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch_retrofw.opk
|
||||
@@ -1,52 +0,0 @@
|
||||
name: CI Generate Source Only Tarball
|
||||
|
||||
# Trigger whenever a release and/or is created
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- created
|
||||
push:
|
||||
tags:
|
||||
- "v*.*"
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: archive
|
||||
id: archive
|
||||
run: |
|
||||
VERSION=${GITHUB_REF##*/}
|
||||
test -z "$VERSION" && VERSION=${{ github.event.release.tag_name }}
|
||||
VERSION=$(printf "%s\n" "$VERSION" | sed 's/^v//')
|
||||
PKGNAME="retroarch-sourceonly-$VERSION"
|
||||
mkdir -p /tmp/$PKGNAME
|
||||
mv * /tmp/$PKGNAME
|
||||
mv /tmp/$PKGNAME .
|
||||
rm -rf $PKGNAME/pkg || true
|
||||
rm -rf $PKGNAME/wii/libogc || true
|
||||
rm -rf $PKGNAME/deps/glslang/glslang/Test || true
|
||||
rm -rf $PKGNAME/deps/SPIRV-Cross/reference || true
|
||||
rm -rf $PKGNAME/gfx/include/userland || true
|
||||
find $PKGNAME/ -type f -name '*.a' -delete || true
|
||||
find $PKGNAME/ -type f -name '*.lib' -delete || true
|
||||
find $PKGNAME/ -type f -name '*.dylib' -delete || true
|
||||
find $PKGNAME/ -type f -name '*.so.*' -delete || true
|
||||
find $PKGNAME/ -type f -name '*.dll' -delete || true
|
||||
TARBALL=$PKGNAME.tar.xz
|
||||
tar cJf $TARBALL $PKGNAME
|
||||
echo "tarball=$TARBALL" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: upload tarball
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: ${{ steps.archive.outputs.tarball }}
|
||||
@@ -1,37 +0,0 @@
|
||||
name: CI Switch/libnx
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-libnx-devkitpro:v4-10-0
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.libnx -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.libnx -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: RA-libnx-dummy-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
retroarch_switch.nro
|
||||
@@ -1,37 +0,0 @@
|
||||
name: CI Wii
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-devkitpro:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: taiki-e/checkout-action@v1
|
||||
|
||||
- name: Compile Salamander
|
||||
run: |
|
||||
make -f Makefile.wii.salamander -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.wii.salamander -j$(getconf _NPROCESSORS_ONLN) EXTERNAL_LIBOGC=1 GX_PTHREAD_LEGACY=0
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.wii -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.wii -j$(getconf _NPROCESSORS_ONLN) EXTERNAL_LIBOGC=1 GX_PTHREAD_LEGACY=0 HAVE_STATIC_DUMMY=1 info all
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
name: CI WiiU
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-wiiu:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: taiki-e/checkout-action@v1
|
||||
|
||||
- name: Compile Salamander
|
||||
run: |
|
||||
make -f Makefile.wiiu -j$(getconf _NPROCESSORS_ONLN) SALAMANDER_BUILD=1 clean
|
||||
make -f Makefile.wiiu -j$(getconf _NPROCESSORS_ONLN) SALAMANDER_BUILD=1
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
make -f Makefile.wiiu -j$(getconf _NPROCESSORS_ONLN) clean
|
||||
make -f Makefile.wiiu -j$(getconf _NPROCESSORS_ONLN) HAVE_STATIC_DUMMY=1 info all
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
@@ -1,44 +0,0 @@
|
||||
name: CI Windows ARM64 (MSVC)
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
msvc:
|
||||
runs-on: windows-11-arm
|
||||
strategy:
|
||||
matrix:
|
||||
version: [2022]
|
||||
configuration: [Debug, Release]
|
||||
platform: [ARM64]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
|
||||
- name: Compile RA
|
||||
working-directory: "${{ github.workspace }}/pkg/msvc"
|
||||
run: |
|
||||
msbuild -p:"Configuration=${{ matrix.configuration }}" -p:"Platform=${{ matrix.platform }}" .\RetroArch-msvc${{ matrix.version }}.sln
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
shell: powershell
|
||||
run: echo "sha8=$('${{ github.sha }}'.Substring(0,8))" >> $env:GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: retroarch-${{ matrix.version }}-${{ matrix.configuration }}-${{ matrix.platform }}-${{ steps.slug.outputs.sha8 }}
|
||||
path: |
|
||||
pkg/msvc/${{ matrix.platform }}/${{ matrix.configuration }}/RetroArch-msvc${{ matrix.version }}.exe
|
||||
@@ -1,34 +0,0 @@
|
||||
name: CI Windows i686 (MXE)
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-mxe-win32-cross:gcc10
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: taiki-e/checkout-action@v1
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
export MOC=/usr/lib/mxe/usr/i686-w64-mingw32.shared/qt5/bin/moc
|
||||
./configure --host=i686-w64-mingw32.shared
|
||||
make clean
|
||||
make -j$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
@@ -1,34 +0,0 @@
|
||||
name: CI Windows x64 (MXE)
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
repository_dispatch:
|
||||
types: [run_build]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: reallibretroretroarch/libretro-build-mxe-win64-cross:gcc10
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- uses: taiki-e/checkout-action@v1
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
export MOC=/usr/lib/mxe/usr/x86_64-w64-mingw32.shared/qt5/bin/moc
|
||||
./configure --host=x86_64-w64-mingw32.shared
|
||||
make clean
|
||||
make -j$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
- name: Get short SHA
|
||||
id: slug
|
||||
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||
@@ -1,45 +0,0 @@
|
||||
# Download translations from Crowdin and push to GitHub
|
||||
|
||||
name: Crowdin Daily Workflow
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # every day at midnight
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
permissions:
|
||||
contents: write # for Git to git push
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Java JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 18
|
||||
distribution: zulu
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Crowdin Sync
|
||||
shell: bash
|
||||
env:
|
||||
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
|
||||
run: |
|
||||
cd intl
|
||||
python3 -m pip install requests PyYAML
|
||||
python3 crowdin_sync.py "$CROWDIN_API_KEY"
|
||||
git config user.name github-actions
|
||||
git config user.email [email protected]
|
||||
git add .
|
||||
if git diff --cached --quiet; then
|
||||
echo "No translation changes to commit."
|
||||
else
|
||||
git commit -m "Fetch translations from Crowdin"
|
||||
git push
|
||||
fi
|
||||
@@ -1,37 +0,0 @@
|
||||
# Upload sources to Crowdin for translation
|
||||
|
||||
name: Crowdin Workflow
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'intl/*_us.h'
|
||||
- 'intl/*_us.json'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Setup Java JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 18
|
||||
distribution: zulu
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Crowdin Sync
|
||||
shell: bash
|
||||
env:
|
||||
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
|
||||
run: |
|
||||
cd intl
|
||||
python3 crowdin_sync.py "$CROWDIN_API_KEY"
|
||||
@@ -1,26 +0,0 @@
|
||||
name: CI iOS (13)
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Compile RA
|
||||
run: |
|
||||
set -o pipefail
|
||||
xcodebuild -workspace pkg/apple/RetroArch.xcworkspace -destination generic/platform=iOS -config Release \
|
||||
-scheme "RetroArch iOS Release" -xcconfig pkg/apple/GitHubCI.xcconfig \
|
||||
CODE_SIGNING_ALLOWED=NO \ CODE_SIGNING_REQUIRED=NO \ CODE_SIGN_IDENTITY="" \ PROVISIONING_PROFILE_SPECIFIER="" \
|
||||
-derivedDataPath build
|
||||
@@ -1,36 +0,0 @@
|
||||
# Validates compilation of RetroArch binary
|
||||
|
||||
name: RetroArch CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
linux-c89: # Smoketest build using most restrictive compiler and default options
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dependencies
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install build-essential libxkbcommon-dev libx11-xcb-dev zlib1g-dev libfreetype6-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev nvidia-cg-toolkit nvidia-cg-dev libavcodec-dev libsdl2-dev libsdl-image1.2-dev libxml2-dev yasm
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Configure
|
||||
run: ./configure
|
||||
- name: Build
|
||||
run: make C89_BUILD=1
|
||||
- name: Build Debug
|
||||
run: |
|
||||
make clean # making sure we don't have leftovers from previous build
|
||||
make DEBUG=1 GL_DEBUG=1 C89_BUILD=1 info all
|
||||
@@ -1,123 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Compile the translation units whose contents depend on which codecs or
|
||||
# which platform a build selects, across the combinations real builds
|
||||
# actually use.
|
||||
#
|
||||
# The ordinary CI jobs each build one configuration, so a file that
|
||||
# compiles for the configuration they build is green even when it cannot
|
||||
# compile for a console's. This has broken the tree: giving WAV a
|
||||
# streaming mixer type made it a user of machinery guarded on the
|
||||
# compressed codecs, which every desktop build has and Wii U - WAV and
|
||||
# nothing else - does not. Nothing caught it until the console job ran.
|
||||
#
|
||||
# Nothing here links or runs; it is a syntax and declaration check, which
|
||||
# is the class of breakage this is for.
|
||||
|
||||
set -e
|
||||
cd "$(dirname "$0")/../../.."
|
||||
|
||||
CC=${CC:-gcc}
|
||||
INC="-I. -Ilibretro-common/include -Ideps -Ideps/rcheevos/include -Iinput/include"
|
||||
WARN="-Wall -Wno-unused-function -Werror=implicit-function-declaration"
|
||||
BASE="-DRARCH_INTERNAL -DHAVE_AUDIOMIXER -DHAVE_THREADS -DHAVE_CONFIGFILE -DHAVE_MENU"
|
||||
|
||||
fail=0
|
||||
|
||||
check() {
|
||||
name="$1"; shift
|
||||
defs="$1"; shift
|
||||
for tu in "$@"; do
|
||||
if ! out=$($CC $WARN $INC $BASE $defs -fsyntax-only "$tu" 2>&1); then
|
||||
echo "FAIL $name"
|
||||
echo " $tu"
|
||||
echo "$out" | sed 's/^/ /' | head -12
|
||||
fail=1
|
||||
fi
|
||||
done
|
||||
[ "$fail" = 1 ] || echo "ok $name"
|
||||
}
|
||||
|
||||
AUDIO="libretro-common/formats/audio_transfer.c libretro-common/audio/audio_mixer.c"
|
||||
|
||||
echo "== audio codec combinations =="
|
||||
# the sets real platform makefiles select, plus each codec alone and none
|
||||
check "wav only (ctr/psp/wiiu)" "-DHAVE_RWAV" $AUDIO
|
||||
check "wav+mod (gx/ngc/wii)" "-DHAVE_RWAV -DHAVE_RMODTRACKER" $AUDIO
|
||||
check "mod+vorbis (emscripten)" "-DHAVE_RMODTRACKER -DHAVE_RVORBIS" $AUDIO
|
||||
check "wav+vorbis (vita)" "-DHAVE_RWAV -DHAVE_RVORBIS" $AUDIO
|
||||
check "wav+vorbis+mp3+mod (nx)" "-DHAVE_RWAV -DHAVE_RVORBIS -DHAVE_RMP3 -DHAVE_RMODTRACKER" $AUDIO
|
||||
check "mod+mp3+vorbis (dos)" "-DHAVE_RMODTRACKER -DHAVE_RMP3 -DHAVE_RVORBIS" $AUDIO
|
||||
check "vorbis only" "-DHAVE_RVORBIS" $AUDIO
|
||||
check "flac only" "-DHAVE_RFLAC" $AUDIO
|
||||
check "mp3 only" "-DHAVE_RMP3" $AUDIO
|
||||
check "mod only" "-DHAVE_RMODTRACKER" $AUDIO
|
||||
check "aac only" "-DHAVE_RAAC" $AUDIO
|
||||
check "aac+mp4" "-DHAVE_RAAC -DHAVE_RMP4" $AUDIO
|
||||
check "opus only" "-DHAVE_ROPUS" $AUDIO
|
||||
check "opus+webm" "-DHAVE_ROPUS -DHAVE_RWEBM" $AUDIO
|
||||
check "no codecs" "" $AUDIO
|
||||
check "everything" \
|
||||
"-DHAVE_RWAV -DHAVE_RVORBIS -DHAVE_RFLAC -DHAVE_RMP3 -DHAVE_RMODTRACKER -DHAVE_RAAC -DHAVE_ROPUS -DHAVE_RMP4 -DHAVE_RWEBM" \
|
||||
$AUDIO
|
||||
|
||||
|
||||
# mem_stats selects one platform backend out of a dozen, and its includes
|
||||
# and its bodies must both follow that one choice. When they were two
|
||||
# separate chains, a platform matching an early arm while still defining
|
||||
# __unix__ - Orbis and Emscripten do, and DJGPP does - got its own arm's
|
||||
# includes and a different arm's code, and three console jobs failed on
|
||||
# symbols the arm had never included a header for.
|
||||
#
|
||||
# The SDK headers are not here, so an arm whose header is missing cannot
|
||||
# be compiled. What can be checked anywhere is that the only thing it
|
||||
# complains about is that header: a diagnostic naming a symbol that
|
||||
# belongs to some other arm means the chains have drifted apart again.
|
||||
echo
|
||||
echo "== mem_stats platform arms =="
|
||||
|
||||
# The SDKs are not on a runner, so each arm is compiled against a stub
|
||||
# header supplying only the handful of symbols that arm names. That does
|
||||
# not prove the real SDK matches the stub - it proves the arm's own code
|
||||
# is well formed and that every symbol it uses is one it has arranged to
|
||||
# have. Three console failures reached CI as missing or wrong headers -
|
||||
# 3ds.h absent, gccore.h guessed, SYSMEM1_SIZE taken from the SDK when
|
||||
# it is RetroArch's own - and each would have shown up here.
|
||||
STUBS="$(dirname "$0")/stubs"
|
||||
# host headers are the real ones and deprecate things the target's do not
|
||||
ARMWARN="$WARN -Wno-deprecated-declarations"
|
||||
|
||||
arm() {
|
||||
name="$1"; stub="$2"; defs="$3"
|
||||
inc="$INC"
|
||||
[ -n "$stub" ] && inc="-I$STUBS/$stub $INC"
|
||||
if ! out=$($CC $ARMWARN $inc $defs -fsyntax-only \
|
||||
libretro-common/memory/mem_stats.c 2>&1); then
|
||||
echo "FAIL $name"
|
||||
printf '%s\n' "$out" | sed 's/^/ /' | head -8
|
||||
fail=1
|
||||
elif [ -n "$out" ]; then
|
||||
echo "FAIL $name (warnings)"
|
||||
printf '%s\n' "$out" | sed 's/^/ /' | head -6
|
||||
fail=1
|
||||
else
|
||||
echo "ok $name"
|
||||
fi
|
||||
}
|
||||
|
||||
arm "3ds" ctr "-D_3DS"
|
||||
arm "gamecube" gx "-DGEKKO"
|
||||
arm "wii" gx "-DGEKKO -DHW_RVL"
|
||||
arm "vita" "" "-DVITA"
|
||||
arm "switch" libnx "-DHAVE_LIBNX"
|
||||
arm "orbis" orbis "-DORBIS"
|
||||
arm "ps3" ps3 "-D__PSL1GHT__ -DHAVE_MEMINFO"
|
||||
arm "ps2" "" "-DPS2"
|
||||
arm "emscripten" emscripten "-D__EMSCRIPTEN__"
|
||||
arm "win32" win32 "-D_WIN32 -D_WIN32_WINNT=0x0600"
|
||||
arm "win32-old" win32 "-D_WIN32 -D_WIN32_WINNT=0x0400"
|
||||
arm "macos" apple "-D__APPLE__"
|
||||
arm "ios" apple "-D__APPLE__ -DTARGET_OS_IPHONE=1"
|
||||
arm "dos/djgpp" "" "-D__DJGPP__ -D__unix__"
|
||||
arm "linux" "" ""
|
||||
|
||||
exit $fail
|
||||
@@ -1,6 +0,0 @@
|
||||
#ifndef STUB_TC_H
|
||||
#define STUB_TC_H
|
||||
#ifndef TARGET_OS_IPHONE
|
||||
#define TARGET_OS_IPHONE 0
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,25 +0,0 @@
|
||||
#ifndef STUB_MACH_H
|
||||
#define STUB_MACH_H
|
||||
/* Stands in for the SDK's umbrella header: on a real Apple SDK
|
||||
* mach/mach.h reaches mach/mach_port.h, mach/task.h and the rest through
|
||||
* mach/mach_interface.h, so anything that chain provides is declared
|
||||
* here. A mem_stats Apple arm that starts naming a new mach symbol gets
|
||||
* its declaration added to this file - not an extra #include added to
|
||||
* mem_stats.c, which would then need a stub of its own and would still
|
||||
* be describing this harness rather than any SDK. */
|
||||
#include <stdint.h>
|
||||
typedef int kern_return_t;
|
||||
#define KERN_SUCCESS 0
|
||||
typedef unsigned int mach_port_t;
|
||||
typedef uintptr_t vm_size_t;
|
||||
typedef unsigned int mach_msg_type_number_t;
|
||||
typedef int *task_info_t;
|
||||
#define TASK_VM_INFO 22
|
||||
#define TASK_VM_INFO_COUNT 87
|
||||
typedef struct { uint64_t phys_footprint; uint64_t limit_bytes_remaining; }
|
||||
task_vm_info_data_t;
|
||||
mach_port_t mach_task_self(void);
|
||||
kern_return_t task_info(mach_port_t t, int flavor, task_info_t info,
|
||||
mach_msg_type_number_t *count);
|
||||
kern_return_t mach_port_deallocate(mach_port_t task, mach_port_t name);
|
||||
#endif
|
||||
@@ -1,14 +0,0 @@
|
||||
#ifndef STUB_MACH_HOST_H
|
||||
#define STUB_MACH_HOST_H
|
||||
#include <mach/mach.h>
|
||||
typedef int *host_info_t;
|
||||
#define HOST_VM_INFO 2
|
||||
#define HOST_VM_INFO_COUNT 15
|
||||
typedef unsigned int natural_t;
|
||||
typedef struct { natural_t free_count; natural_t inactive_count; }
|
||||
vm_statistics_data_t;
|
||||
mach_port_t mach_host_self(void);
|
||||
kern_return_t host_page_size(mach_port_t h, vm_size_t *sz);
|
||||
kern_return_t host_statistics(mach_port_t h, int flavor, host_info_t info,
|
||||
mach_msg_type_number_t *count);
|
||||
#endif
|
||||
@@ -1,9 +0,0 @@
|
||||
#ifndef STUB_SYSCTL_H
|
||||
#define STUB_SYSCTL_H
|
||||
#include <stddef.h>
|
||||
#define CTL_HW 6
|
||||
#define HW_MEMSIZE 24
|
||||
#define HW_PHYSMEM 5
|
||||
int sysctl(int *name, unsigned namelen, void *old, size_t *oldlen,
|
||||
void *newp, size_t newlen);
|
||||
#endif
|
||||
@@ -1,4 +0,0 @@
|
||||
#ifndef STUB_3DS_H
|
||||
#define STUB_3DS_H
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
#ifndef STUB_3DS_OS_H
|
||||
#define STUB_3DS_OS_H
|
||||
#include <stdint.h>
|
||||
typedef enum { MEMREGION_ALL = 0 } MemRegion;
|
||||
uint32_t osGetMemRegionSize(MemRegion region);
|
||||
uint32_t osGetMemRegionFree(MemRegion region);
|
||||
#endif
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef STUB_EM_HEAP_H
|
||||
#define STUB_EM_HEAP_H
|
||||
#include <stddef.h>
|
||||
size_t emscripten_get_heap_max(void);
|
||||
#endif
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef STUB_GCCORE_H
|
||||
#define STUB_GCCORE_H
|
||||
#include <stdint.h>
|
||||
uint32_t SYS_GetArena1Size(void);
|
||||
#endif
|
||||
@@ -1,4 +0,0 @@
|
||||
#ifndef STUB_OGCSYS_H
|
||||
#define STUB_OGCSYS_H
|
||||
#include <gccore.h>
|
||||
#endif
|
||||
@@ -1,9 +0,0 @@
|
||||
#ifndef STUB_SWITCH_H
|
||||
#define STUB_SWITCH_H
|
||||
#include <stdint.h>
|
||||
typedef uint32_t Result;
|
||||
#define R_SUCCEEDED(r) ((r) == 0)
|
||||
#define CUR_PROCESS_HANDLE 0
|
||||
typedef enum { InfoType_TotalMemorySize = 6, InfoType_UsedMemorySize = 7 } InfoType;
|
||||
Result svcGetInfo(uint64_t *out, uint32_t id, uint32_t handle, uint64_t sub);
|
||||
#endif
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef STUB_ORBIS_H
|
||||
#define STUB_ORBIS_H
|
||||
#include <stddef.h>
|
||||
void get_user_mem_size(size_t *max_mem, size_t *cur_mem);
|
||||
#endif
|
||||
@@ -1,5 +0,0 @@
|
||||
#ifndef STUB_PPU_LV2_H
|
||||
#define STUB_PPU_LV2_H
|
||||
int lv2syscall1_impl(int n, unsigned long a);
|
||||
#define lv2syscall1(n, a) lv2syscall1_impl((n), (unsigned long)(a))
|
||||
#endif
|
||||
@@ -1,12 +0,0 @@
|
||||
#ifndef STUB_WINDOWS_H
|
||||
#define STUB_WINDOWS_H
|
||||
#include <stdint.h>
|
||||
typedef uint32_t DWORD;
|
||||
typedef uint64_t DWORDLONG;
|
||||
typedef struct { DWORD dwLength; DWORD dwMemoryLoad; DWORDLONG ullTotalPhys;
|
||||
DWORDLONG ullAvailPhys; } MEMORYSTATUSEX;
|
||||
typedef struct { DWORD dwLength; DWORD dwMemoryLoad; DWORD dwTotalPhys;
|
||||
DWORD dwAvailPhys; } MEMORYSTATUS;
|
||||
void GlobalMemoryStatusEx(MEMORYSTATUSEX *s);
|
||||
void GlobalMemoryStatus(MEMORYSTATUS *s);
|
||||
#endif
|
||||
@@ -1,176 +0,0 @@
|
||||
name: CI webOS
|
||||
|
||||
on:
|
||||
push:
|
||||
tags-ignore:
|
||||
- '*'
|
||||
branches:
|
||||
- '*'
|
||||
pull_request:
|
||||
release:
|
||||
types: [ published ]
|
||||
repository_dispatch:
|
||||
types: [ run_build ]
|
||||
|
||||
env:
|
||||
PACKAGE_NAME: com.retroarch.webos
|
||||
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check Out Repo
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Download ares-cli-rs
|
||||
uses: robinraju/release-downloader@v1
|
||||
with:
|
||||
repository: "webosbrew/ares-cli-rs"
|
||||
latest: true
|
||||
fileName: "ares-package_*_amd64.deb"
|
||||
out-file-path: "temp"
|
||||
|
||||
- name: Download Manifest Generator
|
||||
uses: robinraju/release-downloader@v1
|
||||
with:
|
||||
repository: "webosbrew/dev-toolbox-cli"
|
||||
latest: true
|
||||
fileName: "webosbrew-toolbox-gen-manifest_*_amd64.deb"
|
||||
out-file-path: "temp"
|
||||
|
||||
- name: Update packages
|
||||
run: sudo apt-get -yq update
|
||||
|
||||
- name: Install webOS CLI
|
||||
run: |
|
||||
sudo apt-get -yq install \
|
||||
./temp/ares-package_*_amd64.deb \
|
||||
./temp/webosbrew-toolbox-gen-manifest_*.deb
|
||||
|
||||
- name: Download webOS (arm) NDK
|
||||
uses: robinraju/release-downloader@v1
|
||||
with:
|
||||
repository: "openlgtv/buildroot-nc4"
|
||||
latest: true
|
||||
fileName: "arm-webos-linux-gnueabi_sdk-buildroot-x86_64.tar.gz"
|
||||
out-file-path: "/tmp"
|
||||
|
||||
- name: Download webOS (aarch64) NDK
|
||||
uses: robinraju/release-downloader@v1
|
||||
with:
|
||||
repository: "cscd98/buildroot-nc4"
|
||||
latest: true
|
||||
fileName: "aarch64-webos-linux-gnu_sdk-buildroot-x86_64.tar.gz"
|
||||
out-file-path: "/tmp"
|
||||
|
||||
- name: Extract webOS NDKs
|
||||
shell: bash
|
||||
working-directory: /tmp
|
||||
run: |
|
||||
tar xzf arm-webos-linux-gnueabi_sdk-buildroot-x86_64.tar.gz
|
||||
./arm-webos-linux-gnueabi_sdk-buildroot/relocate-sdk.sh
|
||||
tar xzf aarch64-webos-linux-gnu_sdk-buildroot-x86_64.tar.gz
|
||||
./aarch64-webos-linux-gnu_sdk-buildroot/relocate-sdk.sh
|
||||
|
||||
- name: Load RARCH_VERSION from version.all
|
||||
id: version
|
||||
shell: bash
|
||||
run: |
|
||||
RARCH_VERSION=$(grep -Po '(?<=#define PACKAGE_VERSION ")[^"]+' version.all)
|
||||
echo "RARCH_VERSION=$RARCH_VERSION" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Compile RA (GLES2, no wayland legacy variant)
|
||||
shell: bash
|
||||
run: |
|
||||
. /tmp/arm-webos-linux-gnueabi_sdk-buildroot/environment-setup
|
||||
export SDK_PATH=/tmp/arm-webos-linux-gnueabi_sdk-buildroot
|
||||
make -f Makefile.webos clean
|
||||
make -f Makefile.webos ipk PACKAGE_NAME=${PACKAGE_NAME} ADD_SDL2_LIB=1 \
|
||||
-j"$(getconf _NPROCESSORS_ONLN)"
|
||||
mkdir -p webos/arm
|
||||
mv webos/com.retroarch.webos_${RARCH_VERSION}_arm.ipk \
|
||||
webos/arm/com.retroarch.webos-legacy-gles2-no-wayland_${RARCH_VERSION}_arm.ipk
|
||||
env:
|
||||
DEBUG: ${{ github.event_name == 'release' && '0' || '1' }}
|
||||
|
||||
- name: Upload GLES2 artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: com.retroarch.webos-legacy-gles2-no-wayland_${{ env.RARCH_VERSION }}_${{ github.sha }}_arm.ipk
|
||||
path: webos/arm/com.retroarch.webos-legacy-gles2-no-wayland_${{ env.RARCH_VERSION }}_arm.ipk
|
||||
archive: false
|
||||
|
||||
- name: Compile RA (default)
|
||||
shell: bash
|
||||
run: |
|
||||
. /tmp/arm-webos-linux-gnueabi_sdk-buildroot/environment-setup
|
||||
export SDK_PATH=/tmp/arm-webos-linux-gnueabi_sdk-buildroot
|
||||
make -f Makefile.webos clean
|
||||
bash gfx/common/wayland/generate_wayland_protos.sh
|
||||
make -f Makefile.webos ipk PACKAGE_NAME=${PACKAGE_NAME} ADD_SDL2_LIB=1 \
|
||||
HAVE_XKBCOMMON=1 HAVE_USERLAND=1 HAVE_EGL=1 HAVE_WAYLAND=1 \
|
||||
HAVE_OPENGLES3=1 HAVE_OPENGLES3_1=1 HAVE_OPENGLES3_2=1 -j"$(getconf _NPROCESSORS_ONLN)"
|
||||
mkdir -p webos/arm
|
||||
mv webos/com.retroarch.webos_${RARCH_VERSION}_arm.ipk \
|
||||
webos/arm/com.retroarch.webos_${RARCH_VERSION}_arm.ipk
|
||||
env:
|
||||
DEBUG: ${{ github.event_name == 'release' && '0' || '1' }}
|
||||
|
||||
- name: Upload default artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: com.retroarch.webos_${{ env.RARCH_VERSION }}_${{ github.sha }}_arm.ipk
|
||||
path: webos/arm/com.retroarch.webos_${{ env.RARCH_VERSION }}_arm.ipk
|
||||
archive: false
|
||||
|
||||
- name: Generate Manifest (default only)
|
||||
if: github.repository == 'webosbrew/Retroarch'
|
||||
shell: bash
|
||||
run: |
|
||||
webosbrew-gen-manifest -o webos/${PACKAGE_NAME}.manifest.json \
|
||||
-p webos/arm/${PACKAGE_NAME}_${RARCH_VERSION}_arm.ipk \
|
||||
-i https://github.com/webosbrew/RetroArch/raw/webos/webos/icon160.png \
|
||||
-l https://github.com/webosbrew/RetroArch
|
||||
|
||||
- name: Compile RA (aarch64)
|
||||
shell: bash
|
||||
run: |
|
||||
. /tmp/aarch64-webos-linux-gnu_sdk-buildroot/environment-setup
|
||||
export SDK_PATH=/tmp/aarch64-webos-linux-gnu_sdk-buildroot
|
||||
make -f Makefile.webos clean
|
||||
bash gfx/common/wayland/generate_wayland_protos.sh
|
||||
make -f Makefile.webos ipk PACKAGE_NAME=${PACKAGE_NAME} ADD_SDL2_LIB=0 \
|
||||
HAVE_XKBCOMMON=1 HAVE_USERLAND=1 HAVE_EGL=1 HAVE_WAYLAND=1 \
|
||||
HAVE_OPENGLES3=1 HAVE_OPENGLES3_1=1 HAVE_OPENGLES3_2=1 \
|
||||
HAVE_WAYLAND_BACKPORT=0 HAVE_64TO32BIT_BRIDGE=1 SET_ELF_INTERPRETER=1 HAVE_UDEV=1 \
|
||||
ARES_PACKAGE_ARGS="-A arm" -j"$(getconf _NPROCESSORS_ONLN)"
|
||||
mkdir -p webos/aarch64
|
||||
mv webos/com.retroarch.webos_${{ env.RARCH_VERSION }}_arm.ipk \
|
||||
webos/aarch64/com.retroarch.webos_${{ env.RARCH_VERSION }}_aarch64.ipk
|
||||
env:
|
||||
DEBUG: ${{ github.event_name == 'release' && '0' || '1' }}
|
||||
|
||||
- name: Upload aarch64 artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: com.retroarch.webos_${{ env.RARCH_VERSION }}_${{ github.sha }}_aarch64.ipk
|
||||
path: webos/aarch64/com.retroarch.webos_${{ env.RARCH_VERSION }}_aarch64.ipk
|
||||
archive: false
|
||||
|
||||
- name: Release
|
||||
if: github.event_name == 'release' && github.repository == 'webosbrew/Retroarch'
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
tag: ${{ github.event.release.tag_name }}
|
||||
allowUpdates: true
|
||||
omitNameDuringUpdate: true
|
||||
omitBody: true
|
||||
omitPrereleaseDuringUpdate: true
|
||||
artifacts: |
|
||||
webos/arm/com.retroarch.webos_${{ env.RARCH_VERSION }}_arm.ipk
|
||||
webos/arm/com.retroarch.webos-legacy-gles2-no-wayland_${{ env.RARCH_VERSION }}_arm.ipk
|
||||
webos/aarch64/com.retroarch.webos_${{ env.RARCH_VERSION }}_aarch64.ipk
|
||||
webos/${{ env.PACKAGE_NAME }}.manifest.json
|
||||
+14
-125
@@ -1,27 +1,19 @@
|
||||
*.o
|
||||
*.obj
|
||||
*.pdb
|
||||
*.exe
|
||||
*.bmpobj
|
||||
*.binobj
|
||||
*.so
|
||||
*.so.*
|
||||
*.dll
|
||||
*.a
|
||||
*.elf
|
||||
*.dol
|
||||
*.map
|
||||
*.swp
|
||||
*.cache
|
||||
*.gcda
|
||||
*.lcbk
|
||||
*.gcno
|
||||
.tmp
|
||||
.tmp.c
|
||||
.tmp.cxx
|
||||
.moc.h
|
||||
.moc.cpp
|
||||
*.log
|
||||
config.log
|
||||
/.project
|
||||
/.externalToolBuilders/
|
||||
/retroarch
|
||||
@@ -30,6 +22,8 @@
|
||||
/retroarch_debug.exe
|
||||
/config.h
|
||||
/config.mk
|
||||
/tools/retroarch-joyconfig
|
||||
/tools/retroarch-joyconfig.exe
|
||||
*.ncb
|
||||
*.sdf
|
||||
*.opensdf
|
||||
@@ -39,7 +33,6 @@ Release
|
||||
ipch
|
||||
*.user
|
||||
/bootstrap/gx/wii/app_booter/app_booter.bin
|
||||
/wii/app_booter/app_booter.bin
|
||||
*.zip
|
||||
RetroArch-w32/
|
||||
RetroArch-w64/
|
||||
@@ -74,7 +67,6 @@ apple/RetroArch_iOS.xcodeproj/project.xcworkspace/*
|
||||
/rsound.h
|
||||
.pc
|
||||
/media/shaders_glsl/
|
||||
/media/shaders_slang/
|
||||
/obj-w32/
|
||||
.cproject
|
||||
.settings
|
||||
@@ -84,34 +76,10 @@ convert_rumble.awk
|
||||
*~
|
||||
assets
|
||||
info
|
||||
content_favorites.lpl
|
||||
content_history.lpl
|
||||
content_image_history.lpl
|
||||
content_music_history.lpl
|
||||
content_video_history.lpl
|
||||
saves
|
||||
screenshots
|
||||
autoconfig
|
||||
config
|
||||
/database
|
||||
overlays
|
||||
playlists
|
||||
states
|
||||
cheats
|
||||
thumbnails
|
||||
docs/html
|
||||
system
|
||||
shaders/shaders_cg
|
||||
shaders/shaders_glsl
|
||||
shaders/shaders_slang
|
||||
|
||||
# Qt Creator
|
||||
*.cflags
|
||||
*.cxxflags
|
||||
*.creator*
|
||||
*.config
|
||||
*.files
|
||||
*.includes
|
||||
|
||||
# Wii U
|
||||
*.depend
|
||||
@@ -139,7 +107,6 @@ wiiu/wut/elf2rpl/elf2rpl
|
||||
|
||||
# CLion
|
||||
/cmake-build-debug/
|
||||
.run
|
||||
|
||||
# Android
|
||||
/pkg/android/phoenix/obj/
|
||||
@@ -148,12 +115,10 @@ wiiu/wut/elf2rpl/elf2rpl
|
||||
/pkg/android/phoenix/bin/
|
||||
/pkg/android/phoenix/gen/
|
||||
/pkg/android/phoenix/local.properties
|
||||
/pkg/android/phoenix/gradle.properties
|
||||
/pkg/android/phoenix/.gradle
|
||||
/pkg/android/phoenix/.externalNativeBuild
|
||||
/pkg/android/phoenix/build
|
||||
/pkg/android/phoenix-legacy/.project
|
||||
/pkg/android/phoenix-jelly-bean/**/.gradle/
|
||||
/pkg/android/phoenix-jelly-bean/.cxx/
|
||||
|
||||
# Cloned by libretro-fetch.sh
|
||||
/media/assets/
|
||||
@@ -162,7 +127,6 @@ wiiu/wut/elf2rpl/elf2rpl
|
||||
/media/shaders_cg/
|
||||
/media/libretrodb/
|
||||
|
||||
compile_commands.json
|
||||
pkg/apple/iOS/build/
|
||||
pkg/apple/build/
|
||||
ui/drivers/qt/moc_*
|
||||
@@ -171,26 +135,23 @@ ui/drivers/moc_*
|
||||
obj-unix/
|
||||
.vagrant/
|
||||
|
||||
# Visual Studio
|
||||
/pkg/msvc/Release Cg/*.exe
|
||||
/pkg/msvc/Release Cg/*.iobj
|
||||
/pkg/msvc/Release Cg/*.ipdb
|
||||
/pkg/msvc/Release Cg/*.pdb
|
||||
/pkg/msvc/Release Cg/*.lpl
|
||||
/pkg/msvc/Release Cg/*.cfg
|
||||
/pkg/msvc/*.db
|
||||
/pkg/msvc/.vs
|
||||
/pkg/msvc/*/.vs
|
||||
*.tlog
|
||||
*.lastbuildstate
|
||||
*.FileListAbsolute.txt
|
||||
*.res
|
||||
/pkg/msvc/msvc-2010/Release Cg/RetroArc.27FF7CE1.tlog/*.tlog
|
||||
/pkg/msvc/msvc-2010/Release Cg/RetroArc.27FF7CE1.tlog/*.lastbuildstate
|
||||
/pkg/msvc/msvc-2010/Release Cg/*.log
|
||||
/pkg/msvc/msvc-2010/Release Cg/*.obj
|
||||
/pkg/msvc/msvc-2010/Release Cg/*.res
|
||||
/pkg/msvc/msvc-2010/Release Cg/*.pdb
|
||||
retroarch.cfg
|
||||
Makefile.local
|
||||
pkg/msvc/**/ARM
|
||||
pkg/msvc/**/ARM64
|
||||
pkg/msvc/**/* Cg
|
||||
pkg/msvc/**/* QT
|
||||
pkg/msvc/**/* QT+CG
|
||||
pkg/msvc/**/x64
|
||||
|
||||
# Emscripten artifacts
|
||||
|
||||
@@ -198,8 +159,6 @@ retroarch.js
|
||||
retroarch.js.mem
|
||||
*.bc
|
||||
*.wasm
|
||||
*.wasm.map
|
||||
obj-emscripten/
|
||||
|
||||
# only ignore .js files in the repo root
|
||||
/*.js
|
||||
@@ -214,13 +173,10 @@ retroarch_switch.nro
|
||||
retroarch_switch.nso
|
||||
|
||||
# PS2
|
||||
*_irx.c
|
||||
ps2/irx/*.c
|
||||
ps2/libcdvd/lib/
|
||||
|
||||
# Wayland
|
||||
gfx/common/wayland/fractional-scale-v1.c
|
||||
gfx/common/wayland/fractional-scale-v1.h
|
||||
gfx/common/wayland/viewporter.c
|
||||
gfx/common/wayland/viewporter.h
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.c
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.h
|
||||
gfx/common/wayland/xdg-shell-unstable-v6.c
|
||||
@@ -229,70 +185,3 @@ gfx/common/wayland/xdg-decoration-unstable-v1.h
|
||||
gfx/common/wayland/xdg-decoration-unstable-v1.c
|
||||
gfx/common/wayland/xdg-shell.c
|
||||
gfx/common/wayland/xdg-shell.h
|
||||
gfx/common/wayland/pointer-constraints-unstable-v1.c
|
||||
gfx/common/wayland/pointer-constraints-unstable-v1.h
|
||||
gfx/common/wayland/presentation-time.h
|
||||
gfx/common/wayland/presentation-time.c
|
||||
gfx/common/wayland/relative-pointer-unstable-v1.c
|
||||
gfx/common/wayland/relative-pointer-unstable-v1.h
|
||||
gfx/common/wayland/viewporter.c
|
||||
gfx/common/wayland/viewporter.h
|
||||
gfx/common/wayland/cursor-shape-v1.h
|
||||
gfx/common/wayland/cursor-shape-v1.c
|
||||
gfx/common/wayland/tablet-unstable-v2.h
|
||||
gfx/common/wayland/tablet-unstable-v2.c
|
||||
gfx/common/wayland/content-type-v1.h
|
||||
gfx/common/wayland/content-type-v1.c
|
||||
gfx/common/wayland/single-pixel-buffer-v1.h
|
||||
gfx/common/wayland/single-pixel-buffer-v1.c
|
||||
gfx/common/wayland/xdg-toplevel-icon-v1.h
|
||||
gfx/common/wayland/xdg-toplevel-icon-v1.c
|
||||
gfx/common/wayland/xdg-toplevel-tag-v1.h
|
||||
gfx/common/wayland/xdg-toplevel-tag-v1.c
|
||||
gfx/common/wayland/webos-foreign.c
|
||||
gfx/common/wayland/webos-foreign.h
|
||||
gfx/common/wayland/webos-input-manager.c
|
||||
gfx/common/wayland/webos-input-manager.h
|
||||
gfx/common/wayland/webos-shell.c
|
||||
gfx/common/wayland/webos-shell.h
|
||||
gfx/common/wayland/webos-surface-group.c
|
||||
gfx/common/wayland/webos-surface-group.h
|
||||
gfx/common/wayland/tearing-control-v1.h
|
||||
gfx/common/wayland/tearing-control-v1.c
|
||||
|
||||
# libretro-common samples
|
||||
libretro-common/samples/streams/rzip/rzip
|
||||
libretro-common/samples/audio/audio_mixer_loop/audio_mixer_loop_test
|
||||
|
||||
# DINGUX
|
||||
*.opk
|
||||
|
||||
#VITA
|
||||
param.sfo
|
||||
*.wo
|
||||
*.elf
|
||||
*.self
|
||||
*.vpk
|
||||
/.vs
|
||||
/deps/SPIRV-Cross/out/build/x64-Debug
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/
|
||||
|
||||
# Clazy
|
||||
*.clazy.yaml
|
||||
|
||||
# PSL1GHT
|
||||
*.SELF
|
||||
EBOOT.BIN
|
||||
pkg/psl1ght/*.pkg
|
||||
modern_alpha_blend_fpo.h
|
||||
modern_alpha_blend_vpo.h
|
||||
modern_opaque_fpo.h
|
||||
modern_opaque_vpo.h
|
||||
gfx/drivers/rsx_shaders/modern_alpha_blend.fpo
|
||||
gfx/drivers/rsx_shaders/modern_alpha_blend.vpo
|
||||
gfx/drivers/rsx_shaders/modern_opaque.fpo
|
||||
gfx/drivers/rsx_shaders/modern_opaque.vpo
|
||||
pkg/psl1ght/pkg/USRDIR/shaders_cg/
|
||||
!pkg/psl1ght/pkg/USRDIR/system/
|
||||
+6
-1214
File diff suppressed because it is too large.
Load diff
+25
-14
@@ -40,16 +40,12 @@ matrix:
|
||||
env: CXX_BUILD=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_MENU=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_NETWORKING=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_OVERLAY=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_CDROM=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_VIDEO_LAYOUT=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_THREADS=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_AUDIOMIXER=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
@@ -70,14 +66,37 @@ matrix:
|
||||
script:
|
||||
- ./configure --enable-opengl --disable-metal
|
||||
- make
|
||||
- os: osx
|
||||
osx_image: xcode8
|
||||
script:
|
||||
- xcodebuild -target RetroArch -configuration Release -project pkg/apple/RetroArch.xcodeproj
|
||||
- os: osx
|
||||
osx_image: xcode11.2
|
||||
script:
|
||||
- brew update-reset
|
||||
- brew install --force-bottle qt5
|
||||
- security create-keychain -p travis build.keychain
|
||||
- security default-keychain -s build.keychain
|
||||
- security unlock-keychain -p travis build.keychain
|
||||
- echo $OSX_CERT | base64 --decode > dev.p12
|
||||
- security import dev.p12 -k build.keychain -P $OSX_CERT_PASS -T /usr/bin/codesign
|
||||
- rm dev.p12
|
||||
- security set-key-partition-list -S "apple-tool:,apple:,codesign:" -s -k travis build.keychain
|
||||
- xcodebuild -target RetroArchQt -configuration Release -project pkg/apple/RetroArch_Metal.xcodeproj
|
||||
deploy:
|
||||
skip_cleanup: true
|
||||
provider: script
|
||||
script: bash travis_metal_deploy.sh
|
||||
on:
|
||||
branch: master
|
||||
- language: android
|
||||
# Android builds are only supported on Trusty
|
||||
dist: trusty
|
||||
android:
|
||||
components:
|
||||
- tools
|
||||
- build-tools-29.0.3
|
||||
- android-29
|
||||
- build-tools-28.0.3
|
||||
- android-28
|
||||
install:
|
||||
- echo y | sdkmanager "ndk-bundle"
|
||||
before_script:
|
||||
@@ -117,10 +136,6 @@ before_script:
|
||||
if [ -n "$DISABLE_OVERLAY" ]; then
|
||||
ARGS="$ARGS --disable-overlay"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$DISABLE_NETWORKING" ]; then
|
||||
ARGS="$ARGS --disable-networking"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$DISABLE_CDROM" ]; then
|
||||
ARGS="$ARGS --disable-cdrom"
|
||||
@@ -129,10 +144,6 @@ before_script:
|
||||
if [ -n "$DISABLE_VIDEO_LAYOUT" ]; then
|
||||
ARGS="$ARGS --disable-video_layout"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$DISABLE_THREADS" ]; then
|
||||
ARGS="$ARGS --disable-threads --disable-glslang"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$DISABLE_AUDIOMIXER" ]; then
|
||||
ARGS="$ARGS --disable-audiomixer"
|
||||
|
||||
Vendored
+155
@@ -0,0 +1,155 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"macFrameworkPath": [
|
||||
"/System/Library/Frameworks",
|
||||
"/Library/Frameworks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include",
|
||||
"${workspaceRoot}/libretro-common/include"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}",
|
||||
"${workspaceFolder}/libretro-common/include"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/um",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/ucrt",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/shared",
|
||||
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.15063.0/winrt",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw32",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw32/include",
|
||||
"C:/msys64/mingw32/i686-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw64",
|
||||
"includePath": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE"
|
||||
],
|
||||
"intelliSenseMode": "msvc-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"C:/msys64/mingw64/include",
|
||||
"C:/msys64/mingw64/x86_64-w64-mingw32/include",
|
||||
"${workspaceRoot}/libretro-common/include",
|
||||
"${workspaceRoot}/include",
|
||||
"${workspaceRoot}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Switch",
|
||||
"includePath": [
|
||||
"/opt/devkitpro/devkitA64/aarch64-none-elf/include",
|
||||
"/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/8.3.0/include",
|
||||
"/opt/devkitpro/libnx/include",
|
||||
"/opt/devkitpro/portlibs/switch/include",
|
||||
"/opt/devkitpro/portlibs/switch/include/freetype2",
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE",
|
||||
"_UNICODE",
|
||||
"__aarch64__",
|
||||
"__SWITCH__",
|
||||
"HAVE_LIBNX"
|
||||
],
|
||||
"windowsSdkVersion": "10.0.17763.0",
|
||||
"compilerPath": "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-gcc",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++11",
|
||||
"intelliSenseMode": "gcc-x64"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
Vendored
+70
@@ -0,0 +1,70 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "(gdb) Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/retroarch.exe",
|
||||
"args": ["-v"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "c:\\msys64\\mingw64\\bin\\gdb.exe",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "(gdb) Attach",
|
||||
"type": "cppdbg",
|
||||
"request": "attach",
|
||||
"program": "${workspaceFolder}/retroarch.exe",
|
||||
"processId": "${command:pickProcess}",
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "c:\\msys64\\mingw64\\bin\\gdb.exe",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "PSP-GDB Debugger",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/retroarchpsp.elf",
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"setupCommands": [
|
||||
{
|
||||
"text": "symbol-file ${workspaceFolder}/retroarchpsp.elf",
|
||||
"description": "read symbols for elf file",
|
||||
"ignoreFailures": true
|
||||
},
|
||||
{
|
||||
"description": "Enable all-exceptions",
|
||||
"text": "-exec \"catch throw\"",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
],
|
||||
"showDisplayString": true,
|
||||
"targetArchitecture": "mips",
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "/usr/local/pspdev/bin/psp-gdb",
|
||||
"miDebuggerServerAddress": "127.0.0.1:10001",
|
||||
}
|
||||
]
|
||||
}
|
||||
Vendored
+72
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
|
||||
"terminal.integrated.env.windows": {
|
||||
"PATH": "/mingw64/lib/ccache/bin:/mingw64/lib/ccache/bin:/mingw64/lib/ccache/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:$PATH",
|
||||
"MSYSTEM": "MINGW64",
|
||||
},
|
||||
"terminal.integrated.cursorBlinking": true,
|
||||
|
||||
"editor.tabSize": 3,
|
||||
"editor.detectIndentation": false,
|
||||
"editor.renderWhitespace": "all",
|
||||
"editor.insertSpaces": true,
|
||||
"files.associations": {
|
||||
"frontend_driver.h": "c",
|
||||
"*.in": "c",
|
||||
"*.rh": "c",
|
||||
"array": "c",
|
||||
"file_stream.h": "c",
|
||||
"driver.h": "c",
|
||||
"iosfwd": "c",
|
||||
"xlocbuf": "c",
|
||||
"xmemory0": "c",
|
||||
"ios": "c",
|
||||
"list": "c",
|
||||
"input_driver.h": "c",
|
||||
"menu_driver.h": "c",
|
||||
"file_path.h": "c",
|
||||
"unordered_map": "c",
|
||||
"unordered_set": "c",
|
||||
"sstream": "cpp",
|
||||
"hash_map": "c",
|
||||
"hash_set": "c",
|
||||
"initializer_list": "c",
|
||||
"string_view": "c",
|
||||
"utility": "c",
|
||||
"menu_input.h": "c",
|
||||
"tasks_internal.h": "c",
|
||||
"ozone.h": "c",
|
||||
"ozone_theme.h": "c",
|
||||
"ozone_texture.h": "c",
|
||||
"string_list.h": "c",
|
||||
"core_info.h": "c",
|
||||
"thread": "c",
|
||||
"xlocale": "c",
|
||||
"gfx_widgets.h": "c",
|
||||
"message_queue.h": "c",
|
||||
"task_queue.h": "c",
|
||||
"fifo_queue.h": "c",
|
||||
"file_list.h": "c",
|
||||
"strl.h": "c",
|
||||
"configuration.h": "c",
|
||||
"ozone_display.h": "c",
|
||||
"verbosity.h": "c",
|
||||
"retroarch.h": "c",
|
||||
"gfx_animation.h": "c",
|
||||
"netplay.h": "c",
|
||||
"scaler.h": "c",
|
||||
"deque": "c",
|
||||
"vector": "c",
|
||||
"xhash": "c",
|
||||
"xiosbase": "c",
|
||||
"xstring": "c",
|
||||
"xtree": "c",
|
||||
"xutility": "c",
|
||||
"menu_input_dialog.h": "c",
|
||||
"menu_filebrowser.h": "c",
|
||||
"ozone_sidebar.h": "c",
|
||||
"menu_thumbnail_path.h": "c",
|
||||
"badges.h": "c"
|
||||
},
|
||||
"C_Cpp.dimInactiveRegions": false,
|
||||
}
|
||||
Vendored
+128
@@ -0,0 +1,128 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "linux clean build",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "make clean && ./configure && make -j12"
|
||||
},
|
||||
{
|
||||
"label": "linux clean",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "make clean"
|
||||
},
|
||||
{
|
||||
"label": "linux build with debug symbols",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "DEBUG=1 make -j12"
|
||||
},
|
||||
{
|
||||
"label": "linux build",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "make -j12"
|
||||
},
|
||||
{
|
||||
"label": "linux build and run",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "make -j12 && ./retroarch -v"
|
||||
},
|
||||
{
|
||||
"label": "linux build and run with debug symbols",
|
||||
"type": "shell",
|
||||
"group": "build",
|
||||
"command": "DEBUG=1 make -j12 && ./retroarch -v"
|
||||
},
|
||||
{
|
||||
"label": "msys2-mingw64 build",
|
||||
"type": "shell",
|
||||
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
|
||||
"command": "./configure; make -j2",
|
||||
"options": {
|
||||
"shell": {
|
||||
"executable": "C:\\msys64\\usr\\bin\\bash.exe",
|
||||
"args": [
|
||||
"-c"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "msys2-mingw64 build with debug symbols",
|
||||
"type": "shell",
|
||||
|
||||
"group": "build",
|
||||
|
||||
"command": "./configure; DEBUG=1 make -j2",
|
||||
"options": {
|
||||
"shell": {
|
||||
"executable": "C:\\msys64\\usr\\bin\\bash.exe",
|
||||
"args": [
|
||||
"-c"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "msys2-mingw64 rebuild",
|
||||
"type": "shell",
|
||||
|
||||
"group": "build",
|
||||
|
||||
"command": "make -j2",
|
||||
"options": {
|
||||
"shell": {
|
||||
"executable": "C:\\msys64\\usr\\bin\\bash.exe",
|
||||
"args": [
|
||||
"-c"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "msys2-mingw64 clean",
|
||||
"type": "shell",
|
||||
|
||||
"group": "build",
|
||||
|
||||
"command": "make clean",
|
||||
"options": {
|
||||
"shell": {
|
||||
"executable": "C:\\msys64\\usr\\bin\\bash.exe",
|
||||
"args": [
|
||||
"-c"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "msys2-mingw64 run",
|
||||
"type": "shell",
|
||||
|
||||
"group": {
|
||||
"kind": "test",
|
||||
"isDefault": true },
|
||||
|
||||
"command": "./retroarch -v",
|
||||
"options": {
|
||||
"shell": {
|
||||
"executable": "C:\\msys64\\usr\\bin\\bash.exe",
|
||||
"args": [
|
||||
"-c"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
diff --git a/gfx/drivers_context/wgl_ctx.c b/gfx/drivers_context/wgl_ctx.c
|
||||
index b90a8e40c3..e57c4df194 100644
|
||||
--- a/gfx/drivers_context/wgl_ctx.c
|
||||
+++ b/gfx/drivers_context/wgl_ctx.c
|
||||
@@ -78,6 +78,47 @@
|
||||
#ifndef WGL_CONTEXT_DEBUG_BIT_ARB
|
||||
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
|
||||
#endif
|
||||
+
|
||||
+#ifndef WGL_ACCELERATION_ARB
|
||||
+#define WGL_ACCELERATION_ARB 0x2003
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_FULL_ACCELERATION_ARB
|
||||
+#define WGL_FULL_ACCELERATION_ARB 0x2027
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_DRAW_TO_WINDOW_ARB
|
||||
+#define WGL_DRAW_TO_WINDOW_ARB 0x2001
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_DOUBLE_BUFFER_ARB
|
||||
+#define WGL_DOUBLE_BUFFER_ARB 0x2011
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_RED_BITS_ARB
|
||||
+#define WGL_RED_BITS_ARB 0x2015
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_GREEN_BITS_ARB
|
||||
+#define WGL_GREEN_BITS_ARB 0x2017
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_BLUE_BITS_ARB
|
||||
+#define WGL_BLUE_BITS_ARB 0x2019
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_ALPHA_BITS_ARB
|
||||
+#define WGL_ALPHA_BITS_ARB 0x201B
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_PIXEL_TYPE_ARB
|
||||
+#define WGL_PIXEL_TYPE_ARB 0x2013
|
||||
+#endif
|
||||
+
|
||||
+#ifndef WGL_TYPE_RGBA_ARB
|
||||
+#define WGL_TYPE_RGBA_ARB 0x202B
|
||||
+#endif
|
||||
+
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPENGL)
|
||||
@@ -313,6 +354,43 @@ static void create_gl_context(HWND hwnd, bool *quit)
|
||||
RARCH_LOG("[WGL]: Adaptive VSync supported.\n");
|
||||
wgl_adaptive_vsync = true;
|
||||
}
|
||||
+ if (wgl_has_extension("WGL_ARB_pixel_format", extensions))
|
||||
+ {
|
||||
+ BOOL (WINAPI * wglChoosePixelFormatARB)
|
||||
+ (HDC hdc,
|
||||
+ const int *piAttribIList,
|
||||
+ const FLOAT *pfAttribFList,
|
||||
+ UINT nMaxFormats,
|
||||
+ int *piFormats,
|
||||
+ UINT *nNumFormats);
|
||||
+ UINT nMatchingFormats;
|
||||
+ int index = 0;
|
||||
+ int attribsDesired[] = {
|
||||
+ WGL_DRAW_TO_WINDOW_ARB, 1,
|
||||
+ WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
|
||||
+ WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB,
|
||||
+ WGL_RED_BITS_ARB, 10,
|
||||
+ WGL_GREEN_BITS_ARB, 10,
|
||||
+ WGL_BLUE_BITS_ARB, 10,
|
||||
+ WGL_ALPHA_BITS_ARB, 2,
|
||||
+ WGL_DOUBLE_BUFFER_ARB, 1,
|
||||
+ 0,0
|
||||
+ };
|
||||
+ wglChoosePixelFormatARB = (BOOL (WINAPI *) (HDC, const int *,
|
||||
+ const FLOAT*, UINT, int*, UINT*))
|
||||
+ gfx_ctx_wgl_get_proc_address("wglChoosePixelFormatARB");
|
||||
+
|
||||
+ RARCH_LOG("[WGL]: ARB pixel format supported.\n");
|
||||
+
|
||||
+ if (wglChoosePixelFormatARB(win32_hdc, attribsDesired,
|
||||
+ NULL, 1, &index, &nMatchingFormats))
|
||||
+ {
|
||||
+ if (nMatchingFormats == 0)
|
||||
+ {
|
||||
+ RARCH_WARN("No 10bpc WGL_ARB_pixel_formats found!\n");
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -3,511 +3,319 @@ RetroArch and the libretro team would like to
|
||||
acknowledge the following contributors:
|
||||
|
||||
1ch (L0sted)
|
||||
23rd
|
||||
6lackmag3
|
||||
A Schain (aschain)
|
||||
Aaahh Ahh (Aaahh)
|
||||
Aaron Oneal (aarononeal)
|
||||
Aaron Ramirez (aaronbytes)
|
||||
Abadede
|
||||
Adam Londero (alondero)
|
||||
Adam Mechtley (amechtley)
|
||||
Adriano de Moura Leite (amlib)
|
||||
Adrien Moulin (elyosh)
|
||||
Aethyrion
|
||||
AdrianoML
|
||||
ajefr
|
||||
AKuHAK
|
||||
Alberto Alonso Ruibal (albertoruibal)
|
||||
Alberto Fustinoni (albertofustinoni)
|
||||
Alberto Simon (asimonf)
|
||||
Alcaro
|
||||
aldebaran27
|
||||
Aleksey Samoilov (Sunderland93)
|
||||
Alessandro Mangone (Vektor) (zevektor)
|
||||
Alex Eckhart (alex34567)
|
||||
Alex Folland (AlexFolland)
|
||||
Alex Kornitzer (alexkornitzer)
|
||||
Alexander Spady (alkaseltzerspadt)
|
||||
Alexander Trufanov (trufanov-nok)
|
||||
Alexandre Garcia (Alexandre-Garcia)
|
||||
Alfredo Monclus (alfrix)
|
||||
aliaspider
|
||||
alphanu1
|
||||
altiereslima
|
||||
Alwin Garside (Yogarine)
|
||||
amtz
|
||||
Anders Storhaug (andersstorhaug)
|
||||
Amiga1200Gamer (amigagamer)
|
||||
Andre Leiradella (leiradel)
|
||||
Andrés (fr500)
|
||||
Andy Nguyen (TheOfficialFloW)
|
||||
Anthony J. Bentley (bentley)
|
||||
Antonio Jose Ramos Marquez (psxdev)
|
||||
antonioginer
|
||||
Apaczer
|
||||
AridRayne
|
||||
ArnaudFaucher
|
||||
arpruss
|
||||
arstn
|
||||
Artem Polishchuk (tim77)
|
||||
Arto Vainiolehto (arakerlu)
|
||||
asavah
|
||||
Ash (ashquarky)
|
||||
Ash (QuarkTheAwesome)
|
||||
Ashura (CoalaJoe)
|
||||
Autechre64
|
||||
Avton1
|
||||
ayssia
|
||||
BananaRama203
|
||||
barbudreadmon
|
||||
Barry Rowe (BarryJRowe)
|
||||
Bartłomiej Burdukiewicz (dev-0x7C6)
|
||||
Bashar Astifan (basharast)
|
||||
bearoso
|
||||
Ben Hamilton (Ben Gertzfield) (bhamiltoncx)
|
||||
benklop
|
||||
benutzer193
|
||||
Bernhard Schelling (schellingb)
|
||||
blackgur
|
||||
bmaupin
|
||||
Bobby Smith (bslenul)
|
||||
Boris Timofeev (btimofeev)
|
||||
Brad (SpiralBrad)
|
||||
Braden Farmer (farmerbb)
|
||||
Brandon Johnson (BinaryFissionGames)
|
||||
Breno Dantas Mendonça (brenodantas10)
|
||||
Brian Hoem (ZornTaov)
|
||||
bparker06
|
||||
Brandon Johnson (Denu8thell)
|
||||
Brian Koropoff (bkoropoff)
|
||||
Brian S. Stephan (bsstephan)
|
||||
BringerethOfLight
|
||||
Brunnis
|
||||
bsmith (DogParty)
|
||||
bubuleur
|
||||
bulzipke
|
||||
C.W. Betts (MaddTheSane)
|
||||
Casey Borders (CaseyB)
|
||||
CatGreen90
|
||||
ceb33
|
||||
cedorg
|
||||
celerizer
|
||||
Charlène (julianaito)
|
||||
CheezeCake
|
||||
Chris Merrett (chrisfu)
|
||||
Christian Murphy (grimpunch)
|
||||
christianhaitian
|
||||
Christoffer Tibell (Brottweiler)
|
||||
Christopher Snowhill (kode54)
|
||||
chu (9chu)
|
||||
Chuck Smith (chucksmith)
|
||||
CidVonHighwind
|
||||
clienthax
|
||||
cold-brewed
|
||||
Colin Kinloch (ColinKinloch)
|
||||
CompCom
|
||||
ComradeEcho
|
||||
confusedguy9
|
||||
Conn O'Griofa (psyke83)
|
||||
Connor McLaughlin (stenzek)
|
||||
Conrad Kreyling (konistehrad)
|
||||
CozmoP
|
||||
Cpasjuste
|
||||
cpsw
|
||||
Cray Elliott (MP2E)
|
||||
Crestwave
|
||||
CrewMdk
|
||||
Cristi Mitrana (cmitu)
|
||||
Cristian Sandu (crazyquark)
|
||||
crystalct
|
||||
CTCaer
|
||||
ctult
|
||||
cucholix
|
||||
cudencuden
|
||||
CyberLabSystems
|
||||
Daehan Kim (iAmGhost)
|
||||
cxd4
|
||||
dalter
|
||||
Dan Weiss (Dwedit)
|
||||
danieljg
|
||||
Daniil Zhilin (LaserMoai)
|
||||
dankcushions
|
||||
Darren Thompson (DiscoStarslayer)
|
||||
Dave (freakdave)
|
||||
Dave Leaver (danzel)
|
||||
David CARLIER (devnexen)
|
||||
David Demelier (markand)
|
||||
David Erickson (daviderickson)
|
||||
David G. F. (davidgfnet)
|
||||
David Lawson (dmrlawson)
|
||||
David Shah (daveshah1)
|
||||
David Walters (hiddenasbestos)
|
||||
dbaronica
|
||||
DEX357
|
||||
diablodiab
|
||||
dibas
|
||||
Diego A. (SuperrSonic)
|
||||
Diego Viola (diegoviola)
|
||||
digitalisland-nino
|
||||
Diogo Barros (BlueKore)
|
||||
Dmitry Sergeenkov (DuMOHsmol)
|
||||
DogParty
|
||||
dor3k
|
||||
Doug Christman (dobyrch)
|
||||
driver1998
|
||||
Dudu Akiva (duduke)
|
||||
duganchen
|
||||
dukemiller
|
||||
duskgao
|
||||
Dylan Scott (dyscott)
|
||||
Dystopian
|
||||
eadmaster
|
||||
Eduard Strehlau (Herdinger)
|
||||
ekipan
|
||||
Elvira Khabirova (parport0)
|
||||
embercold
|
||||
Emmanuel Martin (daliaetnano)
|
||||
endrift
|
||||
erbridge
|
||||
esoptron
|
||||
Ethan Lee (flibitijibibo)
|
||||
extrowerk
|
||||
Exvat
|
||||
Ezio-PS
|
||||
F (erbridge)
|
||||
Fabio (Oibaf66)
|
||||
Fabio Ritrovato (Sephiroth87)
|
||||
Fayne Aldan (FayneAldan)
|
||||
fff (felinben)
|
||||
Filipe Azevedo (pasnox)
|
||||
FIX94
|
||||
Flame Sage (flamesage)
|
||||
Flame Sage (chris062689)
|
||||
flyinghead
|
||||
FmT0
|
||||
francescotintori
|
||||
Francisco Javier Trujillo Mata (fjtrujy)
|
||||
Francisco José García García (frangarcj)
|
||||
FreeShippingParty
|
||||
fuzzydunlops732 (JKoppel93)
|
||||
GABO1423
|
||||
Gabriel (Ghabry)
|
||||
GameDragon2k
|
||||
Garrett Brown (garbear)
|
||||
gatecat (daveshah1)
|
||||
GavinDarkglider
|
||||
gblues
|
||||
Geoffrey Plitt (GeoffreyPlitt)
|
||||
Giovanni Cascione (spleen1981)
|
||||
Glenn Hevey (hevey)
|
||||
Googer
|
||||
gordon-fish
|
||||
gouchi
|
||||
grant2258
|
||||
Gregor Richards (GregorR)
|
||||
Grzegorz Raciborski (graciborski)
|
||||
Gui Andrade (archshift)
|
||||
Guillaume Thiolliere (thiolliere)
|
||||
Guo Yunhe (guoyunhe)
|
||||
Gustavo Maciel Dias Vieira (gmdvieira)
|
||||
gvbr
|
||||
H. İbrahim Güngör (igungor)
|
||||
hadess
|
||||
Hans-Kristian Arntzen (Themaister)
|
||||
Henri Gomez (hgomez)
|
||||
Henri Gomez (hgomez-sonarsource)
|
||||
Henry Castro (hcvcastro)
|
||||
Higor E. (heuripedes)
|
||||
Higor Eurípedes (heuripedes)
|
||||
Hisman Yosika (dnjstlr555)
|
||||
hizzlekizzle
|
||||
Hugo B. (hug0b)
|
||||
Hugo Hromic (hhromic)
|
||||
hunterk
|
||||
hyarsan
|
||||
Hyllian
|
||||
HyperspaceMadness
|
||||
i30817
|
||||
im4potato
|
||||
ImJezze
|
||||
İbrahim Güngör (igungor)
|
||||
iAmGhost
|
||||
Jack (jakcron)
|
||||
Jacob (cubtekki)
|
||||
Jacob (RegenJacob)
|
||||
Jacob Patterson (jacobpa)
|
||||
jacobsson (Roet-Ivar)
|
||||
Jahed
|
||||
Jake Stine (jstine35)
|
||||
James Le Cuirot (chewi)
|
||||
James Sexton (Bezier89)
|
||||
Jamiras
|
||||
Jan Holthuis (Holzhaus)
|
||||
Jason Tomsic (plaidman)
|
||||
Javier Martinez Canillas (martinezjavier)
|
||||
Jay McCarthy (jeapostrophe)
|
||||
jdgleaver
|
||||
Jean-André Santoni (kivutar)
|
||||
Jean-Paul Mari (djipi)
|
||||
Jean-Sébastien Guay (Skylark13)
|
||||
Jeff (jeffbdavenport)
|
||||
Jeff Sousa (LordeIlluminati)
|
||||
jess (winneon)
|
||||
Jesse Talavera-Greenberg (JesseTG)
|
||||
Joan Coll Cerdán (johanbcn)
|
||||
Job Adrian Salinas Gonzalez (efylan)
|
||||
Joe Osborn (JoeOsborn)
|
||||
Jesse Bryan (winneon)
|
||||
Joel (joel16)
|
||||
Joel Puig Rubio (XXLuigiMario)
|
||||
Joerg Sonnenberger (jsonn)
|
||||
Johannes Schickel (lordhoto)
|
||||
John Parton (john-parton)
|
||||
John Regan (jprjr)
|
||||
Jon Maddox (maddox)
|
||||
Jonathan (JonnyMe)
|
||||
Jonathan Relf (jonathanrelf)
|
||||
Joohan Lee (losernator)
|
||||
Jools Wills (joolswills)
|
||||
Jose Lage Miguez (Joselagem)
|
||||
Joseph Carter (knghtbrd)
|
||||
Joseph Carter (iKarith)
|
||||
Joseph Conan Montgomery (Grotke)
|
||||
jsd1982 (JamesDunne)
|
||||
jSTE0
|
||||
Josh Palmer (ShiftyAxel)
|
||||
JuanVCS
|
||||
Justin Jacobs (dorkster)
|
||||
Justin Weiss (justinweiss)
|
||||
JustMeDaFaq
|
||||
Kangmo-Ahn
|
||||
Karl Forshaw (karlforshaw)
|
||||
Kate Eckhart (katepango)
|
||||
Keith Bowes (keithbowes)
|
||||
Ken Rossato (rossato)
|
||||
kikmon
|
||||
Kopert
|
||||
Krzysztof Haładyn (krzys_h) (krzys-h)
|
||||
krzys_h (krzys-h)
|
||||
kurumushi
|
||||
kwyxz
|
||||
l3iggs
|
||||
lambolighting
|
||||
lasers
|
||||
Lawrence Kesteloot (lkesteloot)
|
||||
LazyBumHorse
|
||||
LazyFunker
|
||||
Lennard Kittner (Lennard599)
|
||||
LibretroAdmin
|
||||
lifajucejo
|
||||
liffy (lifning)
|
||||
Lionel Flandrin (simias)
|
||||
littleguy77
|
||||
liushuyu
|
||||
Logan McNaughton (loganmc10)
|
||||
Logan (loganmc10)
|
||||
lordashram
|
||||
Lothar Serra Mari (lotharsm)
|
||||
Lubosz Sarnecki (lubosz)
|
||||
lucasmr
|
||||
lucianposton
|
||||
lxerandrew
|
||||
m4xw
|
||||
mahoneyt944
|
||||
Mahyar Koshkouei (deltabeard)
|
||||
Mai (lioncash)
|
||||
MajorPainTheCactus
|
||||
maksun
|
||||
Manuel Alfayate Corchete (vanfanel)
|
||||
Marcelo Munhoz Pélos (mpelos)
|
||||
Marcus Crisostomo (mcrisostomo)
|
||||
markwkidd
|
||||
Maschell
|
||||
Mats (Myaats)
|
||||
Mat M. (lioncash)
|
||||
Mats A. (Datamats)
|
||||
Matt Sephton (gingerbeardman)
|
||||
Matthew Bauer (matthewbauer)
|
||||
Matthew Wang (asakous)
|
||||
Max K. (langerhans)
|
||||
Maxime Gauduin (alucryd)
|
||||
mcrisostomo
|
||||
meancoot
|
||||
meepingsnesroms
|
||||
meleu
|
||||
Merry Mello (merryMellody)
|
||||
micechal
|
||||
Michael Burgardt (DisasterMo)
|
||||
Michael K. (kuxii2016)
|
||||
Michael Lelli (ToadKing)
|
||||
Michał Durak (micechal)
|
||||
mickski56
|
||||
Mico Chopitea (micochops)
|
||||
miguelpinheiro
|
||||
Mike Swanson (chungy)
|
||||
mikeOSX
|
||||
minucce
|
||||
miqlas (extrowerk)
|
||||
misson20000
|
||||
esoptron
|
||||
Monroe88
|
||||
Morgane (MorganeAD)
|
||||
mprobinson
|
||||
MrHuu
|
||||
MrJs (mrjschulte)
|
||||
Muhamed Hobi (mmhobi7)
|
||||
muzuiget
|
||||
N/A (inactive123)
|
||||
Nargash
|
||||
mwtremblay
|
||||
myfreeweb
|
||||
Nathan S. (natinusala)
|
||||
NathanStrong-Tripwire
|
||||
nattycleopatra
|
||||
Naveen (naveensrinivasan)
|
||||
nayslayer
|
||||
negativeExponent
|
||||
Neil Barkhina (nbarkhina)
|
||||
neil4
|
||||
netux79
|
||||
nfnty
|
||||
nfp0
|
||||
nia (alarixnia)
|
||||
nia (ensra)
|
||||
Nicolas Adenis-Lamarre (nadenislamarre)
|
||||
Nicolas Guillaumin (nguillaumin)
|
||||
Nicolas Roehm (NicolasRoehm)
|
||||
Nik (WerWolv)
|
||||
Nikita Vakhrushev (XF10C)
|
||||
Nicolas Lopez Fernandez (pyroesp)
|
||||
Nikita Vakhrushev (SwooodGa)
|
||||
Nikola Kocić (nikola-kocic)
|
||||
Nikos Chantziaras (realnc)
|
||||
Nils Hasenbanck (hasenbanck)
|
||||
njordan64
|
||||
Niouby
|
||||
nosh01
|
||||
not6 (r-type)
|
||||
notaz
|
||||
nstCactus
|
||||
nurupo
|
||||
Oggom
|
||||
Oh Won Sik (dnjstlr555)
|
||||
Oleg Shevchenko (olsh)
|
||||
Omar Saleem (ofsaleem)
|
||||
opendata26
|
||||
Ophidon
|
||||
orbea
|
||||
Oschowa
|
||||
OsirizX
|
||||
OV2
|
||||
Palmic (mpalomas)
|
||||
pamapa
|
||||
Paolo Bonzini (bonzini)
|
||||
Paul McCarty (notabeatle)
|
||||
pcjco
|
||||
Pedro Ferraz (ferrazpedro)
|
||||
Pedro Ribeiro (pedrib)
|
||||
Peter J Kos (pkos)
|
||||
Philippe Simons (loki666)
|
||||
pinumbernumber
|
||||
Piotr Dobrowolski (Informatic)
|
||||
pjft
|
||||
Poligraf
|
||||
pponso1
|
||||
pyroesp
|
||||
R-YaTian
|
||||
Rafael Toledo (rafaeltoledo)
|
||||
Ramiro Morales (ramiro)
|
||||
Raphaël Zumer (rzumer)
|
||||
redenvelope2000
|
||||
Reid Kleckner (rnk)
|
||||
repojohnray
|
||||
retro-wertz
|
||||
retrotails
|
||||
revvv
|
||||
reztek
|
||||
Richard Howell (rmaz)
|
||||
Rinnegatamante
|
||||
rlnilsen
|
||||
Rob Loach (RobLoach)
|
||||
Robin de Rooij (rrooij)
|
||||
Romain Gay (vikbez)
|
||||
Romain Graillot (notnotme)
|
||||
Romain TISSERAND (rtissera)
|
||||
Roman Fomin (rfomin)
|
||||
Roman Kalashnikov (lunixoid)
|
||||
Royerson
|
||||
rrooij
|
||||
rsn8887
|
||||
Ruben Nine (rnine)
|
||||
Ryan C. Gordon (icculus)
|
||||
Ryan Kuba (thelamer)
|
||||
Ryunam
|
||||
rz5
|
||||
Sage (neonfuz)
|
||||
Saggi Mizrahi (ficoos)
|
||||
SAKUJ0
|
||||
Salvador (salvacam)
|
||||
Sam (44100hertz)
|
||||
Sam Lantinga (slouken)
|
||||
Sam Pagenkopf (44100hertz)
|
||||
Sam Stenvall (Jalle19)
|
||||
Samuel P. (p-sam)
|
||||
Sanaki
|
||||
Scheiker
|
||||
Sean O'Neil (seanocali)
|
||||
Sebastien Ronsse (sronsse)
|
||||
SecularSteve
|
||||
Sefa Eyeoglu (Scrumplex)
|
||||
Sergei Nikitin (Kert)
|
||||
Sergei Trofimovich (trofi)
|
||||
Sergi Granell (xerpi)
|
||||
Sergio Padrino (sergiou87)
|
||||
sergio-br2 (sergiobenrocha2)
|
||||
Seth Kingsley (sethk)
|
||||
Shadow (ShadowOne333)
|
||||
Shane Mouton (ismouton)
|
||||
shantigilbert
|
||||
Shfty
|
||||
Shizeeg Unadequatov (shizeeg)
|
||||
SimpleTease
|
||||
SindenLightgun
|
||||
Sirrempat
|
||||
slotek
|
||||
Soar Qin (soarqin)
|
||||
sonninnos
|
||||
Sou Bunnbu (iyzsong)
|
||||
sparklewind
|
||||
spec-chum
|
||||
Stefan (gizmo98)
|
||||
stefan-gr
|
||||
stellarporter
|
||||
Stephanie Gawroriski (XerTheSquirrel)
|
||||
Steve Cox (stevenjamescox)
|
||||
Stevoisiak
|
||||
stoofin
|
||||
StormedBubbles
|
||||
strotlog
|
||||
Steven M. Vascellaro (stevoisiak)
|
||||
Stuart Carnie (stuartcarnie)
|
||||
Sunguk Lee (d3m3vilurr)
|
||||
Supernature2k
|
||||
Sven (RetroSven)
|
||||
Swingflip
|
||||
Swizzy
|
||||
Sylvain Colinet (Skarsnik)
|
||||
Szunti
|
||||
Tadek Kijkowski (monkeyman79)
|
||||
Tatsuya79
|
||||
Terry Lewis (terry-au)
|
||||
thedax
|
||||
theheroGAC
|
||||
TheMrIron2
|
||||
ThePhxRises
|
||||
TheRhysWyrill
|
||||
TheOfficialFloW
|
||||
thiolliere
|
||||
Thomas Lorblanchès (Zlika)
|
||||
Tilman M. Jaeschke (asciibeats)
|
||||
Tim Van den Langenbergh (tmtvl)
|
||||
Tobias Gruetzmacher (TobiX)
|
||||
Tobias Jakobi (tobiasjakobi)
|
||||
Todd Laney (ToddLa)
|
||||
Tomáš Kelemen (ToKe79)
|
||||
Tor Arne Vestbø (torarnv)
|
||||
Torsten Paul (t-paul)
|
||||
TotalCaesar659
|
||||
tr12345
|
||||
TroggleMonkey
|
||||
tunip3
|
||||
txorion
|
||||
Tyler Loch (TylerLoch)
|
||||
Twinaphex
|
||||
URBANsUNITED
|
||||
vaguerant
|
||||
Val Packett (valpackett)
|
||||
Valerio Proietti (kamicane)
|
||||
vgmoose
|
||||
Viachaslau Khalikin (viachaslavic)
|
||||
Vicki Pfau (endrift)
|
||||
Vicky C Lau (vickychenglau)
|
||||
vin (suseme)
|
||||
Vincent Pelletier (vpelletier)
|
||||
Vladimir Panteleev (CyberShadow)
|
||||
Vladimir Serbinenko (phcoder)
|
||||
Víctor "IlDucci" (IlDucci)
|
||||
waitingmoon
|
||||
Warning: Non-Potable Water (warningnonpotablewater)
|
||||
Wang Vincent (susemm)
|
||||
webgeek1234
|
||||
Weedy Weed Smoker (WeedyWeedSmoker)
|
||||
whorsemaster
|
||||
WerWolv
|
||||
Wiimpathy
|
||||
Wiktor Strzębała (wiktorek140)
|
||||
Woohyun Shin (sinusinu)
|
||||
xenomorph-us
|
||||
xhp-creations
|
||||
Xitee (Xitee1)
|
||||
Yari (hyarsan)
|
||||
yesfish (huwpascoe)
|
||||
Yongwoon Cho (ssangkong)
|
||||
yoshisuga
|
||||
Zer0xFF
|
||||
zeromus
|
||||
zlice
|
||||
Érico Nogueira Rolim (ericonr)
|
||||
Zoran Vuckovic (casdevel)
|
||||
Ömercan Kömür (fpscan)
|
||||
シーはディー四を取る (cxd4)
|
||||
)";
|
||||
+3
-2615
File diff suppressed because it is too large.
Load diff
@@ -1,135 +0,0 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, caste, color, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at:
|
||||
|
||||
* Via E-Mail to <libretro@gmail.com>, please include in the subject line
|
||||
`RETROARCH COC` so that your e-mail may reach the correct party.
|
||||
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.1, available at
|
||||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
|
||||
at [https://www.contributor-covenant.org/translations][translations].
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
||||
[Mozilla CoC]: https://github.com/mozilla/diversity
|
||||
[FAQ]: https://www.contributor-covenant.org/faq
|
||||
[translations]: https://www.contributor-covenant.org/translations
|
||||
@@ -1,120 +0,0 @@
|
||||
Refer also to this page for more information -
|
||||
https://docs.libretro.com/development/coding-standards/
|
||||
|
||||
Struct ordering
|
||||
---------------
|
||||
|
||||
For POD-types, try to order structs as follows (first to last):
|
||||
|
||||
* long double (8 bytes, 16 bytes [64bit x86], 12 bytes [32bit x86])
|
||||
* double (8 bytes)
|
||||
* int64_t (8 bytes, 8 bytes [32bit ARM],
|
||||
4 bytes [32bit x86])
|
||||
* uint64_t (4 bytes [32bit], 8 bytes [32bit ARM], 8 bytes [64bit])
|
||||
* pointer (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* intptr_t (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* uintptr_t (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* ptrdiff_t (4 bytes [32bit], 8 bytes [64bit] [1])
|
||||
* ssize_t (4 bytes [32bit], 8 bytes [64bit])
|
||||
* size_t (4 bytes [32bit], 8 bytes [64bit])
|
||||
* jmp_buf (4 bytes)
|
||||
* long (4 bytes [64bit Win], 8 bytes [64bit non-Win],
|
||||
4 bytes [32bit])
|
||||
* int32_t (4 bytes)
|
||||
* unsigned (4 bytes)
|
||||
* float (4 bytes)
|
||||
* int (4 bytes)
|
||||
* enum (4 bytes)
|
||||
* int16_t (2 bytes)
|
||||
* char (1 byte)
|
||||
* bool (1 byte)
|
||||
|
||||
[1] PS3 uses 4 byte pointers despite having a 64bit processor
|
||||
|
||||
Struct members should be sorted by alignment. Therefore, structs
|
||||
should be sorted by the largest type inside them.
|
||||
|
||||
For example, take a struct like this:
|
||||
|
||||
typedef struct
|
||||
{
|
||||
size_t capacity;
|
||||
bool old_format;
|
||||
bool compress;
|
||||
bool fuzzy_archive_match;
|
||||
bool autofix_paths;
|
||||
char path[PATH_MAX_LENGTH];
|
||||
char base_content_directory[DIR_MAX_LENGTH];
|
||||
} playlist_config_t;
|
||||
|
||||
size_t has the biggest alignment here, so 'struct playlist_config_t'
|
||||
inside a struct should come before or after size_t.
|
||||
|
||||
*** BEST PRACTICES ***
|
||||
|
||||
* If we have pointers and size variable pairs, it's best to
|
||||
interleave them to increase the probability they go in the
|
||||
same cacheline. It also makes the code more readable, that
|
||||
these two variables are connected.
|
||||
|
||||
Example:
|
||||
|
||||
struct a
|
||||
{
|
||||
char* b;
|
||||
size_t b_len;
|
||||
char* c;
|
||||
size_t c_len;
|
||||
};
|
||||
|
||||
Stack size
|
||||
----------
|
||||
|
||||
You have to assume that stack size is going to be limited in
|
||||
RetroArch. Some game consoles (and other embedded systems)
|
||||
might have a default stack size as low as 128Kb or less.
|
||||
Be conservative with stack size but don't try to put very
|
||||
small structs on heap either [to avoid memory fragmentation
|
||||
among other things]. A balancing act here is necessary.
|
||||
|
||||
Be mindful that heap allocations are slow compared to stack.
|
||||
|
||||
Functions
|
||||
---------
|
||||
- Avoid doing small getter/setter functions. We want a function
|
||||
to justify its function call overhead by doing a significant
|
||||
body of work. Small one-line getter/setter functions for what
|
||||
is predominantly C-style structs is not useful, plus it leads
|
||||
to people thinking this function is more complex than it
|
||||
actually is, thus obfuscating the sourcecode instead of it
|
||||
being easier to read.
|
||||
|
||||
If you can find examples in the codebase that violate this
|
||||
guideline, do not hesitate to point them out to us.
|
||||
|
||||
Variable declaration
|
||||
--------------------
|
||||
For C source files, we have to insist you stick to the following:
|
||||
|
||||
- Declare variables either at the start of a function or the start
|
||||
of a code block, depending on the scope they need.
|
||||
- Do not do initial for loop declarations. Refer to the bulletpoint above:
|
||||
either declare them at the start of the function, or at the start
|
||||
of the code block.
|
||||
|
||||
Not doing this would break compilation on platforms where we are compiling
|
||||
these C source files in C89 compatibility mode. If such issues occur in pull
|
||||
requests, we have to request that it be fixed.
|
||||
|
||||
VLA (Variable Length Array)
|
||||
---------------------------
|
||||
Do not use VLAs (Variable Length Array) in C source files. These are not
|
||||
C89-compliant.
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
- Brace usage follows "Allman style". The brace associated with a control statement is placed on the following line,
|
||||
indented to the same level as the control statement.
|
||||
Statements within the braces are indented to the next level.
|
||||
- A single statement block must not include brackets (unless the block uses a macro that expands into multiple lines)
|
||||
- If possible, avoid 'while (true)' and use 'for (;;)' instead
|
||||
+44
-93
@@ -1,107 +1,58 @@
|
||||
# Contributing to RetroArch
|
||||
|
||||
If you are a developer who wishes to contribute to the development of _RetroArch_; or if you have
|
||||
found a bug and wish to submit a minor patch and/or bug report, please read this document.
|
||||
If you are a developer and want to contribute to the development of RetroArch, please read this.
|
||||
If you have found a bug and want to submit a minor patch or a bug report, please read this as well.
|
||||
|
||||
Active discussions happen on our [Discord](https://discord.gg/C4amCeV), mostly within
|
||||
the _Programming_ channel category. We value discussions that happen in real time around
|
||||
these contributions.
|
||||
# Submitting a bug report
|
||||
When submitting a bug report, make sure that the bug is local to RetroArch.
|
||||
A bug in a libretro core or something deemed to be external is likely to be closed very fast.
|
||||
If you still suspect a bug in RetroArch, make sure to test with several cores to make sure.
|
||||
|
||||
Please do note that contributors to _RetroArch_ do such contributions within their spare time.
|
||||
We do prefer to keep a professional and non-aggressive atmosphere around the project, along
|
||||
with any disagreements to be settled professionally without insults, name calling, or otherwise.
|
||||
If there are any issues, we are willing to have discussions about it.
|
||||
If you have troubles building RetroArch on Linux/BSD/OSX, make sure to paste shell output of ./configure,
|
||||
as well as config.log and shell output of make. If building on Windows, just paste shell output of make.
|
||||
|
||||
## Submitting Bug Reports
|
||||
If the issue occurs during runtime, make sure to paste RetroArch's verbose log.
|
||||
If using Phoenix frontend, you can find log in (File -> Show Log) after running.
|
||||
In console, make sure to run with verbose (-v) flag.
|
||||
|
||||
Bug reports for _RetroArch_ may fall into a few categories:
|
||||
# Pull Requests
|
||||
Outside contributions are generally only accepted in the form of a pull request. The process is very simple.
|
||||
Fork RetroArch, make your changes, and issue a pull request on GitHub. This can all be done within the browser.
|
||||
The changes are reviewed, and might be merged in. If the pull request isn't acceptable at the time,
|
||||
note that it's possible to continue pushing up commits to your branch.
|
||||
|
||||
* _RetroArch_ itself, the user interface and API around all of the various cores.
|
||||
* Individual _Core_, that interacts with _RetroArch_.
|
||||
* Supplementary data provided within _RetroArch_, such as controller autoconfigs, databases,
|
||||
thumbnails...
|
||||
* The [documentation set](https://docs.libretro.com/)
|
||||
|
||||
When submitting a bug report, ensure that the report is submitted to the correct repository.
|
||||
* For _RetroArch_ itself, submit an issue to the [RetroArch](https://github.com/libretro/RetroArch)
|
||||
repository. Please read and fill the issue template.
|
||||
* For other cores, please use the search function within the [libretro Organization](https://github.com/libretro)
|
||||
on GitHub. Issues that are specific to a core and not _RetroArch_ are likely to be closed
|
||||
very quickly. If an issue is suspected with _RetroArch_, please make sure to test with
|
||||
multiple cores to be sure that is is not isolated.
|
||||
* For database content, submit an issue to
|
||||
[libretro-database repo](https://github.com/libretro/libretro-database) or ask in the
|
||||
_database_ channel on Discord.
|
||||
* For controller autoconfigs, submit an issue to
|
||||
[retroarch-joypad-autoconfig repo](https://github.com/libretro/retroarch-joypad-autoconfig)
|
||||
* For actual thumbnail images, submit an issue to
|
||||
[libretro-thumbnails](https://github.com/libretro-thumbnails/libretro-thumbnails) repo
|
||||
or ask in the _database_ channel on Discord.
|
||||
* For documentation, submit an issue to [libretro-docs](https://github.com/libretro/libretro-docs)
|
||||
repo or ask in the _documentation_ channel.
|
||||
* For translations, please see [here](https://docs.libretro.com/development/retroarch/new-translations-crowdin/).
|
||||
|
||||
If the issue occurs during runtime, please paste the verbose log output:
|
||||
|
||||
* If using the main interface, enable verbose logging with _Settings_ -> _Logging_ ->
|
||||
_Logging Verbosity_. Ensure both _Log to File_ and _Timestamp log Files_ is enabled.
|
||||
Set frontend log level to _0 (Debug)_.
|
||||
* Or run _RetroArch_ with the verbose (`-v`) flag and get the log from the console.
|
||||
|
||||
If the error happens during compilation and/or building, paste the output of `./configure`
|
||||
and `make` accordingly. If using an IDE, please paste any of the errors and log output.
|
||||
|
||||
## Submitting Pull Requests
|
||||
|
||||
Any and all contributions should be submitted through Pull Requests on
|
||||
[GitHub](https://github.com/libretro/RetroArch/pulls). The process requires that you fork the
|
||||
repository, make the appropriate changes, and then open a pull request on _GitHub_. If your
|
||||
pull request is for a proof-of-concept then please indicate as such.
|
||||
|
||||
Your pull request will then be reviewed. There may be comments and requests for additional
|
||||
changes to be made. It may also be possible that the changes will not be accepted. Otherwise, it
|
||||
may be merged in when it is fully approved. The final approval of merge requests is at the
|
||||
discretion of the project.
|
||||
|
||||
If you want to develop a larger feature or make broad changes, please do join our
|
||||
[Discord](https://discord.gg/C4amCeV) server to discuss. The discussion is
|
||||
necessary to prevent the possibility of major work being done which will not be accepted at all.
|
||||
If you want to develop a larger feature,
|
||||
we'd like to discuss this first (ideally on IRC) so that you don't risk developing something
|
||||
that won't be merged. A pull request with a proof-of-concept is fine, but please indicate so.
|
||||
|
||||
## libretro API
|
||||
If you wish to add functionality to libretro's API, it can take some time to merge in, because changes
|
||||
to libretro API will affect other projects as well, and we highly value API/ABI stability.
|
||||
Features will only be added when deemed *necessary* for a concrete libretro core to function properly.
|
||||
Features will not be added on basis of hypothetical libretro implementations.
|
||||
|
||||
If you wish to contribute additional functionality to _libretro_'s API, there are considerations
|
||||
that must be accepted. Please note that because this API affects multiple different projects, we
|
||||
highly value and require API and ABI stability and backwards-compatibility. Due to this
|
||||
requirement, there will be additional scrutiny in reviews for this added functionality.
|
||||
# Coding style
|
||||
Having a consistent code style throughout the code base is highly valued.
|
||||
Please look through the code to get a feel for the coding style.
|
||||
A pull request may be asked to fix the coding style before submission.
|
||||
In other cases, a pull request may be followed up with a "style nit commit".
|
||||
|
||||
Any and all features will be added only when **necessary** for an existing _libretro_ core to
|
||||
properly function. Hypothetical implementations of _libretro_ are not considered.
|
||||
## Non-obvious things:
|
||||
- Code should be both C89 and ISO C++ compatible. This dual requirement is for XBox360 and MSVC in general. Think of it as a C++ compatible subset of C99.
|
||||
- Warnings are not allowed (-Wall). Make sure your code is warning-free. Note that warning sensitivity differs a bit across compiler versions.
|
||||
- Using deprecated APIs is discouraged.
|
||||
|
||||
## Coding style
|
||||
# Copyright Headers and AUTHORS
|
||||
If you have contributed to a part of a source file (a chunk of code that's written by you),
|
||||
you should add yourself to the copyright header in that file.
|
||||
If you have contributed significantly
|
||||
(a feature, a contribution you can "name", e.g. "Added audio driver foo"), you should add yourself to AUTHORS file.
|
||||
We'd like your full name and email, and which features you have been part of.
|
||||
|
||||
We highly value a consistent code style throughout the entire code base, please make sure you look
|
||||
through the existing code to get a feel for the coding style. When submitting a pull request, it may
|
||||
be asked to fix any coding style issues before submission. In other cases, there may be a follow-up
|
||||
pull request making the code style consistent.
|
||||
# IRC
|
||||
Active development happens on IRC. (#retroarch @ irc.freenode.org)
|
||||
We value discussing things in "real-time".
|
||||
|
||||
For full guidelines please see the [Coding Standards](https://docs.libretro.com/development/coding-standards/).
|
||||
|
||||
Some non-obvious things to be aware of:
|
||||
|
||||
- Code should be both C89 and ISO C++ compatible. This is a requirement for XBox 360 and MSVC to
|
||||
properly build. Think of it as a C++ compatible subset of C99.
|
||||
- There must be no warnings in your code (enabled by `-Wall` for GCC compilers), do also note that
|
||||
different compilers may produce different warnings.
|
||||
- Avoid using deprecated APIs, these will be removed in the future at some point.
|
||||
|
||||
## Copyright Headers and AUTHORS
|
||||
|
||||
If you have contributed a chunk of source code that is written to you, you should add yourself to
|
||||
the copyright header in the file. If you have made a significant contribution you should add
|
||||
yourself to the `AUTHORS` file, adding your full name, e-mail, and the feature you worked on.
|
||||
|
||||
## Commit Access
|
||||
|
||||
Contributors who show a good track record of pull requests over time may eventually
|
||||
get commit access to the repository. This may happen when looking through pull requests
|
||||
over long amounts of time becomes a burden.
|
||||
# Commit Access
|
||||
Contributors who show a track record of making good pull requests over time will eventually get commit access to the repo.
|
||||
This typically happens when the "overhead" of looking through pull requests over time becomes a burden.
|
||||
@@ -1,4 +1,4 @@
|
||||
# Doxyfile 1.9.1
|
||||
# Doxyfile 1.8.14
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project.
|
||||
@@ -17,10 +17,10 @@
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# This tag specifies the encoding used for all characters in the configuration
|
||||
# file that follow. The default is UTF-8 which is also the encoding used for all
|
||||
# text before the first occurrence of this tag. Doxygen uses libiconv (or the
|
||||
# iconv built into libc) for the transcoding. See
|
||||
# This tag specifies the encoding used for all characters in the config file
|
||||
# that follow. The default is UTF-8 which is also the encoding used for all text
|
||||
# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
|
||||
# built into libc) for the transcoding. See
|
||||
# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
@@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
|
||||
# title of most generated pages and in a few other places.
|
||||
# The default value is: My Project.
|
||||
|
||||
PROJECT_NAME = RetroArch
|
||||
PROJECT_NAME = "RetroArch"
|
||||
|
||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
@@ -58,7 +58,7 @@ PROJECT_LOGO =
|
||||
# entered, it will be relative to the location where doxygen was started. If
|
||||
# left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = docs
|
||||
OUTPUT_DIRECTORY =
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
|
||||
# directories (in 2 levels) under the output directory of each output format and
|
||||
@@ -93,14 +93,6 @@ ALLOW_UNICODE_NAMES = NO
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all
|
||||
# documentation generated by doxygen is written. Doxygen will use this
|
||||
# information to generate all generated output in the proper direction.
|
||||
# Possible values are: None, LTR, RTL and Context.
|
||||
# The default value is: None.
|
||||
|
||||
OUTPUT_TEXT_DIRECTION = None
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
|
||||
# descriptions after the members that are listed in the file and class
|
||||
# documentation (similar to Javadoc). Set to NO to disable this.
|
||||
@@ -195,17 +187,7 @@ SHORT_NAMES = YES
|
||||
# description.)
|
||||
# The default value is: NO.
|
||||
|
||||
JAVADOC_AUTOBRIEF = YES
|
||||
|
||||
# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
|
||||
# such as
|
||||
# /***************
|
||||
# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
|
||||
# Javadoc-style will behave just like regular comments and it will not be
|
||||
# interpreted by doxygen.
|
||||
# The default value is: NO.
|
||||
|
||||
JAVADOC_BANNER = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
|
||||
# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
|
||||
# line (until the first dot) of a Qt-style comment as the brief description. If
|
||||
@@ -227,14 +209,6 @@ QT_AUTOBRIEF = NO
|
||||
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
|
||||
# By default Python docstrings are displayed as preformatted text and doxygen's
|
||||
# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
|
||||
# doxygen's special commands can be used and the contents of the docstring
|
||||
# documentation blocks is shown as doxygen documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
PYTHON_DOCSTRING = YES
|
||||
|
||||
# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
|
||||
# documentation from any documented member that it re-implements.
|
||||
# The default value is: YES.
|
||||
@@ -264,12 +238,14 @@ TAB_SIZE = 4
|
||||
# "Side Effects:". You can put \n's in the value part of an alias to insert
|
||||
# newlines (in the resulting output). You can put ^^ in the value part of an
|
||||
# alias to insert a newline as if a physical newline was in the original file.
|
||||
# When you need a literal { or } or , in the value part of an alias you have to
|
||||
# escape them by means of a backslash (\), this can lead to conflicts with the
|
||||
# commands \{ and \} for these it is advised to use the version @{ and @} or use
|
||||
# a double escape (\\{ and \\})
|
||||
|
||||
ALIASES = "setby{1}=@par Set by^^The \1."
|
||||
ALIASES =
|
||||
|
||||
# This tag can be used to specify a number of word-keyword mappings (TCL only).
|
||||
# A mapping has the form "name=value". For example adding "class=itcl::class"
|
||||
# will allow you to use the command class in the itcl::class meaning.
|
||||
|
||||
TCL_SUBST =
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
|
||||
# only. Doxygen will then generate output that is more tailored for C. For
|
||||
@@ -277,7 +253,7 @@ ALIASES = "setby{1}=@par Set by^^The \1."
|
||||
# members will be omitted, etc.
|
||||
# The default value is: NO.
|
||||
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
|
||||
# Python sources only. Doxygen will then generate output that is more tailored
|
||||
@@ -299,40 +275,28 @@ OPTIMIZE_FOR_FORTRAN = NO
|
||||
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
|
||||
# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
|
||||
# sources only. Doxygen will then generate output that is more tailored for that
|
||||
# language. For instance, namespaces will be presented as modules, types will be
|
||||
# separated into more groups, etc.
|
||||
# The default value is: NO.
|
||||
|
||||
OPTIMIZE_OUTPUT_SLICE = NO
|
||||
|
||||
# Doxygen selects the parser to use depending on the extension of the files it
|
||||
# parses. With this tag you can assign which parser to use for a given
|
||||
# extension. Doxygen has a built-in mapping, but you can override or extend it
|
||||
# using this tag. The format is ext=language, where ext is a file extension, and
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
|
||||
# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL,
|
||||
# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
|
||||
# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
|
||||
# tries to guess whether the code is fixed or free formatted code, this is the
|
||||
# default for Fortran type files). For instance to make doxygen treat .inc files
|
||||
# as Fortran files (default is PHP), and .f files as C (default is Fortran),
|
||||
# use: inc=Fortran f=C.
|
||||
# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
|
||||
# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
|
||||
# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
|
||||
# Fortran. In the later case the parser tries to guess whether the code is fixed
|
||||
# or free formatted code, this is the default for Fortran type files), VHDL. For
|
||||
# instance to make doxygen treat .inc files as Fortran files (default is PHP),
|
||||
# and .f files as C (default is Fortran), use: inc=Fortran f=C.
|
||||
#
|
||||
# Note: For files without extension you can use no_extension as a placeholder.
|
||||
#
|
||||
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
|
||||
# the files are not read by doxygen. When specifying no_extension you should add
|
||||
# * to the FILE_PATTERNS.
|
||||
#
|
||||
# Note see also the list of default file extension mappings.
|
||||
# the files are not read by doxygen.
|
||||
|
||||
EXTENSION_MAPPING =
|
||||
|
||||
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
|
||||
# according to the Markdown format, which allows for more readable
|
||||
# documentation. See https://daringfireball.net/projects/markdown/ for details.
|
||||
# documentation. See http://daringfireball.net/projects/markdown/ for details.
|
||||
# The output of markdown processing is further processed by doxygen, so you can
|
||||
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
|
||||
# case of backward compatibilities issues.
|
||||
@@ -344,7 +308,7 @@ MARKDOWN_SUPPORT = YES
|
||||
# to that level are automatically included in the table of contents, even if
|
||||
# they do not have an id attribute.
|
||||
# Note: This feature currently applies only to Markdown headings.
|
||||
# Minimum value: 0, maximum value: 99, default value: 5.
|
||||
# Minimum value: 0, maximum value: 99, default value: 0.
|
||||
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
|
||||
|
||||
TOC_INCLUDE_HEADINGS = 0
|
||||
@@ -434,7 +398,7 @@ INLINE_GROUPED_CLASSES = NO
|
||||
# Man pages) or section (for LaTeX and RTF).
|
||||
# The default value is: NO.
|
||||
|
||||
INLINE_SIMPLE_STRUCTS = YES
|
||||
INLINE_SIMPLE_STRUCTS = NO
|
||||
|
||||
# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
|
||||
# enum is documented as struct, union, or enum with the name of the typedef. So
|
||||
@@ -460,19 +424,6 @@ TYPEDEF_HIDES_STRUCT = NO
|
||||
|
||||
LOOKUP_CACHE_SIZE = 0
|
||||
|
||||
# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use
|
||||
# during processing. When set to 0 doxygen will based this on the number of
|
||||
# cores available in the system. You can set it explicitly to a value larger
|
||||
# than 0 to get more control over the balance between CPU load and processing
|
||||
# speed. At this moment only the input processing can be done using multiple
|
||||
# threads. Since this is still an experimental feature the default is set to 1,
|
||||
# which efficively disables parallel processing. Please report any issues you
|
||||
# encounter. Generating dot graphs in parallel is controlled by the
|
||||
# DOT_NUM_THREADS setting.
|
||||
# Minimum value: 0, maximum value: 32, default value: 1.
|
||||
|
||||
NUM_PROC_THREADS = 16
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -491,13 +442,7 @@ EXTRACT_ALL = YES
|
||||
# be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_PRIVATE = NO
|
||||
|
||||
# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
|
||||
# methods of a class will be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_PRIV_VIRTUAL = NO
|
||||
EXTRACT_PRIVATE = YES
|
||||
|
||||
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
|
||||
# scope will be included in the documentation.
|
||||
@@ -536,13 +481,6 @@ EXTRACT_LOCAL_METHODS = YES
|
||||
|
||||
EXTRACT_ANON_NSPACES = NO
|
||||
|
||||
# If this flag is set to YES, the name of an unnamed parameter in a declaration
|
||||
# will be determined by the corresponding definition. By default unnamed
|
||||
# parameters remain unnamed in the output.
|
||||
# The default value is: YES.
|
||||
|
||||
RESOLVE_UNNAMED_PARAMS = YES
|
||||
|
||||
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
|
||||
# undocumented members inside documented classes or files. If set to NO these
|
||||
# members will be included in the various overviews, but no documentation
|
||||
@@ -560,8 +498,8 @@ HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
|
||||
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
|
||||
# declarations. If set to NO, these declarations will be included in the
|
||||
# documentation.
|
||||
# (class|struct|union) declarations. If set to NO, these declarations will be
|
||||
# included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
@@ -580,18 +518,11 @@ HIDE_IN_BODY_DOCS = NO
|
||||
|
||||
INTERNAL_DOCS = NO
|
||||
|
||||
# With the correct setting of option CASE_SENSE_NAMES doxygen will better be
|
||||
# able to match the capabilities of the underlying filesystem. In case the
|
||||
# filesystem is case sensitive (i.e. it supports files in the same directory
|
||||
# whose names only differ in casing), the option must be set to YES to properly
|
||||
# deal with such files in case they appear in the input. For filesystems that
|
||||
# are not case sensitive the option should be be set to NO to properly deal with
|
||||
# output files written for symbols that only differ in casing, such as for two
|
||||
# classes, one named CLASS and the other named Class, and to also support
|
||||
# references to files without having to specify the exact matching casing. On
|
||||
# Windows (including Cygwin) and MacOS, users should typically set this option
|
||||
# to NO, whereas on Linux or other Unix flavors it should typically be set to
|
||||
# YES.
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
|
||||
# names in lower-case letters. If set to YES, upper-case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# and Mac users are advised to set this option to NO.
|
||||
# The default value is: system dependent.
|
||||
|
||||
CASE_SENSE_NAMES = YES
|
||||
@@ -601,7 +532,7 @@ CASE_SENSE_NAMES = YES
|
||||
# scope will be hidden.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_SCOPE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
|
||||
# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
|
||||
# append additional text to a page's title, such as Class Reference. If set to
|
||||
@@ -640,7 +571,7 @@ INLINE_INFO = YES
|
||||
# name. If set to NO, the members will appear in declaration order.
|
||||
# The default value is: YES.
|
||||
|
||||
SORT_MEMBER_DOCS = NO
|
||||
SORT_MEMBER_DOCS = YES
|
||||
|
||||
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
|
||||
# descriptions of file, namespace and class members alphabetically by member
|
||||
@@ -823,17 +754,13 @@ WARN_IF_DOC_ERROR = YES
|
||||
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
|
||||
# are documented, but have no documentation for their parameters or return
|
||||
# value. If set to NO, doxygen will only warn about wrong or incomplete
|
||||
# parameter documentation, but not about the absence of documentation. If
|
||||
# EXTRACT_ALL is set to YES then this flag will automatically be disabled.
|
||||
# parameter documentation, but not about the absence of documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_NO_PARAMDOC = NO
|
||||
|
||||
# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
|
||||
# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS
|
||||
# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but
|
||||
# at the end of the doxygen process doxygen will return with a non-zero status.
|
||||
# Possible values are: NO, YES and FAIL_ON_WARNINGS.
|
||||
# a warning is encountered.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_AS_ERROR = NO
|
||||
@@ -864,13 +791,13 @@ WARN_LOGFILE =
|
||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = libretro-common
|
||||
INPUT =
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
|
||||
# documentation (see:
|
||||
# https://www.gnu.org/software/libiconv/) for the list of possible encodings.
|
||||
# documentation (see: https://www.gnu.org/software/libiconv/) for the list of
|
||||
# possible encodings.
|
||||
# The default value is: UTF-8.
|
||||
|
||||
INPUT_ENCODING = UTF-8
|
||||
@@ -883,17 +810,56 @@ INPUT_ENCODING = UTF-8
|
||||
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
|
||||
# read by doxygen.
|
||||
#
|
||||
# Note the list of default checked file patterns might differ from the list of
|
||||
# default file extension mappings.
|
||||
#
|
||||
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
|
||||
# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
|
||||
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
|
||||
# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment),
|
||||
# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl,
|
||||
# *.ucf, *.qsf and *.ice.
|
||||
# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
|
||||
# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
|
||||
|
||||
FILE_PATTERNS = *.h
|
||||
FILE_PATTERNS = *.c \
|
||||
*.cc \
|
||||
*.cxx \
|
||||
*.cpp \
|
||||
*.c++ \
|
||||
*.java \
|
||||
*.ii \
|
||||
*.ixx \
|
||||
*.ipp \
|
||||
*.i++ \
|
||||
*.inl \
|
||||
*.idl \
|
||||
*.ddl \
|
||||
*.odl \
|
||||
*.h \
|
||||
*.hh \
|
||||
*.hxx \
|
||||
*.hpp \
|
||||
*.h++ \
|
||||
*.cs \
|
||||
*.d \
|
||||
*.php \
|
||||
*.php4 \
|
||||
*.php5 \
|
||||
*.phtml \
|
||||
*.inc \
|
||||
*.m \
|
||||
*.markdown \
|
||||
*.md \
|
||||
*.mm \
|
||||
*.dox \
|
||||
*.py \
|
||||
*.pyw \
|
||||
*.f90 \
|
||||
*.f95 \
|
||||
*.f03 \
|
||||
*.f08 \
|
||||
*.f \
|
||||
*.for \
|
||||
*.tcl \
|
||||
*.vhd \
|
||||
*.vhdl \
|
||||
*.ucf \
|
||||
*.qsf
|
||||
|
||||
# The RECURSIVE tag can be used to specify whether or not subdirectories should
|
||||
# be searched for input files as well.
|
||||
@@ -924,11 +890,7 @@ EXCLUDE_SYMLINKS = NO
|
||||
# Note that the wildcards are matched against the file with absolute path, so to
|
||||
# exclude all test directories for example use the pattern */test/*
|
||||
|
||||
EXCLUDE_PATTERNS = */libretro-common/rthreads/* \
|
||||
*/libretro-common/formats/* \
|
||||
*/libretro-common/crt/* \
|
||||
*/libretro-common/samples/* \
|
||||
*/libretro-common/include/glsym/*
|
||||
EXCLUDE_PATTERNS =
|
||||
|
||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
||||
@@ -939,9 +901,7 @@ EXCLUDE_PATTERNS = */libretro-common/rthreads/* \
|
||||
# Note that the wildcards are matched against the file with absolute path, so to
|
||||
# exclude all test directories use the pattern */test/*
|
||||
|
||||
EXCLUDE_SYMBOLS = bool \
|
||||
void \
|
||||
const
|
||||
EXCLUDE_SYMBOLS =
|
||||
|
||||
# The EXAMPLE_PATH tag can be used to specify one or more files or directories
|
||||
# that contain example code fragments that are included (see the \include
|
||||
@@ -1052,7 +1012,7 @@ INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
|
||||
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
|
||||
# entity all documented functions referencing it will be listed.
|
||||
# function all documented functions referencing it will be listed.
|
||||
# The default value is: NO.
|
||||
|
||||
REFERENCED_BY_RELATION = NO
|
||||
@@ -1089,7 +1049,7 @@ SOURCE_TOOLTIPS = YES
|
||||
#
|
||||
# To use it do the following:
|
||||
# - Install the latest version of global
|
||||
# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
|
||||
# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
|
||||
# - Make sure the INPUT points to the root of the source tree
|
||||
# - Run doxygen as normal
|
||||
#
|
||||
@@ -1111,44 +1071,6 @@ USE_HTAGS = NO
|
||||
|
||||
VERBATIM_HEADERS = YES
|
||||
|
||||
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
|
||||
# clang parser (see:
|
||||
# http://clang.llvm.org/) for more accurate parsing at the cost of reduced
|
||||
# performance. This can be particularly helpful with template rich C++ code for
|
||||
# which doxygen's built-in parser lacks the necessary type information.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# generated with the -Duse_libclang=ON option for CMake.
|
||||
# The default value is: NO.
|
||||
|
||||
CLANG_ASSISTED_PARSING = NO
|
||||
|
||||
# If clang assisted parsing is enabled and the CLANG_ADD_INC_PATHS tag is set to
|
||||
# YES then doxygen will add the directory of each input to the include path.
|
||||
# The default value is: YES.
|
||||
|
||||
CLANG_ADD_INC_PATHS = YES
|
||||
|
||||
# If clang assisted parsing is enabled you can provide the compiler with command
|
||||
# line options that you would normally use when invoking the compiler. Note that
|
||||
# the include paths will already be set by doxygen for the files and directories
|
||||
# specified with INPUT and INCLUDE_PATH.
|
||||
# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES.
|
||||
|
||||
CLANG_OPTIONS =
|
||||
|
||||
# If clang assisted parsing is enabled you can provide the clang parser with the
|
||||
# path to the directory containing a file called compile_commands.json. This
|
||||
# file is the compilation database (see:
|
||||
# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the
|
||||
# options used when the source files were built. This is equivalent to
|
||||
# specifying the -p option to a clang tool, such as clang-check. These options
|
||||
# will then be passed to the parser. Any options specified with CLANG_OPTIONS
|
||||
# will be added as well.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# generated with the -Duse_libclang=ON option for CMake.
|
||||
|
||||
CLANG_DATABASE_PATH =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -1160,14 +1082,20 @@ CLANG_DATABASE_PATH =
|
||||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
|
||||
# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
|
||||
# which the alphabetical index list will be split.
|
||||
# Minimum value: 1, maximum value: 20, default value: 5.
|
||||
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
|
||||
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
|
||||
# In case all classes in a project start with a common prefix, all classes will
|
||||
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
|
||||
# can be used to specify a prefix (or a list of prefixes) that should be ignored
|
||||
# while generating the index headers.
|
||||
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
|
||||
|
||||
IGNORE_PREFIX = retro_ \
|
||||
RETRO_
|
||||
IGNORE_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the HTML output
|
||||
@@ -1299,9 +1227,9 @@ HTML_TIMESTAMP = NO
|
||||
|
||||
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
|
||||
# documentation will contain a main index with vertical navigation menus that
|
||||
# are dynamically created via JavaScript. If disabled, the navigation index will
|
||||
# are dynamically created via Javascript. If disabled, the navigation index will
|
||||
# consists of multiple levels of tabs that are statically embedded in every HTML
|
||||
# page. Disable this option to support browsers that do not have JavaScript,
|
||||
# page. Disable this option to support browsers that do not have Javascript,
|
||||
# like the Qt help browser.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
@@ -1331,14 +1259,13 @@ HTML_INDEX_NUM_ENTRIES = 100
|
||||
|
||||
# If the GENERATE_DOCSET tag is set to YES, additional index files will be
|
||||
# generated that can be used as input for Apple's Xcode 3 integrated development
|
||||
# environment (see:
|
||||
# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To
|
||||
# create a documentation set, doxygen will generate a Makefile in the HTML
|
||||
# output directory. Running make will produce the docset in that directory and
|
||||
# running make install will install the docset in
|
||||
# environment (see: https://developer.apple.com/tools/xcode/), introduced with
|
||||
# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
|
||||
# Makefile in the HTML output directory. Running make will produce the docset in
|
||||
# that directory and running make install will install the docset in
|
||||
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
|
||||
# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
|
||||
# genXcode/_index.html for more information.
|
||||
# startup. See https://developer.apple.com/tools/creatingdocsetswithdoxygen.html
|
||||
# for more information.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
@@ -1377,8 +1304,8 @@ DOCSET_PUBLISHER_NAME = Publisher
|
||||
# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
|
||||
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
|
||||
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
|
||||
# (see:
|
||||
# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows.
|
||||
# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
|
||||
# Windows.
|
||||
#
|
||||
# The HTML Help Workshop contains a compiler that can convert all HTML output
|
||||
# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
|
||||
@@ -1408,7 +1335,7 @@ CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
|
||||
# The GENERATE_CHI flag controls if a separate .chi index file is generated
|
||||
# (YES) or that it should be included in the main .chm file (NO).
|
||||
# (YES) or that it should be included in the master .chm file (NO).
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
@@ -1453,8 +1380,7 @@ QCH_FILE =
|
||||
|
||||
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
|
||||
# Project output. For more information please see Qt Help Project / Namespace
|
||||
# (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
|
||||
# (see: http://doc.qt.io/qt-4.8/qthelpproject.html#namespace).
|
||||
# The default value is: org.doxygen.Project.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
@@ -1462,8 +1388,7 @@ QHP_NAMESPACE = org.doxygen.Project
|
||||
|
||||
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
|
||||
# Help Project output. For more information please see Qt Help Project / Virtual
|
||||
# Folders (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders).
|
||||
# Folders (see: http://doc.qt.io/qt-4.8/qthelpproject.html#virtual-folders).
|
||||
# The default value is: doc.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
@@ -1471,30 +1396,28 @@ QHP_VIRTUAL_FOLDER = doc
|
||||
|
||||
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
|
||||
# filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
|
||||
# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_CUST_FILTER_NAME =
|
||||
|
||||
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
|
||||
# custom filter to add. For more information please see Qt Help Project / Custom
|
||||
# Filters (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
|
||||
# Filters (see: http://doc.qt.io/qt-4.8/qthelpproject.html#custom-filters).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_CUST_FILTER_ATTRS =
|
||||
|
||||
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
|
||||
# project's filter section matches. Qt Help Project / Filter Attributes (see:
|
||||
# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# http://doc.qt.io/qt-4.8/qthelpproject.html#filter-attributes).
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHP_SECT_FILTER_ATTRS =
|
||||
|
||||
# The QHG_LOCATION tag can be used to specify the location (absolute path
|
||||
# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to
|
||||
# run qhelpgenerator on the generated .qhp file.
|
||||
# The QHG_LOCATION tag can be used to specify the location of Qt's
|
||||
# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
|
||||
# generated .qhp file.
|
||||
# This tag requires that the tag GENERATE_QHP is set to YES.
|
||||
|
||||
QHG_LOCATION =
|
||||
@@ -1545,7 +1468,7 @@ DISABLE_INDEX = NO
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
GENERATE_TREEVIEW = YES
|
||||
GENERATE_TREEVIEW = NO
|
||||
|
||||
# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
|
||||
# doxygen will group on one line in the generated HTML documentation.
|
||||
@@ -1571,17 +1494,6 @@ TREEVIEW_WIDTH = 250
|
||||
|
||||
EXT_LINKS_IN_WINDOW = NO
|
||||
|
||||
# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg
|
||||
# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
|
||||
# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
|
||||
# the HTML output. These images will generally look nicer at scaled resolutions.
|
||||
# Possible values are: png (the default) and svg (looks nicer but requires the
|
||||
# pdf2svg or inkscape tool).
|
||||
# The default value is: png.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_FORMULA_FORMAT = png
|
||||
|
||||
# Use this tag to change the font size of LaTeX formulas included as images in
|
||||
# the HTML documentation. When you change the font size after a successful
|
||||
# doxygen run you need to manually remove any form_*.png images from the HTML
|
||||
@@ -1602,14 +1514,8 @@ FORMULA_FONTSIZE = 10
|
||||
|
||||
FORMULA_TRANSPARENT = YES
|
||||
|
||||
# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
|
||||
# to create new LaTeX commands to be used in formulas as building blocks. See
|
||||
# the section "Including formulas" for details.
|
||||
|
||||
FORMULA_MACROFILE =
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# https://www.mathjax.org) which uses client side JavaScript for the rendering
|
||||
# https://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
|
||||
# installed or if you want to formulas look prettier in the HTML output. When
|
||||
# enabled you may also need to install MathJax separately and configure the path
|
||||
@@ -1621,7 +1527,7 @@ USE_MATHJAX = NO
|
||||
|
||||
# When MathJax is enabled you can set the default output format to be used for
|
||||
# the MathJax output. See the MathJax site (see:
|
||||
# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details.
|
||||
# http://docs.mathjax.org/en/latest/output.html) for more details.
|
||||
# Possible values are: HTML-CSS (which is slower, but has the best
|
||||
# compatibility), NativeMML (i.e. MathML) and SVG.
|
||||
# The default value is: HTML-CSS.
|
||||
@@ -1637,7 +1543,7 @@ MATHJAX_FORMAT = HTML-CSS
|
||||
# Content Delivery Network so you can quickly see the result without installing
|
||||
# MathJax. However, it is strongly recommended to install a local copy of
|
||||
# MathJax from https://www.mathjax.org before deployment.
|
||||
# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2.
|
||||
# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/
|
||||
@@ -1651,8 +1557,7 @@ MATHJAX_EXTENSIONS =
|
||||
|
||||
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
|
||||
# of code that will be used on startup of the MathJax code. See the MathJax site
|
||||
# (see:
|
||||
# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an
|
||||
# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
|
||||
# example see the documentation.
|
||||
# This tag requires that the tag USE_MATHJAX is set to YES.
|
||||
|
||||
@@ -1680,7 +1585,7 @@ MATHJAX_CODEFILE =
|
||||
SEARCHENGINE = YES
|
||||
|
||||
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
|
||||
# implemented using a web server instead of a web client using JavaScript. There
|
||||
# implemented using a web server instead of a web client using Javascript. There
|
||||
# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
|
||||
# setting. When disabled, doxygen will generate a PHP script for searching and
|
||||
# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
|
||||
@@ -1699,8 +1604,7 @@ SERVER_BASED_SEARCH = NO
|
||||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see:
|
||||
# https://xapian.org/).
|
||||
# Xapian (see: https://xapian.org/).
|
||||
#
|
||||
# See the section "External Indexing and Searching" for details.
|
||||
# The default value is: NO.
|
||||
@@ -1713,9 +1617,8 @@ EXTERNAL_SEARCH = NO
|
||||
#
|
||||
# Doxygen ships with an example indexer (doxyindexer) and search engine
|
||||
# (doxysearch.cgi) which are based on the open source search engine library
|
||||
# Xapian (see:
|
||||
# https://xapian.org/). See the section "External Indexing and Searching" for
|
||||
# details.
|
||||
# Xapian (see: https://xapian.org/). See the section "External Indexing and
|
||||
# Searching" for details.
|
||||
# This tag requires that the tag SEARCHENGINE is set to YES.
|
||||
|
||||
SEARCHENGINE_URL =
|
||||
@@ -1766,35 +1669,21 @@ LATEX_OUTPUT = latex
|
||||
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
|
||||
# invoked.
|
||||
#
|
||||
# Note that when not enabling USE_PDFLATEX the default is latex when enabling
|
||||
# USE_PDFLATEX the default is pdflatex and when in the later case latex is
|
||||
# chosen this is overwritten by pdflatex. For specific output languages the
|
||||
# default can have been set differently, this depends on the implementation of
|
||||
# the output language.
|
||||
# Note that when enabling USE_PDFLATEX this option is only used for generating
|
||||
# bitmaps for formulas in the HTML output, but not in the Makefile that is
|
||||
# written to the output directory.
|
||||
# The default file is: latex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_CMD_NAME = latex
|
||||
|
||||
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
|
||||
# index for LaTeX.
|
||||
# Note: This tag is used in the Makefile / make.bat.
|
||||
# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
|
||||
# (.tex).
|
||||
# The default file is: makeindex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
|
||||
# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
|
||||
# generate index for LaTeX. In case there is no backslash (\) as first character
|
||||
# it will be automatically added in the LaTeX code.
|
||||
# Note: This tag is used in the generated output file (.tex).
|
||||
# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
|
||||
# The default value is: makeindex.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_MAKEINDEX_CMD = makeindex
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
|
||||
# documents. This may be useful for small projects and may help to save some
|
||||
# trees in general.
|
||||
@@ -1879,11 +1768,9 @@ LATEX_EXTRA_FILES =
|
||||
|
||||
PDF_HYPERLINKS = YES
|
||||
|
||||
# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as
|
||||
# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX
|
||||
# files. Set this option to YES, to get a higher quality PDF documentation.
|
||||
#
|
||||
# See also section LATEX_CMD_NAME for selecting the engine.
|
||||
# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
|
||||
# the PDF file directly from the LaTeX files. Set this option to YES, to get a
|
||||
# higher quality PDF documentation.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
@@ -1931,14 +1818,6 @@ LATEX_BIB_STYLE = plain
|
||||
|
||||
LATEX_TIMESTAMP = NO
|
||||
|
||||
# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
|
||||
# path from which the emoji images will be read. If a relative path is entered,
|
||||
# it will be relative to the LATEX_OUTPUT directory. If left blank the
|
||||
# LATEX_OUTPUT directory will be used.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_EMOJI_DIRECTORY =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -1978,9 +1857,9 @@ COMPACT_RTF = NO
|
||||
|
||||
RTF_HYPERLINKS = NO
|
||||
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's
|
||||
# configuration file, i.e. a series of assignments. You only have to provide
|
||||
# replacements, missing definitions are set to their default value.
|
||||
# Load stylesheet definitions from file. Syntax is similar to doxygen's config
|
||||
# file, i.e. a series of assignments. You only have to provide replacements,
|
||||
# missing definitions are set to their default value.
|
||||
#
|
||||
# See also section "Doxygen usage" for information on how to generate the
|
||||
# default style sheet that doxygen normally uses.
|
||||
@@ -1989,8 +1868,8 @@ RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
|
||||
# Set optional variables used in the generation of an RTF document. Syntax is
|
||||
# similar to doxygen's configuration file. A template extensions file can be
|
||||
# generated using doxygen -e rtf extensionFile.
|
||||
# similar to doxygen's config file. A template extensions file can be generated
|
||||
# using doxygen -e rtf extensionFile.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_EXTENSIONS_FILE =
|
||||
@@ -2076,13 +1955,6 @@ XML_OUTPUT = xml
|
||||
|
||||
XML_PROGRAMLISTING = YES
|
||||
|
||||
# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
|
||||
# namespace members in file scope as well, matching the HTML output.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_XML is set to YES.
|
||||
|
||||
XML_NS_MEMB_FILE_SCOPE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the DOCBOOK output
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -2122,10 +1994,6 @@ DOCBOOK_PROGRAMLISTING = NO
|
||||
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to Sqlite3 output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -2221,7 +2089,7 @@ INCLUDE_FILE_PATTERNS =
|
||||
# recursively expanded use the := operator instead of the = operator.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
PREDEFINED = DOXYGEN
|
||||
PREDEFINED =
|
||||
|
||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||
# tag can be used to specify a list of macro names that should be expanded. The
|
||||
@@ -2288,6 +2156,12 @@ EXTERNAL_GROUPS = YES
|
||||
|
||||
EXTERNAL_PAGES = YES
|
||||
|
||||
# The PERL_PATH should be the absolute path and name of the perl script
|
||||
# interpreter (i.e. the result of 'which perl').
|
||||
# The default file (with absolute path) is: /usr/bin/perl.
|
||||
|
||||
PERL_PATH = /usr/bin/perl
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
@@ -2299,7 +2173,16 @@ EXTERNAL_PAGES = YES
|
||||
# powerful graphs.
|
||||
# The default value is: YES.
|
||||
|
||||
CLASS_DIAGRAMS = NO
|
||||
CLASS_DIAGRAMS = YES
|
||||
|
||||
# You can define message sequence charts within doxygen comments using the \msc
|
||||
# command. Doxygen will then run the mscgen tool (see:
|
||||
# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
|
||||
# documentation. The MSCGEN_PATH tag allows you to specify the directory where
|
||||
# the mscgen tool resides. If left empty the tool is assumed to be found in the
|
||||
# default search path.
|
||||
|
||||
MSCGEN_PATH =
|
||||
|
||||
# You can include diagrams made with dia in doxygen documentation. Doxygen will
|
||||
# then run dia to produce the diagram and insert it in the documentation. The
|
||||
@@ -2319,9 +2202,9 @@ HIDE_UNDOC_RELATIONS = YES
|
||||
# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
|
||||
# Bell Labs. The other options in this section have no effect if this option is
|
||||
# set to NO
|
||||
# The default value is: YES.
|
||||
# The default value is: NO.
|
||||
|
||||
HAVE_DOT = NO
|
||||
HAVE_DOT = YES
|
||||
|
||||
# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
|
||||
# to run in parallel. When set to 0 doxygen will base this on the number of
|
||||
@@ -2398,31 +2281,9 @@ UML_LOOK = NO
|
||||
# but if the number exceeds 15, the total amount of fields shown is limited to
|
||||
# 10.
|
||||
# Minimum value: 0, maximum value: 100, default value: 10.
|
||||
# This tag requires that the tag UML_LOOK is set to YES.
|
||||
|
||||
UML_LIMIT_NUM_FIELDS = 10
|
||||
|
||||
# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and
|
||||
# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS
|
||||
# tag is set to YES, doxygen will add type and arguments for attributes and
|
||||
# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen
|
||||
# will not generate fields with class member information in the UML graphs. The
|
||||
# class diagrams will look similar to the default class diagrams but using UML
|
||||
# notation for the relationships.
|
||||
# Possible values are: NO, YES and NONE.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag UML_LOOK is set to YES.
|
||||
|
||||
DOT_UML_DETAILS = NO
|
||||
|
||||
# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters
|
||||
# to display on a single line. If the actual line length exceeds this threshold
|
||||
# significantly it will wrapped across multiple lines. Some heuristics are apply
|
||||
# to avoid ugly line breaks.
|
||||
# Minimum value: 0, maximum value: 1000, default value: 17.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_WRAP_THRESHOLD = 17
|
||||
UML_LIMIT_NUM_FIELDS = 10
|
||||
|
||||
# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
|
||||
# collaboration graphs will show the relations between templates and their
|
||||
@@ -2497,9 +2358,7 @@ DIRECTORY_GRAPH = YES
|
||||
# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
|
||||
# to make the SVG files visible in IE 9+ (other browsers do not have this
|
||||
# requirement).
|
||||
# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
|
||||
# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
|
||||
# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,
|
||||
# Possible values are: png, jpg, gif, svg, png:gd, png:gd:gd, png:cairo,
|
||||
# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
|
||||
# png:gdiplus:gdiplus.
|
||||
# The default value is: png.
|
||||
@@ -2615,11 +2474,9 @@ DOT_MULTI_TARGETS = YES
|
||||
|
||||
GENERATE_LEGEND = YES
|
||||
|
||||
# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate
|
||||
# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
|
||||
# files that are used to generate the various graphs.
|
||||
#
|
||||
# Note: This setting is not only used for dot files but also for msc and
|
||||
# plantuml temporary files.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
DOT_CLEANUP = YES
|
||||
@@ -1,5 +1,4 @@
|
||||
HAVE_FILE_LOGGER=1
|
||||
HAVE_STATESTREAM?=1
|
||||
NEED_CXX_LINKER?=0
|
||||
NEED_GOLD_LINKER?=0
|
||||
MISSING_DECLS =0
|
||||
@@ -23,13 +22,10 @@ endif
|
||||
|
||||
OBJ :=
|
||||
LIBS :=
|
||||
DEF_FLAGS := -I.
|
||||
DEF_FLAGS :=
|
||||
ASFLAGS :=
|
||||
DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64
|
||||
DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"'
|
||||
DEFINES += -DASSETS_DIR='"$(DESTDIR)$(ASSETS_DIR)"'
|
||||
DEFINES += -DFILTERS_DIR='"$(DESTDIR)$(FILTERS_DIR)"'
|
||||
DEFINES += -DCORE_INFO_DIR='"$(DESTDIR)$(CORE_INFO_DIR)"'
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
@@ -46,9 +42,10 @@ else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
CFLAGS ?= -O3
|
||||
CXXFLAGS ?= -O3
|
||||
DEF_FLAGS += -ffast-math
|
||||
endif
|
||||
|
||||
DEF_FLAGS += -Wall -Wsign-compare
|
||||
DEF_FLAGS += -Wall
|
||||
|
||||
ifneq ($(findstring BSD,$(OS)),)
|
||||
DEF_FLAGS += -DBSD
|
||||
@@ -67,7 +64,7 @@ ifneq ($(findstring FPGA,$(OS)),)
|
||||
endif
|
||||
|
||||
ifneq ($(findstring Win32,$(OS)),)
|
||||
LDFLAGS += -static-libgcc -lwinmm -limm32
|
||||
LDFLAGS += -static-libgcc -lwinmm
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
@@ -113,7 +110,7 @@ endif
|
||||
|
||||
ifneq ($(CXX_BUILD), 1)
|
||||
ifneq ($(C89_BUILD),)
|
||||
CFLAGS += -std=c89 -ansi -pedantic -Werror=pedantic -Wno-long-long -Werror=declaration-after-statement -Wno-variadic-macros
|
||||
CFLAGS += -std=c89 -ansi -pedantic -Werror=pedantic -Wno-long-long
|
||||
else ifeq ($(HAVE_C99), 1)
|
||||
CFLAGS += $(C99_CFLAGS)
|
||||
endif
|
||||
@@ -121,7 +118,7 @@ ifneq ($(CXX_BUILD), 1)
|
||||
CFLAGS += -D_GNU_SOURCE
|
||||
endif
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS) -Ideps
|
||||
DEF_FLAGS += $(INCLUDE_DIRS) -I. -Ideps -Ideps/stb
|
||||
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS) -D__STDC_CONSTANT_MACROS
|
||||
@@ -171,43 +168,12 @@ ifneq ($(MOC_HEADERS),)
|
||||
RARCH_OBJ += $(MOC_OBJ)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_METAL), 1)
|
||||
METALLIB := default.metallib
|
||||
endif
|
||||
|
||||
all: $(TARGET) $(METALLIB) config.mk
|
||||
|
||||
define INFO
|
||||
ASFLAGS: $(ASFLAGS)
|
||||
CC: $(CC)
|
||||
CFLAGS: $(CFLAGS)
|
||||
CPPFLAGS: $(CPPFLAGS)
|
||||
CXX: $(CXX)
|
||||
CXXFLAGS: $(CXXFLAGS)
|
||||
DEFINES: $(DEFINES)
|
||||
LDFLAGS: $(LDFLAGS)
|
||||
LIBRARY_DIRS: $(LIBRARY_DIRS)
|
||||
LIBS: $(LIBS)
|
||||
LINK: $(LINK)
|
||||
MD: $(MD)
|
||||
MOC: $(MOC)
|
||||
MOC_TMP: $(MOC_TMP)
|
||||
OBJCFLAGS: $(OBJCFLAGS)
|
||||
QT_VERSION: $(QT_VERSION)
|
||||
RARCH_OBJ: $(RARCH_OBJ)
|
||||
WINDRES: $(WINDRES)
|
||||
endef
|
||||
export INFO
|
||||
|
||||
info:
|
||||
ifneq ($(V),1)
|
||||
@echo "$$INFO"
|
||||
endif
|
||||
all: $(TARGET) config.mk
|
||||
|
||||
$(MOC_SRC):
|
||||
@$(if $(Q), $(shell echo echo MOC $<),)
|
||||
$(eval MOC_TMP := $(patsubst %.h,%_moc.cpp,$@))
|
||||
$(Q)QT_SELECT=$(QT_VERSION) $(MOC) $(DEFINES) -o $(MOC_TMP) $<
|
||||
$(Q)QT_SELECT=$(QT_VERSION) $(MOC) -o $(MOC_TMP) $<
|
||||
|
||||
$(foreach x,$(join $(addsuffix :,$(MOC_SRC)),$(MOC_HEADERS)),$(eval $x))
|
||||
|
||||
@@ -234,23 +200,6 @@ $(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
# Compile the Metal shader library used by gfx/drivers/metal.m via
|
||||
# [device newDefaultLibrary]. Xcode produces this automatically for the
|
||||
# Metal.xcodeproj build; the commandline build has to do it by hand.
|
||||
# The .metallib must sit next to the retroarch binary at runtime.
|
||||
ifeq ($(HAVE_METAL), 1)
|
||||
METAL_SHADER_SRCS := gfx/common/metal/Shaders.metal
|
||||
METAL_AIR_FILES := $(METAL_SHADER_SRCS:.metal=.air)
|
||||
|
||||
%.air: %.metal
|
||||
@$(if $(Q), $(shell echo echo METAL $<),)
|
||||
$(Q)xcrun -sdk macosx metal $(ARCHFLAGS) -c $< -o $@
|
||||
|
||||
default.metallib: $(METAL_AIR_FILES)
|
||||
@$(if $(Q), $(shell echo echo METALLIB $@),)
|
||||
$(Q)xcrun -sdk macosx metallib $(METAL_AIR_FILES) -o $@
|
||||
endif
|
||||
|
||||
$(OBJDIR)/%.o: %.c config.h config.mk
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
@@ -266,18 +215,12 @@ $(OBJDIR)/%.o: %.m
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
# ARC (Automatic Reference Counting) overrides. These Objective-C
|
||||
# files use ARC-only constructs (__weak, __bridge*, no manual
|
||||
# retain/release) and must be built with -fobjc-arc. The rest of the
|
||||
# RetroArch Objective-C code is MRC-written (explicit retain/release,
|
||||
# NSAutoreleasePool, etc.) and would fail to compile under ARC — so
|
||||
# we cannot set -fobjc-arc globally. Xcode does the equivalent via
|
||||
# per-file CLANG_ENABLE_OBJC_ARC=YES build settings.
|
||||
$(OBJDIR)/gfx/drivers/metal.o: OBJCFLAGS += -fobjc-arc
|
||||
$(OBJDIR)/input/drivers_joypad/mfi_joypad.o: OBJCFLAGS += -fobjc-arc
|
||||
$(OBJDIR)/audio/drivers/coreaudio3.o: OBJCFLAGS += -fobjc-arc
|
||||
$(OBJDIR)/input/drivers/cocoa_input.o: OBJCFLAGS += -fobjc-arc
|
||||
$(OBJDIR)/location/drivers/corelocation.o: OBJCFLAGS += -fobjc-arc
|
||||
.FORCE:
|
||||
|
||||
$(OBJDIR)/git_version.o: git_version.c .FORCE
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S config.h config.mk $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@@ -287,37 +230,32 @@ $(OBJDIR)/%.o: %.S config.h config.mk $(HEADERS)
|
||||
$(OBJDIR)/%.o: %.rc $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo WINDRES $<),)
|
||||
$(Q)$(WINDRES) $(DEFINES) -o $@ $<
|
||||
$(Q)$(WINDRES) -o $@ $<
|
||||
|
||||
install: $(TARGET)
|
||||
rm -f $(OBJDIR)/git_version.o
|
||||
mkdir -p $(DESTDIR)$(BIN_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(GLOBAL_CONFIG_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/applications 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/metainfo 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DOC_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(MAN_DIR)/man6 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/pixmaps 2>/dev/null || /bin/true
|
||||
cp $(TARGET) $(DESTDIR)$(BIN_DIR)
|
||||
@if test "$(HAVE_METAL)" = "1" && test -f default.metallib; then \
|
||||
cp default.metallib $(DESTDIR)$(BIN_DIR)/; \
|
||||
fi
|
||||
cp tools/cg2glsl.py $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
cp retroarch.cfg $(DESTDIR)$(GLOBAL_CONFIG_DIR)
|
||||
cp com.libretro.RetroArch.metainfo.xml $(DESTDIR)$(DATA_DIR)/metainfo
|
||||
cp com.libretro.RetroArch.desktop $(DESTDIR)$(DATA_DIR)/applications
|
||||
cp retroarch.desktop $(DESTDIR)$(DATA_DIR)/applications
|
||||
cp docs/retroarch.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
cp docs/retroarch-cg2glsl.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
cp media/com.libretro.RetroArch.svg $(DESTDIR)$(DATA_DIR)/pixmaps
|
||||
cp media/retroarch.svg $(DESTDIR)$(DATA_DIR)/pixmaps
|
||||
cp COPYING $(DESTDIR)$(DOC_DIR)
|
||||
cp README.md $(DESTDIR)$(DOC_DIR)
|
||||
chmod 755 $(DESTDIR)$(BIN_DIR)/$(TARGET)
|
||||
chmod 755 $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
chmod 644 $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/applications/com.libretro.RetroArch.desktop
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/metainfo/com.libretro.RetroArch.metainfo.xml
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/applications/retroarch.desktop
|
||||
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch.6
|
||||
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch-cg2glsl.6
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/pixmaps/com.libretro.RetroArch.svg
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/pixmaps/retroarch.svg
|
||||
@if test -d media/assets && test $(HAVE_ASSETS); then \
|
||||
echo "Installing media assets..."; \
|
||||
mkdir -p $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
@@ -338,9 +276,8 @@ uninstall:
|
||||
rm -f $(DESTDIR)$(BIN_DIR)/$(TARGET)
|
||||
rm -f $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
rm -f $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/applications/com.libretro.RetroArch.desktop
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/metainfo/com.libretro.RetroArch.metainfo.xml
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/pixmaps/com.libretro.RetroArch.svg
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/applications/retroarch.desktop
|
||||
rm -f $(DESTDIR)$(DATA_DIR)/pixmaps/retroarch.svg
|
||||
rm -f $(DESTDIR)$(DOC_DIR)/COPYING
|
||||
rm -f $(DESTDIR)$(DOC_DIR)/COPYING.assets
|
||||
rm -f $(DESTDIR)$(DOC_DIR)/README.md
|
||||
@@ -349,131 +286,9 @@ uninstall:
|
||||
rm -rf $(DESTDIR)$(ASSETS_DIR)
|
||||
|
||||
clean:
|
||||
@$(if $(Q), echo $@,)
|
||||
$(Q)rm -rf $(OBJDIR_BASE)
|
||||
$(Q)rm -f $(TARGET)
|
||||
$(Q)rm -f *.d
|
||||
$(Q)rm -f default.metallib gfx/common/metal/*.air
|
||||
$(Q)rm -rf $(BUNDLE)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# make bundle — assemble RetroArch.app from the build outputs (macOS only).
|
||||
#
|
||||
# Mirrors what pkg/apple/RetroArch_Metal.xcodeproj produces, minus code
|
||||
# signing, entitlements, asset archives, and framework-wrapped cores. The
|
||||
# resulting .app is a plain, ad-hoc bundle suitable for local testing and
|
||||
# for distribution outside the App Store.
|
||||
#
|
||||
# Invoked as `make bundle`. Not part of `all:`; plain `make` builds only
|
||||
# the retroarch binary and default.metallib exactly as before.
|
||||
#
|
||||
# The deployment target in Info.plist (LSMinimumSystemVersion) is derived
|
||||
# from the -mmacosx-version-min=X.Y flag the binary was linked with (set
|
||||
# earlier in this Makefile via $(MINVERFLAGS) based on the target arch).
|
||||
# Build floors per Makefile.common:130-164:
|
||||
# arm64 -> 10.15 (Apple Silicon)
|
||||
# x86_64+Metal -> 10.13
|
||||
# x86_64 -> 10.7
|
||||
# i386 -> 10.6
|
||||
# powerpc -> 10.5
|
||||
# To target a lower OS version than the default for the current arch,
|
||||
# cross-compile with ARCH=<arch> (e.g. `ARCH=ppc make && make bundle`)
|
||||
# or override BUNDLE_MIN_OS directly.
|
||||
#
|
||||
# User-overridable variables:
|
||||
# BUNDLE bundle directory name (default: RetroArch.app)
|
||||
# BUNDLE_EXECUTABLE binary name inside Contents/MacOS (default: RetroArch)
|
||||
# BUNDLE_IDENTIFIER CFBundleIdentifier (default: com.libretro.dist.RetroArch)
|
||||
# BUNDLE_VERSION CFBundleShortVersionString (default: from version.all)
|
||||
# BUNDLE_BUILD CFBundleVersion (default: 44)
|
||||
# BUNDLE_MIN_OS LSMinimumSystemVersion (default: derived from MINVERFLAGS)
|
||||
#
|
||||
# Example: BUNDLE=RetroArchDev.app BUNDLE_IDENTIFIER=com.example.dev make bundle
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
ifneq ($(findstring Darwin,$(OS)),)
|
||||
|
||||
# version.all is a C/Make/shell polyglot, but all lines start with '#' so
|
||||
# '-include version.all' is a no-op from Make's perspective. Parse the
|
||||
# #define out via shell instead.
|
||||
PACKAGE_VERSION := $(shell grep 'define PACKAGE_VERSION' version.all | cut -d'"' -f2)
|
||||
|
||||
BUNDLE ?= RetroArch.app
|
||||
BUNDLE_EXECUTABLE ?= RetroArch
|
||||
BUNDLE_IDENTIFIER ?= com.libretro.dist.RetroArch
|
||||
BUNDLE_VERSION ?= $(PACKAGE_VERSION)
|
||||
BUNDLE_BUILD ?= 44
|
||||
# Extract X.Y from '-mmacosx-version-min=X.Y' inside $(MINVERFLAGS).
|
||||
# If nothing matches (e.g. building with a custom toolchain), fall back to 10.13.
|
||||
BUNDLE_MIN_OS ?= $(or $(patsubst -mmacosx-version-min=%,%,$(filter -mmacosx-version-min=%,$(MINVERFLAGS))),10.13)
|
||||
# Detect legacy macOS targets (< 10.9 Mavericks). Pre-Mavericks codesign
|
||||
# predates the `--timestamp` option; the dyld/Gatekeeper enforcement that
|
||||
# makes ad-hoc signing worth doing didn't exist yet either, so on legacy
|
||||
# targets we skip signing entirely rather than fight an older toolchain.
|
||||
# We key off BUNDLE_MIN_OS rather than the build host so cross-compiling
|
||||
# for ppc/10.5 on a modern Mac still picks up the legacy path.
|
||||
MACOS_LEGACY := $(shell echo $(BUNDLE_MIN_OS) | awk -F. '{ exit !($$1 < 10 || ($$1 == 10 && $$2 < 9)) }' && echo 1)
|
||||
INFO_PLIST_SRC := pkg/apple/OSX/Info_Metal.plist
|
||||
# Universal (arm64 + x86_64) MoltenVK.framework shipped in the repo.
|
||||
# Only copied when HAVE_VULKAN=1; on pre-Metal / non-Vulkan builds
|
||||
# (e.g. ppc 10.5, i386 10.6) the Vulkan code path isn't compiled in
|
||||
# and shipping MoltenVK would be dead weight that can't even load.
|
||||
MOLTENVK_FRAMEWORK := pkg/apple/Frameworks/MoltenVK.xcframework/macos-arm64_x86_64/MoltenVK.framework
|
||||
|
||||
bundle: $(TARGET) $(METALLIB)
|
||||
@echo "Assembling $(BUNDLE) (min macOS $(BUNDLE_MIN_OS))"
|
||||
$(Q)rm -rf $(BUNDLE)
|
||||
$(Q)mkdir -p $(BUNDLE)/Contents/MacOS
|
||||
$(Q)mkdir -p $(BUNDLE)/Contents/Resources/filters/audio
|
||||
$(Q)mkdir -p $(BUNDLE)/Contents/Resources/filters/video
|
||||
$(Q)cp $(TARGET) $(BUNDLE)/Contents/MacOS/$(BUNDLE_EXECUTABLE)
|
||||
$(Q)chmod +x $(BUNDLE)/Contents/MacOS/$(BUNDLE_EXECUTABLE)
|
||||
$(Q)if [ -f default.metallib ]; then \
|
||||
cp default.metallib $(BUNDLE)/Contents/Resources/default.metallib; \
|
||||
elif [ -f pkg/apple/OSX/Resources/default.metallib ]; then \
|
||||
cp pkg/apple/OSX/Resources/default.metallib $(BUNDLE)/Contents/Resources/default.metallib; \
|
||||
fi
|
||||
$(Q)cp libretro-common/audio/dsp_filters/*.dsp \
|
||||
$(BUNDLE)/Contents/Resources/filters/audio/ 2>/dev/null || true
|
||||
$(Q)cp gfx/video_filters/*.filt \
|
||||
$(BUNDLE)/Contents/Resources/filters/video/ 2>/dev/null || true
|
||||
$(Q)if [ "$(HAVE_VULKAN)" = "1" ] && [ -d $(MOLTENVK_FRAMEWORK) ]; then \
|
||||
mkdir -p $(BUNDLE)/Contents/Frameworks; \
|
||||
cp -R $(MOLTENVK_FRAMEWORK) $(BUNDLE)/Contents/Frameworks/; \
|
||||
fi
|
||||
$(Q)printf 'APPL????' > $(BUNDLE)/Contents/PkgInfo
|
||||
$(Q)sed \
|
||||
-e 's|$$(EXECUTABLE_NAME)|$(BUNDLE_EXECUTABLE)|g' \
|
||||
-e 's|$${PRODUCT_NAME}|$(BUNDLE_EXECUTABLE)|g' \
|
||||
-e 's|$$(PRODUCT_BUNDLE_IDENTIFIER)|$(BUNDLE_IDENTIFIER)|g' \
|
||||
-e 's|$$(MARKETING_VERSION)|$(BUNDLE_VERSION)|g' \
|
||||
-e 's|$$(CURRENT_PROJECT_VERSION)|$(BUNDLE_BUILD)|g' \
|
||||
-e 's|$$(MACOSX_DEPLOYMENT_TARGET)|$(BUNDLE_MIN_OS)|g' \
|
||||
$(INFO_PLIST_SRC) > $(BUNDLE)/Contents/Info.plist
|
||||
@# Ad-hoc code signing. On Apple Silicon (and increasingly on Intel
|
||||
@# with hardened runtime enforcement), dyld refuses to load unsigned
|
||||
@# dylibs even for ad-hoc app-internal use — including the MoltenVK
|
||||
@# framework copied in above. `codesign --sign -` produces an ad-hoc
|
||||
@# signature that satisfies the loader without needing a developer
|
||||
@# identity. Sign nested content first (frameworks), then the outer
|
||||
@# .app wrapper, so the app's seal covers all contents.
|
||||
@#
|
||||
@# Skip entirely on pre-Mavericks targets: those toolchains predate
|
||||
@# `--timestamp`, the dyld enforcement that makes this necessary, and
|
||||
@# in some cases ad-hoc signing support altogether.
|
||||
$(Q)if [ "$(MACOS_LEGACY)" != "1" ]; then \
|
||||
if [ -d $(BUNDLE)/Contents/Frameworks ]; then \
|
||||
for fw in $(BUNDLE)/Contents/Frameworks/*.framework; do \
|
||||
[ -d "$$fw" ] && codesign --force --sign - --timestamp=none "$$fw"; \
|
||||
done; \
|
||||
fi; \
|
||||
codesign --force --sign - --timestamp=none $(BUNDLE); \
|
||||
fi
|
||||
@echo "Done. Run with: open $(BUNDLE)"
|
||||
|
||||
.PHONY: bundle
|
||||
|
||||
endif
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
|
||||
.PHONY: all install uninstall clean
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ clean:
|
||||
rm -f input/*.o
|
||||
rm -f tools/*.o
|
||||
rm -f $(BINDIR)/retroarch
|
||||
rm -f $(BINDIR)/retroarch-joyconfig
|
||||
rm -f $(PNDDIR)/readme.html
|
||||
rm -f retroarch
|
||||
|
||||
@@ -47,6 +47,7 @@ clean:
|
||||
rm -f input/*.o
|
||||
rm -f tools/*.o
|
||||
rm -f $(BINDIR)/retroarch
|
||||
rm -f $(BINDIR)/retroarch-joyconfig
|
||||
rm -f $(PNDDIR)/readme.html
|
||||
rm -f retroarch
|
||||
|
||||
+597
-1530
File diff suppressed because it is too large.
Load diff
+73
-167
@@ -2,16 +2,12 @@ TARGET := retroarch_3ds
|
||||
LIBRETRO =
|
||||
|
||||
DEBUG = 0
|
||||
CONSOLE_LOG = 0
|
||||
GRIFFIN_BUILD = 0
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
GRIFFIN_BUILD = 1
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
BUILD_3DSX = 1
|
||||
BUILD_3DS = 0
|
||||
BUILD_CIA = 1
|
||||
LIBCTRU_NO_DEPRECATION = 1
|
||||
USE_CTRULIB_2 ?= 0
|
||||
LOAD_WITHOUT_CORE_INFO ?= 0
|
||||
|
||||
APP_TITLE = RetroArch 3DS
|
||||
APP_DESCRIPTION = RetroArch 3DS
|
||||
@@ -39,7 +35,8 @@ OBJ += ctr/exec-3dsx/exec_cia.o \
|
||||
ctr/exec-3dsx/exec_3dsx.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/launch.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/rosalina.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/hax2.o
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/hax2.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/ninjhax1.o
|
||||
|
||||
ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
APP_USE_SVCHAX = 1
|
||||
@@ -53,127 +50,76 @@ endif
|
||||
DEFINES :=
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_7ZIP -DHAVE_RPNG -DHAVE_RWEBP -DHAVE_RDDS -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA
|
||||
DEFINES += -DHAVE_NETWORKING -DHAVE_IFINFO -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_CORES
|
||||
DEFINES += -DHAVE_UPDATE_CORE_INFO
|
||||
#DEFINES += -DHAVE_UPDATE_ASSETS
|
||||
DEFINES += -DHAVE_PATCH -DHAVE_RWAV
|
||||
DEFINES += -DHAVE_SCREENSHOTS
|
||||
DEFINES += -DHAVE_REWIND
|
||||
DEFINES += -DHAVE_THREADS
|
||||
DEFINES += -DHAVE_GFX_WIDGETS
|
||||
DEFINES += -DHAVE_OVERLAY
|
||||
DEFINES += -DHAVE_CORE_INFO_CACHE
|
||||
#DEFINES += -DHAVE_SOCKET_LEGACY
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA
|
||||
#DEFINES += -DHAVE_NETWORKING -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_SOCKET_LEGACY -DHAVE_THREADS
|
||||
#-DHAVE_SSL -DHAVE_BUILTINMBEDTLS -DMBEDTLS_SSL_DEBUG_ALL
|
||||
#ssl is currently incompatible with griffin due to use of the "static" flag on repeating functions that will conflict when included in one file
|
||||
CFLAGS += -I. \
|
||||
-Ideps \
|
||||
-Ideps/mbedtls \
|
||||
-Ideps/rcheevos/include \
|
||||
-Ilibretro-common/include
|
||||
else
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_RTGA = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RWEBP = 1
|
||||
HAVE_RDDS = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MATERIALUI = 1
|
||||
HAVE_XMB = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_RWAV = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_OVERLAY = 1
|
||||
HAVE_GFX_WIDGETS = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_IFINFO = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_BUILTINMBEDTLS = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
HAVE_CLOUDSYNC = 1
|
||||
#HAVE_NETWORKING = 1
|
||||
#HAVE_CHEEVOS = 1
|
||||
#HAVE_SOCKET_LEGACY = 1
|
||||
#HAVE_THREADS = 1
|
||||
#HAVE_SSL = 1
|
||||
#HAVE_BUILTINMBEDTLS = 1
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS) -I. $(INCLUDE_DIRS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
BLACKLIST += input/input_overlay.o
|
||||
BLACKLIST += tasks/task_overlay.o
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitpro")
|
||||
endif
|
||||
ifeq ($(strip $(DEVKITARM)),)
|
||||
$(error "Please set DEVKITARM in your environment. export DEVKITARM=<path to>devkitarm")
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CTRULIB)),)
|
||||
CTRULIB = $(DEVKITPRO)/libctru
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
CFLAGS += -DUSE_CTRULIB_2
|
||||
endif
|
||||
|
||||
ifeq ($(LOAD_WITHOUT_CORE_INFO),1)
|
||||
CFLAGS += -DLOAD_WITHOUT_CORE_INFO
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DEVKITTOOLS)),)
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
DEVKITTOOLS = $(DEVKITPRO)/tools
|
||||
else
|
||||
DEVKITTOOLS = $(DEVKITARM)
|
||||
endif
|
||||
endif
|
||||
|
||||
APP_TITLE := $(shell echo "$(APP_TITLE)" | cut -c1-128)
|
||||
APP_DESCRIPTION := $(shell echo "$(APP_DESCRIPTION)" | cut -c1-256)
|
||||
APP_AUTHOR := $(shell echo "$(APP_AUTHOR)" | cut -c1-128)
|
||||
APP_PRODUCT_CODE := $(shell echo $(APP_PRODUCT_CODE) | cut -c1-16)
|
||||
APP_UNIQUE_ID := $(shell echo $(APP_UNIQUE_ID) | cut -c1-7)
|
||||
|
||||
APP_VERSION_MAJOR := $(shell shuf -i 0-63 -n 1)
|
||||
APP_VERSION_MINOR := $(shell shuf -i 0-63 -n 1)
|
||||
APP_VERSION_MICRO := $(shell shuf -i 0-15 -n 1)
|
||||
|
||||
MAKEROM_ARGS_COMMON = -rsf $(APP_RSF) -exefslogo -elf $(TARGET).elf -icon $(TARGET).icn -banner $(TARGET).bnr \
|
||||
-DAPP_TITLE="$(APP_TITLE)" -DAPP_PRODUCT_CODE="$(APP_PRODUCT_CODE)" -DAPP_UNIQUE_ID=$(APP_UNIQUE_ID) \
|
||||
-DAPP_SYSTEM_MODE=$(APP_SYSTEM_MODE) -DAPP_SYSTEM_MODE_EXT=$(APP_SYSTEM_MODE_EXT) \
|
||||
-major "$(APP_VERSION_MAJOR)" -minor "$(APP_VERSION_MINOR)" -micro "$(APP_VERSION_MICRO)"
|
||||
MAKEROM_ARGS_COMMON = -rsf $(APP_RSF) -exefslogo -elf $(TARGET).elf -icon $(TARGET).icn -banner $(TARGET).bnr -DAPP_TITLE="$(APP_TITLE)" -DAPP_PRODUCT_CODE="$(APP_PRODUCT_CODE)" -DAPP_UNIQUE_ID=$(APP_UNIQUE_ID) -DAPP_SYSTEM_MODE=$(APP_SYSTEM_MODE) -DAPP_SYSTEM_MODE_EXT=$(APP_SYSTEM_MODE_EXT)
|
||||
|
||||
INCDIRS := -I$(CTRULIB)/include
|
||||
LIBDIRS := -L. -L$(CTRULIB)/lib
|
||||
|
||||
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -marm -mfpu=vfp -mtp=soft
|
||||
|
||||
CFLAGS += -mword-relocations $(ARCH)
|
||||
CFLAGS += -DARM11 -D_3DS
|
||||
CFLAGS += -mword-relocations \
|
||||
-fomit-frame-pointer -ffast-math \
|
||||
-Werror=implicit-function-declaration \
|
||||
$(ARCH)
|
||||
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
CFLAGS += -D__3DS__
|
||||
endif
|
||||
#CFLAGS += -Wall
|
||||
CFLAGS += -DARM11 -D_3DS
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
else
|
||||
CFLAGS += -fomit-frame-pointer -O3
|
||||
endif
|
||||
|
||||
ifeq ($(CONSOLE_LOG), 1)
|
||||
CFLAGS += -DCONSOLE_LOG
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(LIBCTRU_NO_DEPRECATION), 1)
|
||||
@@ -185,32 +131,24 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
CFLAGS += -I. \
|
||||
-Ideps \
|
||||
-Ideps/7zip \
|
||||
-Ideps/stb \
|
||||
-Ilibretro-common/include \
|
||||
-Ilibretro-common/include/compat/zlib
|
||||
|
||||
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)
|
||||
CFLAGS += -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_CORES -DHAVE_UPDATE_CORE_INFO
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
CFLAGS += -Werror=implicit-function-declaration
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
|
||||
ASFLAGS := -g $(ARCH) -O3
|
||||
LDFLAGS += -specs=ctr/3dsx_custom.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
CFLAGS += -std=gnu99
|
||||
ASFLAGS := -g $(ARCH) -O3
|
||||
LDFLAGS += -specs=ctr/3dsx_custom.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
CFLAGS += -ffunction-sections -fdata-sections
|
||||
LDFLAGS += -Wl,--gc-sections
|
||||
CFLAGS += -std=gnu99 -ffast-math
|
||||
|
||||
LIB_CORE :=
|
||||
LIB_CORE_FULL :=
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
LIB_CORE += -lretro_ctr
|
||||
LIB_CORE_FULL += libretro_ctr.a
|
||||
endif
|
||||
|
||||
LIBS := $(WHOLE_START) $(LIB_CORE) $(WHOLE_END) -lm
|
||||
LIBS := $(WHOLE_START) -lretro_ctr $(WHOLE_END) -lm
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
LIBS += -lctrud
|
||||
@@ -218,10 +156,6 @@ else
|
||||
LIBS += -lctru
|
||||
endif
|
||||
|
||||
ifneq ($(V),1)
|
||||
Q := @
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_3DSX), 1)
|
||||
TARGET_3DSX := $(TARGET).3dsx $(TARGET).smdh
|
||||
endif
|
||||
@@ -234,7 +168,16 @@ ifeq ($(BUILD_CIA), 1)
|
||||
TARGET_CIA := $(TARGET).cia
|
||||
endif
|
||||
|
||||
.PHONY: $(BUILD) clean all
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(TARGET_3DSX) $(TARGET_3DS) $(TARGET_CIA)
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
$(TARGET).elf: $(OBJ) libretro_ctr.a
|
||||
|
||||
PREFIX := $(DEVKITARM)/bin/arm-none-eabi-
|
||||
|
||||
CC := $(PREFIX)gcc
|
||||
CXX := $(PREFIX)g++
|
||||
AS := $(PREFIX)as
|
||||
@@ -268,70 +211,35 @@ else
|
||||
MAKEROM = $(CTRMAKEROM)
|
||||
endif
|
||||
|
||||
.PHONY: $(BUILD) clean all
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
define INFO
|
||||
AR: $(AR)
|
||||
ASFLAGS: $(ASFLAGS)
|
||||
CC: $(CC)
|
||||
CFLAGS: $(CFLAGS)
|
||||
CXX: $(CXX)
|
||||
CXXFLAGS: $(CXXFLAGS)
|
||||
INCDIRS: $(INCDIRS)
|
||||
LD: $(LD)
|
||||
LDFLAGS: $(LDFLAGS)
|
||||
LIBDIRS: $(LIBDIRS)
|
||||
LIBS: $(LIBS)
|
||||
OBJ: $(OBJ)
|
||||
endef
|
||||
export INFO
|
||||
|
||||
info:
|
||||
ifneq ($(V),1)
|
||||
@echo "$$INFO"
|
||||
endif
|
||||
|
||||
|
||||
$(TARGET): $(TARGET_3DSX) $(TARGET_3DS) $(TARGET_CIA)
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
$(TARGET).elf: $(OBJ) $(LIB_CORE_FULL)
|
||||
|
||||
%.o: %.vsh %.gsh
|
||||
$(DEVKITTOOLS)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITTOOLS)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.vsh
|
||||
$(DEVKITTOOLS)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITTOOLS)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.cpp
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) -c -o $@ $< $(CXXFLAGS) $(INCDIRS)
|
||||
$(CXX) -c -o $@ $< $(CXXFLAGS) $(INCDIRS)
|
||||
|
||||
%.o: %.c
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS)
|
||||
$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS)
|
||||
|
||||
%.o: %.s
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) -c -o $@ $< $(ASFLAGS)
|
||||
$(CC) -c -o $@ $< $(ASFLAGS)
|
||||
|
||||
%.o: %.S
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) -c -o $@ $< $(ASFLAGS)
|
||||
$(CC) -c -o $@ $< $(ASFLAGS)
|
||||
|
||||
%.a:
|
||||
@$(if $(Q), $(shell echo echo AR $<),)
|
||||
$(Q)$(AR) -rc $@ $^
|
||||
$(AR) -rc $@ $^
|
||||
|
||||
%.vsh:
|
||||
|
||||
$(TARGET).smdh: $(TARGET).elf $(APP_ICON)
|
||||
$(DEVKITTOOLS)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
$(TARGET).smdh: $(APP_ICON)
|
||||
$(DEVKITARM)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
@@ -339,17 +247,16 @@ ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
else
|
||||
rm -f $(TARGET).xml
|
||||
endif
|
||||
$(DEVKITTOOLS)/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
$(DEVKITARM)/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
|
||||
$(TARGET).elf: ctr/3dsx_custom_crt0.o
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LD) $(LDFLAGS) $(OBJ) $(LIBDIRS) $(LIBS) -o $@
|
||||
$(LD) $(LDFLAGS) $(OBJ) $(LIBDIRS) $(LIBS) -o $@
|
||||
$(NM) -CSn $@ > $(notdir $*.lst)
|
||||
|
||||
$(TARGET).bnr: $(TARGET).elf $(APP_BANNER) $(APP_AUDIO)
|
||||
$(TARGET).bnr: $(APP_BANNER) $(APP_AUDIO)
|
||||
$(BANNERTOOL) makebanner -i "$(APP_BANNER)" -a "$(APP_AUDIO)" -o $@
|
||||
|
||||
$(TARGET).icn: $(TARGET).elf $(APP_ICON)
|
||||
$(TARGET).icn: $(APP_ICON)
|
||||
$(BANNERTOOL) makesmdh -s "$(APP_TITLE)" -l "$(APP_TITLE)" -p "$(APP_AUTHOR)" -i $(APP_ICON) -o $@
|
||||
|
||||
$(TARGET).3ds: $(TARGET).elf $(TARGET).bnr $(TARGET).icn $(APP_RSF)
|
||||
@@ -359,16 +266,15 @@ $(TARGET).cia: $(TARGET).elf $(TARGET).bnr $(TARGET).icn $(APP_RSF)
|
||||
$(MAKEROM) -f cia -o $@ $(MAKEROM_ARGS_COMMON) -DAPP_ENCRYPTED=false
|
||||
|
||||
clean:
|
||||
@$(if $(Q), echo $@,)
|
||||
$(Q)rm -f $(OBJ)
|
||||
$(Q)rm -f $(TARGET).3dsx
|
||||
$(Q)rm -f $(TARGET).elf
|
||||
$(Q)rm -f $(TARGET).3ds
|
||||
$(Q)rm -f $(TARGET).cia
|
||||
$(Q)rm -f $(TARGET).smdh
|
||||
$(Q)rm -f $(TARGET).bnr
|
||||
$(Q)rm -f $(TARGET).icn
|
||||
$(Q)rm -f ctr/ctr_config_*.o
|
||||
$(Q)rm -f ctr/3dsx_custom_crt0.o
|
||||
rm -f $(OBJ)
|
||||
rm -f $(TARGET).3dsx
|
||||
rm -f $(TARGET).elf
|
||||
rm -f $(TARGET).3ds
|
||||
rm -f $(TARGET).cia
|
||||
rm -f $(TARGET).smdh
|
||||
rm -f $(TARGET).bnr
|
||||
rm -f $(TARGET).icn
|
||||
rm -f ctr/ctr_config_*.o
|
||||
rm -f ctr/3dsx_custom_crt0.o
|
||||
|
||||
.PHONY: clean
|
||||
+18
-37
@@ -2,11 +2,9 @@ TARGET := retroarch_3ds_salamander
|
||||
LIBRETRO =
|
||||
|
||||
DEBUG = 0
|
||||
CONSOLE_LOG = 0
|
||||
BUILD_3DSX = 1
|
||||
BUILD_3DS = 0
|
||||
BUILD_CIA = 1
|
||||
USE_CTRULIB_2 ?= 0
|
||||
|
||||
APP_TITLE = RetroArch 3DS
|
||||
APP_DESCRIPTION = RetroArch 3DS
|
||||
@@ -36,37 +34,24 @@ OBJ := ctr/ctr_system.o \
|
||||
libretro-common/lists/dir_list.o \
|
||||
libretro-common/file/retro_dirent.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strldup.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/file/config_file_io.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/time/rtime.o \
|
||||
libretro-common/hash/rhash.o \
|
||||
file_path_str.o \
|
||||
verbosity.o
|
||||
|
||||
OBJ += ctr/exec-3dsx/exec_cia.o \
|
||||
ctr/exec-3dsx/exec_3dsx.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/launch.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/rosalina.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/hax2.o
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/hax2.o \
|
||||
ctr/exec-3dsx/mini-hb-menu/loaders/ninjhax1.o
|
||||
|
||||
ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitpro")
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
CFLAGS += -DUSE_CTRULIB_2
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DEVKITTOOLS)),)
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
DEVKITTOOLS = $(DEVKITPRO)/tools
|
||||
else
|
||||
DEVKITTOOLS = $(DEVKITARM)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CTRULIB)),)
|
||||
CTRULIB = $(DEVKITPRO)/libctru
|
||||
endif
|
||||
@@ -84,12 +69,13 @@ LIBDIRS := -L. -L$(CTRULIB)/lib
|
||||
|
||||
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -marm -mfpu=vfp -mtp=soft
|
||||
|
||||
CFLAGS += -mword-relocations -fomit-frame-pointer $(ARCH)
|
||||
CFLAGS += -DARM11 -D_3DS
|
||||
CFLAGS += -mword-relocations \
|
||||
-fomit-frame-pointer -ffast-math \
|
||||
-Werror=implicit-function-declaration \
|
||||
$(ARCH)
|
||||
|
||||
ifeq ($(strip $(USE_CTRULIB_2)),1)
|
||||
CFLAGS += -D__3DS__
|
||||
endif
|
||||
#CFLAGS += -Wall
|
||||
CFLAGS += -DARM11 -D_3DS
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
@@ -97,22 +83,17 @@ else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(CONSOLE_LOG), 1)
|
||||
CFLAGS += -DCONSOLE_LOG
|
||||
endif
|
||||
|
||||
CFLAGS += -I. -Ilibretro-common/include
|
||||
CFLAGS += -I. -Ideps/7zip -Ideps/stb -Ilibretro-common/include -Ilibretro-common/include/compat/zlib
|
||||
|
||||
#CFLAGS += -DRARCH_INTERNAL
|
||||
CFLAGS += -DRARCH_CONSOLE -DIS_SALAMANDER
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
CFLAGS += -Werror=implicit-function-declaration
|
||||
|
||||
ASFLAGS := -g $(ARCH) -O3
|
||||
LDFLAGS += -specs=ctr/3dsx_custom.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
CFLAGS += -std=gnu99
|
||||
CFLAGS += -std=gnu99 -ffast-math
|
||||
|
||||
LIBS := -lctru -lm
|
||||
|
||||
@@ -172,13 +153,13 @@ else
|
||||
endif
|
||||
|
||||
%.o: %.vsh %.gsh
|
||||
$(DEVKITTOOLS)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITTOOLS)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.vsh
|
||||
$(DEVKITTOOLS)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITTOOLS)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
$(DEVKITARM)/bin/picasso $^ -o $*.shbin
|
||||
$(DEVKITARM)/bin/bin2s $*.shbin | $(PREFIX)as -o $@
|
||||
rm $*.shbin
|
||||
|
||||
%.o: %.cpp
|
||||
@@ -199,7 +180,7 @@ endif
|
||||
%.vsh:
|
||||
|
||||
$(TARGET).smdh: $(APP_ICON)
|
||||
$(DEVKITTOOLS)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
$(DEVKITARM)/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
@@ -207,7 +188,7 @@ ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
else
|
||||
rm -f $(TARGET).xml
|
||||
endif
|
||||
$(DEVKITTOOLS)/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
$(DEVKITARM)/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
|
||||
$(TARGET).elf: ctr/3dsx_custom_crt0.o
|
||||
$(LD) $(LDFLAGS) $(OBJ) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
+38
-69
@@ -1,56 +1,23 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Default toolchain directory
|
||||
TOOLCHAIN_DIR=/opt/gcw0-toolchain
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/mipsel-gcw0-linux-uclibc-g++
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/freetype-config
|
||||
GCW0_MK_SQUASH_FS ?= $(TOOLCHAIN_DIR)/usr/bin/mksquashfs
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
CC = /opt/gcw0-toolchain/usr/bin/mipsel-gcw0-linux-uclibc-gcc
|
||||
CXX = /opt/gcw0-toolchain/usr/bin/mipsel-gcw0-linux-uclibc-g++
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
DINGUX = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 1
|
||||
# this freezes when switching back from menu
|
||||
HAVE_ALSA = 0
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_BUILTINMBEDTLS = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_COMMAND = 1
|
||||
HAVE_CXX = 1
|
||||
HAVE_RMP3 = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 1
|
||||
HAVE_FREETYPE = 1
|
||||
@@ -59,7 +26,7 @@ HAVE_GETADDRINFO = 1
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 1
|
||||
HAVE_HID = 1
|
||||
HAVE_RMODTRACKER = 1
|
||||
HAVE_IBXM = 1
|
||||
HAVE_IMAGEVIEWER = 1
|
||||
HAVE_LANGEXTRA = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
@@ -68,7 +35,6 @@ HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 1
|
||||
HAVE_MMAP = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_IFINFO = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 1
|
||||
HAVE_OPENGL = 1
|
||||
HAVE_OPENGL1 = 0
|
||||
@@ -81,23 +47,21 @@ HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RWEBP = 1
|
||||
HAVE_RDDS = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 1
|
||||
HAVE_STB_FONT = 1
|
||||
HAVE_STB_IMAGE = 1
|
||||
HAVE_RVORBIS = 1
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STB_VORBIS = 1
|
||||
HAVE_STDIN_CMD = 1
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_TRANSLATE = 1
|
||||
HAVE_UDEV = 1
|
||||
HAVE_VIDEO_LAYOUT = 1
|
||||
HAVE_XMB = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_LIBSHAKE = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
@@ -105,31 +69,29 @@ OPK_NAME = retroarch.opk
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -march=mips32 -mtune=mips32r2 -mhard-float -fomit-frame-pointer
|
||||
DEF_FLAGS += -mplt -mno-shared
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -DDINGUX=1 -MMD
|
||||
DEF_FLAGS := -march=mips32 -mtune=mips32r2 -mhard-float -ffast-math -fomit-frame-pointer -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DDINGUX=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE
|
||||
LIBS := -ldl -lrt -lcrypto -lssl -ludev -pthread
|
||||
LIBS := -ldl -lz -lrt -lcrypto -lssl -ludev -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -flto -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
LDFLAGS := -flto
|
||||
INCLUDE_DIRS = -I/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include
|
||||
LIBRARY_DIRS = -L/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/lib
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1 -DHAVE_OPENDINGUX_FBDEV=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_AL=1
|
||||
DEFINES += -DHAVE_ONLINE_UPDATER=1
|
||||
DEFINES += -DHAVE_UPDATE_ASSETS=1
|
||||
DEFINES += -DHAVE_UDEV=1
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
SDL_DINGUX_CFLAGS := $(shell /opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl-config --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell /opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/sdl-config --libs)
|
||||
FREETYPE_CFLAGS := $(shell /opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/freetype-config --cflags)
|
||||
FREETYPE_LIBS := $(shell /opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/bin/freetype-config --libs)
|
||||
AL_LIBS := -lopenal
|
||||
OPENGLES_CFLAGS := -DMESA_EGL_NO_X11_HEADERS
|
||||
OPENGLES_LIBS := -lGLESv2 -lEGL
|
||||
@@ -159,8 +121,8 @@ RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
define DESKTOP_ENTRY
|
||||
[Desktop Entry]
|
||||
Name=RetroArch
|
||||
Comment=Frontend for emulators, game engines
|
||||
Name=retroarch
|
||||
Comment=Retroarch
|
||||
Exec=retroarch
|
||||
Terminal=false
|
||||
Type=Application
|
||||
@@ -179,27 +141,34 @@ SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
.FORCE:
|
||||
|
||||
$(OBJDIR)/git_version.o: git_version.c .FORCE
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(CC) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
@@ -211,7 +180,7 @@ opk: $(TARGET)
|
||||
echo "$$DESKTOP_ENTRY" > default.gcw0.desktop
|
||||
rm -f $(OPK_NAME)
|
||||
cp media/ico_src/icon32.png retroarch.png
|
||||
$(GCW0_MK_SQUASH_FS) retroarch default.gcw0.desktop retroarch.png $(OPK_NAME) -all-root -no-xattrs -noappend -no-exports
|
||||
mksquashfs retroarch default.gcw0.desktop retroarch.png $(OPK_NAME) -all-root -no-xattrs -noappend -no-exports
|
||||
rm -f default.gcw0.desktop retroarch.png
|
||||
|
||||
.PHONY: all clean opk
|
||||
|
||||
-257
@@ -1,257 +0,0 @@
|
||||
include version.all
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
.SUFFIXES:
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
TOPDIR ?= $(CURDIR)
|
||||
|
||||
|
||||
DEBUG ?= 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
GRIFFIN_BUILD = 0
|
||||
|
||||
OBJ :=
|
||||
|
||||
DEFINES := -DHAVE_DJGPP=1 -U__linux__ -U__linux -DRARCH_INTERNAL -DHAVE_RVORBIS
|
||||
CC := i586-pc-msdosdjgpp-gcc
|
||||
CXX := i586-pc-msdosdjgpp-g++
|
||||
TARGET := retrodos.exe
|
||||
|
||||
RARCH_CONSOLE = 0
|
||||
HAVE_SHADERPIPELINE = 1
|
||||
HAVE_SPIRV_CROSS = 0
|
||||
HAVE_PATCH = 1
|
||||
HAVE_LUA = 0
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_GFX_WIDGETS = 1
|
||||
HAVE_LANGEXTRA = 1
|
||||
HAVE_RMP3 = 1
|
||||
HAVE_TRANSLATE = 0
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_RTGA = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RWEBP = 1
|
||||
HAVE_RDDS = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_IMAGEVIEWER = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_STATIC_CORES = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_NETWORKING = 0
|
||||
HAVE_IFINFO = 0
|
||||
HAVE_NETPLAYDISCOVERY = 0
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_COMMAND := 1
|
||||
HAVE_STDIN_CMD := 1
|
||||
HAVE_CMD := 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_CHD = 1
|
||||
HAVE_RVORBIS = 1
|
||||
HAVE_RMODTRACKER = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
HAVE_XDELTA = 0 # disabled because <lzma.h> isn't available (or we haven't figured out how to install it)
|
||||
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
|
||||
|
||||
OBJ := \
|
||||
frontend/drivers/platform_dos.o \
|
||||
gfx/drivers/vga_gfx.o \
|
||||
input/drivers/dos_input.o \
|
||||
input/drivers_joypad/dos_joypad.o
|
||||
|
||||
include Makefile.common
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# TARGET is the name of the output
|
||||
# BUILD is the directory where object files & intermediate files will be placed
|
||||
# SOURCES is a list of directories containing source code
|
||||
# DATA is a list of directories containing data files
|
||||
# INCLUDES is a list of directories containing header files
|
||||
# EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm".
|
||||
# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional)
|
||||
#
|
||||
# NO_ICON: if set to anything, do not use icon.
|
||||
# NO_NACP: if set to anything, no .nacp file is generated.
|
||||
# APP_TITLE is the name of the app stored in the .nacp file (Optional)
|
||||
# APP_AUTHOR is the author of the app stored in the .nacp file (Optional)
|
||||
# APP_VERSION is the version of the app stored in the .nacp file (Optional)
|
||||
# APP_TITLEID is the titleID of the app stored in the .nacp file (Optional)
|
||||
# ICON is the filename of the icon (.jpg), relative to the project folder.
|
||||
# If not set, it attempts to use one of the following (in this order):
|
||||
# - <Project name>.jpg
|
||||
# - icon.jpg
|
||||
# - <libnx folder>/default_icon.jpg
|
||||
#---------------------------------------------------------------------------------
|
||||
BUILD := build
|
||||
SOURCES := $(CURDIR)/source
|
||||
DATA := data
|
||||
INCLUDES := include
|
||||
EXEFS_SRC := exefs_src
|
||||
|
||||
APP_TITLE := RetroArch
|
||||
APP_VERSION := $(RARCH_VERSION)
|
||||
APP_AUTHOR := libretro Team
|
||||
APP_ICON := pkg/libnx/retroarch.jpg
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
ARCH :=
|
||||
|
||||
CFLAGS := -g -Wall -O3 -fcommon -ffunction-sections \
|
||||
$(ARCH) $(DEFINES) $(INCLUDE_DIRS)
|
||||
|
||||
CFLAGS += $(INCLUDE)
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(HAVE_STATIC_DUMMY)),1)
|
||||
CFLAGS += -DHAVE_STATIC_DUMMY=1
|
||||
endif
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS = $(ARCH) -Wl,--allow-multiple-definition -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
# add things from Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
|
||||
LIBS := -lstdc++ -lm
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# no real need to edit anything past this point unless you need to add additional
|
||||
# rules for different file extensions
|
||||
#---------------------------------------------------------------------------------
|
||||
ifneq ($(BUILD),$(notdir $(CURDIR)))
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
export OUTPUT := $(TARGET)
|
||||
export TOPDIR := $(CURDIR)
|
||||
|
||||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
||||
|
||||
export DEPSDIR := $(CURDIR)/
|
||||
|
||||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
|
||||
|
||||
export OFILES := $(OBJ)
|
||||
|
||||
ifeq ($(strip $(HAVE_STATIC_DUMMY)),)
|
||||
OFILES += libretro_libnx.a
|
||||
endif
|
||||
|
||||
export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES)))
|
||||
|
||||
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
||||
-I$(CURDIR)/$(BUILD)
|
||||
|
||||
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
|
||||
|
||||
export BUILD_EXEFS_SRC := $(TOPDIR)/$(EXEFS_SRC)
|
||||
|
||||
ifneq ($(APP_TITLEID),)
|
||||
export NACPFLAGS += --titleid=$(APP_TITLEID)
|
||||
endif
|
||||
|
||||
ifneq ($(ROMFS),)
|
||||
export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS)
|
||||
endif
|
||||
|
||||
LIB_CORE :=
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
LIB_CORE += -lretro_dos
|
||||
endif
|
||||
|
||||
ifneq ($(V),1)
|
||||
Q := @
|
||||
endif
|
||||
|
||||
DEPENDS_TMP := $(OFILES:.o=.d)
|
||||
DEPENDS := $(filter-out libretro_libnx.a,$(DEPENDS_TMP))
|
||||
|
||||
.PHONY: clean all
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# main targets
|
||||
#---------------------------------------------------------------------------------
|
||||
all: $(OUTPUT)
|
||||
|
||||
define INFO
|
||||
CC: $(CC)
|
||||
CFLAGS: $(CFLAGS)
|
||||
CXX: $(CXX)
|
||||
DEPENDS: $(DEPENDS)
|
||||
LDFLAGS: $(LDFLAGS)
|
||||
LIBDIRS: $(LIBDIRS)
|
||||
LIBS: $(LIBS)
|
||||
LIB_CORE: $(LIB_CORE)
|
||||
OBJ: $(OBJ)
|
||||
OUTPUT: $(OUTPUT)
|
||||
PLATEXTRA: $(PLATEXTRA)
|
||||
endef
|
||||
export INFO
|
||||
|
||||
info:
|
||||
ifneq ($(V),1)
|
||||
@echo "$$INFO"
|
||||
endif
|
||||
|
||||
$(OUTPUT): $(OBJ)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(PLATEXTRA) -L. $(LIB_CORE) $(LIBS)
|
||||
|
||||
%.o: %.c
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
|
||||
|
||||
%.o: %.cpp
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) -c -o $@ $(CFLAGS) $<
|
||||
|
||||
clean:
|
||||
@$(if $(Q), $(shell echo echo RM),)
|
||||
$(Q)rm -f $(DEPENDS) $(OBJ) $(OUTPUT)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# you need a rule like this for each extension you use as binary data
|
||||
#---------------------------------------------------------------------------------
|
||||
%.bin.o %_bin.h : %.bin
|
||||
#---------------------------------------------------------------------------------
|
||||
@echo $(notdir $<)
|
||||
@$(bin2o)
|
||||
|
||||
#---------------------------------------------------------------------------------------
|
||||
endif
|
||||
#---------------------------------------------------------------------------------------
|
||||
@@ -1,271 +0,0 @@
|
||||
include version.all
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
.SUFFIXES:
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
TOPDIR ?= $(CURDIR)
|
||||
|
||||
|
||||
DEBUG ?= 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
GRIFFIN_BUILD = 0
|
||||
|
||||
OBJ :=
|
||||
|
||||
DEFINES := -DHAVE_DJGPP=1 -U__linux__ -U__linux -DRARCH_INTERNAL -DHAVE_RVORBIS -DIS_SALAMANDER
|
||||
CC := i586-pc-msdosdjgpp-gcc
|
||||
CXX := i586-pc-msdosdjgpp-g++
|
||||
TARGET := retrodos.exe
|
||||
|
||||
RARCH_CONSOLE = 0
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_SPIRV_CROSS = 0
|
||||
HAVE_PATCH = 1
|
||||
HAVE_LUA = 0
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_LANGEXTRA = 1
|
||||
HAVE_RMP3 = 1
|
||||
HAVE_TRANSLATE = 0
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_RTGA = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_IMAGEVIEWER = 1
|
||||
HAVE_LIBRETRODB = 0
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_STATIC_CORES = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_NETWORKING = 0
|
||||
HAVE_IFINFO = 0
|
||||
HAVE_NETPLAYDISCOVERY = 0
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_COMMAND := 1
|
||||
HAVE_STDIN_CMD := 1
|
||||
HAVE_CMD := 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_CHD = 1
|
||||
HAVE_RVORBIS = 1
|
||||
HAVE_RMODTRACKER = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
HAVE_XDELTA = 0 # disabled because <lzma.h> isn't available (or we haven't figured out how to install it)
|
||||
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
|
||||
|
||||
OBJ := frontend/frontend_salamander.o \
|
||||
frontend/frontend_driver.o \
|
||||
frontend/drivers/platform_dos.o \
|
||||
libretro-common/file/file_path.o \
|
||||
libretro-common/file/file_path_io.o \
|
||||
libretro-common/string/stdstring.o \
|
||||
libretro-common/lists/string_list.o \
|
||||
libretro-common/lists/dir_list.o \
|
||||
libretro-common/file/retro_dirent.o \
|
||||
libretro-common/encodings/encoding_utf.o \
|
||||
libretro-common/compat/fopen_utf8.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strldup.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/file/config_file_io.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/time/rtime.o \
|
||||
verbosity.o
|
||||
|
||||
INCLUDE_DIRS = -Ilibretro-common/include
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# TARGET is the name of the output
|
||||
# BUILD is the directory where object files & intermediate files will be placed
|
||||
# SOURCES is a list of directories containing source code
|
||||
# DATA is a list of directories containing data files
|
||||
# INCLUDES is a list of directories containing header files
|
||||
# EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm".
|
||||
# ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional)
|
||||
#
|
||||
# NO_ICON: if set to anything, do not use icon.
|
||||
# NO_NACP: if set to anything, no .nacp file is generated.
|
||||
# APP_TITLE is the name of the app stored in the .nacp file (Optional)
|
||||
# APP_AUTHOR is the author of the app stored in the .nacp file (Optional)
|
||||
# APP_VERSION is the version of the app stored in the .nacp file (Optional)
|
||||
# APP_TITLEID is the titleID of the app stored in the .nacp file (Optional)
|
||||
# ICON is the filename of the icon (.jpg), relative to the project folder.
|
||||
# If not set, it attempts to use one of the following (in this order):
|
||||
# - <Project name>.jpg
|
||||
# - icon.jpg
|
||||
# - <libnx folder>/default_icon.jpg
|
||||
#---------------------------------------------------------------------------------
|
||||
BUILD := build
|
||||
SOURCES := $(CURDIR)/source
|
||||
DATA := data
|
||||
INCLUDES := include
|
||||
EXEFS_SRC := exefs_src
|
||||
|
||||
APP_TITLE := RetroArch
|
||||
APP_VERSION := $(RARCH_VERSION)
|
||||
APP_AUTHOR := libretro Team
|
||||
APP_ICON := pkg/libnx/retroarch.jpg
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
ARCH :=
|
||||
|
||||
CFLAGS := -g -Wall -O3 -fcommon -ffunction-sections \
|
||||
$(ARCH) $(DEFINES) $(INCLUDE_DIRS)
|
||||
|
||||
CFLAGS += $(INCLUDE)
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(HAVE_STATIC_DUMMY)),1)
|
||||
CFLAGS += -DHAVE_STATIC_DUMMY=1
|
||||
endif
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS = $(ARCH) -Wl,--allow-multiple-definition -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
# add things from Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
|
||||
LIBS := -lstdc++ -lm
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# no real need to edit anything past this point unless you need to add additional
|
||||
# rules for different file extensions
|
||||
#---------------------------------------------------------------------------------
|
||||
ifneq ($(BUILD),$(notdir $(CURDIR)))
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
export OUTPUT := $(TARGET)
|
||||
export TOPDIR := $(CURDIR)
|
||||
|
||||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
||||
|
||||
export DEPSDIR := $(CURDIR)/
|
||||
|
||||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
|
||||
|
||||
export OFILES := $(OBJ)
|
||||
|
||||
ifeq ($(strip $(HAVE_STATIC_DUMMY)),)
|
||||
OFILES += libretro_libnx.a
|
||||
endif
|
||||
|
||||
export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES)))
|
||||
|
||||
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
||||
-I$(CURDIR)/$(BUILD)
|
||||
|
||||
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
|
||||
|
||||
export BUILD_EXEFS_SRC := $(TOPDIR)/$(EXEFS_SRC)
|
||||
|
||||
ifneq ($(APP_TITLEID),)
|
||||
export NACPFLAGS += --titleid=$(APP_TITLEID)
|
||||
endif
|
||||
|
||||
ifneq ($(ROMFS),)
|
||||
export NROFLAGS += --romfsdir=$(CURDIR)/$(ROMFS)
|
||||
endif
|
||||
|
||||
LIB_CORE :=
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
LIB_CORE += -lretro_dos
|
||||
endif
|
||||
|
||||
ifneq ($(V),1)
|
||||
Q := @
|
||||
endif
|
||||
|
||||
DEPENDS_TMP := $(OFILES:.o=.d)
|
||||
DEPENDS := $(filter-out libretro_libnx.a,$(DEPENDS_TMP))
|
||||
|
||||
.PHONY: clean all
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# main targets
|
||||
#---------------------------------------------------------------------------------
|
||||
all: $(OUTPUT)
|
||||
|
||||
define INFO
|
||||
CC: $(CC)
|
||||
CFLAGS: $(CFLAGS)
|
||||
CXX: $(CXX)
|
||||
DEPENDS: $(DEPENDS)
|
||||
LDFLAGS: $(LDFLAGS)
|
||||
LIBDIRS: $(LIBDIRS)
|
||||
LIBS: $(LIBS)
|
||||
LIB_CORE: $(LIB_CORE)
|
||||
OBJ: $(OBJ)
|
||||
OUTPUT: $(OUTPUT)
|
||||
PLATEXTRA: $(PLATEXTRA)
|
||||
endef
|
||||
export INFO
|
||||
|
||||
info:
|
||||
ifneq ($(V),1)
|
||||
@echo "$$INFO"
|
||||
endif
|
||||
|
||||
$(OUTPUT): $(OBJ)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) -o $@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(PLATEXTRA) -L. $(LIB_CORE) $(LIBS)
|
||||
|
||||
%.o: %.c
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
|
||||
|
||||
%.o: %.cpp
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) -c -o $@ $(CFLAGS) $<
|
||||
|
||||
clean:
|
||||
@$(if $(Q), $(shell echo echo RM),)
|
||||
$(Q)rm -f $(DEPENDS) $(OBJ) $(OUTPUT)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# you need a rule like this for each extension you use as binary data
|
||||
#---------------------------------------------------------------------------------
|
||||
%.bin.o %_bin.h : %.bin
|
||||
#---------------------------------------------------------------------------------
|
||||
@echo $(notdir $<)
|
||||
@$(bin2o)
|
||||
|
||||
#---------------------------------------------------------------------------------------
|
||||
endif
|
||||
#---------------------------------------------------------------------------------------
|
||||
+42
-300
@@ -1,181 +1,56 @@
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
ifeq ($(TARGET),)
|
||||
ifeq ($(LIBRETRO),)
|
||||
TARGET := retroarch.js
|
||||
LIBRETRO = dummy
|
||||
else
|
||||
TARGET := $(LIBRETRO)_libretro.js
|
||||
endif
|
||||
endif
|
||||
TARGET_BASE := $(subst .js,,$(TARGET))
|
||||
|
||||
EOPT = USE_ZLIB=1 # Emscripten specific options
|
||||
EOPTS = $(addprefix -s $(EMPTY), $(EOPT)) # Add '-s ' to each option
|
||||
|
||||
PTHREAD = 0
|
||||
OS = Emscripten
|
||||
OBJ :=
|
||||
DEFINES := -DRARCH_INTERNAL -DHAVE_MAIN
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORE_INFO
|
||||
DEFINES := -DRARCH_INTERNAL -DHAVE_MAIN -s USE_PTHREADS=$(PTHREAD)
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
|
||||
HAVE_STATESTREAM ?= 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_OVERLAY = 1
|
||||
HAVE_NETWORKING ?= 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_COMPRESSION = 1
|
||||
HAVE_UPDATE_ASSETS = 1
|
||||
HAVE_ONLINE_UPDATER = 1
|
||||
HAVE_GLSL = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND ?= 1
|
||||
HAVE_RUNAHEAD ?= 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_RVORBIS = 1
|
||||
HAVE_CC_RESAMPLER ?= 1
|
||||
HAVE_EGL ?= 0
|
||||
HAVE_VIDEO_LAYOUT = 0
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_EGL = 1
|
||||
HAVE_OPENGLES = 1
|
||||
HAVE_RJPEG = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RWEBP = 1
|
||||
HAVE_RDDS = 1
|
||||
HAVE_RJPEG = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_EMSCRIPTEN = 1
|
||||
HAVE_MENU ?= 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_GFX_WIDGETS = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_SDL = 0
|
||||
HAVE_SDL2 = 0
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_SHADERPIPELINE = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_STB_FONT = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_COMMAND = 1
|
||||
HAVE_STDIN_CMD ?= 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_RMODTRACKER = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_BSV_MOVIE ?= 1
|
||||
HAVE_CHD ?= 0
|
||||
HAVE_NETPLAYDISCOVERY ?= 0
|
||||
|
||||
# enables pthreads, requires special headers on the web server:
|
||||
# see https://web.dev/articles/coop-coep
|
||||
HAVE_THREADS ?= 0
|
||||
MEMORY = 134217728
|
||||
|
||||
# requires HAVE_THREADS
|
||||
HAVE_AUDIOWORKLET ?= 0
|
||||
|
||||
# doesn't work on PROXY_TO_PTHREAD
|
||||
HAVE_RWEBAUDIO ?= 1
|
||||
|
||||
# requires ASYNC or PROXY_TO_PTHREAD. Prefer another driver.
|
||||
HAVE_AL ?= 0
|
||||
|
||||
# whether the browser thread is allowed to block to wait for audio to play, not CPU usage-friendly!
|
||||
# currently this variable is only used by rwebaudio and audioworklet; openal will never busywait.
|
||||
ALLOW_AUDIO_BUSYWAIT ?= 0
|
||||
|
||||
# asyncify: enable fibers and sleeping on the browser thread,
|
||||
# this has a noticeable impact on compile time, output wasm size, and speed.
|
||||
# see https://emscripten.org/docs/porting/asyncify.html for more info
|
||||
ASYNC ?= 0
|
||||
|
||||
# minimal asyncify: better performance than full asyncify,
|
||||
# but sleeping on the browser thread is only possible in some places.
|
||||
MIN_ASYNC ?= 0
|
||||
|
||||
# JSPI: experimental asyncify alternative, see https://webassembly.org/features/
|
||||
# currently (emscripten 4.0.15) this requires a patched emscripten toolchain.
|
||||
JSPI ?= 0
|
||||
|
||||
# runs RetroArch on a pthread instead of the browser thread; implies HAVE_THREADS
|
||||
PROXY_TO_PTHREAD ?= 0
|
||||
|
||||
# recommended FS when using HAVE_THREADS
|
||||
HAVE_WASMFS ?= 0
|
||||
|
||||
# enables OPFS (origin private file system) and FETCHFS, requires PROXY_TO_PTHREAD or JSPI
|
||||
HAVE_EXTRA_WASMFS ?= 0
|
||||
|
||||
# use the closure compiler to further minify output JS
|
||||
CLOSURE_COMPILER ?= 0
|
||||
|
||||
# enable javascript filesystem tracking, incompatible with HAVE_WASMFS
|
||||
FS_DEBUG ?= 0
|
||||
|
||||
# help diagnose GL problems (can cause issues in normal operation)
|
||||
GL_DEBUG ?= 0
|
||||
|
||||
# enable runtime assertions (always enabled in debug builds)
|
||||
# please use this when testing new emscripten-specific features!
|
||||
ASSERTIONS ?= 0
|
||||
|
||||
# enable GLES 3.0 (WebGL 2).
|
||||
# if left disabled, GLES 2.0 (WebGL 1) will be used.
|
||||
HAVE_OPENGLES3 ?= 0
|
||||
|
||||
# does nothing on its own, but automatically selected by some other options
|
||||
WASM_WORKERS = 0
|
||||
|
||||
LTO ?= 0
|
||||
PTHREAD_POOL_SIZE ?= 4
|
||||
|
||||
ASYNCIFY_ADD ?= dynCall_*,emscripten_mainloop
|
||||
ASYNCIFY_REMOVE ?= threaded_worker
|
||||
|
||||
STACK_SIZE ?= 4194304
|
||||
INITIAL_HEAP ?= 134217728
|
||||
|
||||
# 4194304 ----- 4 MiB (Stack: recommended)
|
||||
# 8388608 ----- 8 MiB
|
||||
# 16777216 ---- 16 MiB
|
||||
# 33554432 ---- 32 MiB
|
||||
# 67108864 ---- 64 MiB
|
||||
# 134217728 --- 128 MiB (Heap: recommended) (Stack: recommended for some cores [mupen64plus_next])
|
||||
# 268435456 --- 256 MiB (Heap: recommended for some cores [mupen64plus_next])
|
||||
# 536870912 --- 512 MiB (Heap: needed for some cores [mednafen_psx(_hw)])
|
||||
# 1073741824 -- 1 GiB
|
||||
# 1610612736 -- 1.5 GiB
|
||||
# 2147483648 -- 2 GiB
|
||||
PRECISE_F32 = 1
|
||||
|
||||
OBJDIR := obj-emscripten
|
||||
|
||||
EXPORTED_FUNCTIONS = _main,_malloc,_free,_cmd_savefiles,_cmd_save_state,_cmd_load_state,_cmd_undo_save_state,_cmd_undo_load_state,_cmd_toggle_fullscreen,_cmd_take_screenshot,\
|
||||
_cmd_toggle_menu,_cmd_reload_config,_cmd_toggle_grab_mouse,_cmd_toggle_game_focus,_cmd_reset,_cmd_toggle_pause,_cmd_pause,_cmd_unpause,\
|
||||
_cmd_set_volume,_cmd_set_shader,_cmd_cheat_set_code,_cmd_cheat_get_code,_cmd_cheat_toggle_index,_cmd_cheat_get_code_state,_cmd_cheat_realloc,\
|
||||
_cmd_cheat_get_size,_cmd_cheat_apply_cheats,EmscriptenSendCommand,EmscriptenReceiveCommandReply
|
||||
#if you compile with SDL2 flag add this Emscripten flag "-s USE_SDL=2" to LDFLAGS:
|
||||
|
||||
EXPORTS := callMain,FS,PATH,ERRNO_CODES,ENV,stringToNewUTF8,UTF8ToString,Browser,EmscriptenSendCommand,EmscriptenReceiveCommandReply
|
||||
|
||||
LIBS := -s USE_ZLIB=1
|
||||
CFLAGS := -s USE_ZLIB=1
|
||||
|
||||
ifeq ($(HAVE_EXTRA_WASMFS), 1)
|
||||
LIBS += -lfetchfs.js -lopfs.js
|
||||
DEFINES += -DHAVE_EXTRA_WASMFS
|
||||
override HAVE_WASMFS = 1
|
||||
ifeq ($(PROXY_TO_PTHREAD), 0)
|
||||
# note: currently HAVE_EXTRA_WASMFS+JSPI requires ASSERTIONS to be turned off
|
||||
ifeq ($(JSPI), 0)
|
||||
$(error ERROR: HAVE_EXTRA_WASMFS requires PROXY_TO_PTHREAD or JSPI)
|
||||
endif
|
||||
endif
|
||||
LIBS := -s USE_ZLIB=1
|
||||
LDFLAGS := -L. --no-heap-copy -s $(LIBS) -s TOTAL_MEMORY=$(MEMORY) -s NO_EXIT_RUNTIME=0 -s FULL_ES2=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['callMain']" \
|
||||
-s ALLOW_MEMORY_GROWTH=1 -s EXPORTED_FUNCTIONS="['_main', '_malloc', '_cmd_savefiles', '_cmd_save_state', '_cmd_load_state', '_cmd_take_screenshot']" \
|
||||
--js-library emscripten/library_rwebaudio.js \
|
||||
--js-library emscripten/library_rwebcam.js \
|
||||
--js-library emscripten/library_errno_codes.js
|
||||
ifneq ($(PTHREAD), 0)
|
||||
LDFLAGS += -s USE_PTHREADS=$(PTHREAD) -s PTHREAD_POOL_SIZE=2
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WASMFS), 1)
|
||||
LIBS += -s WASMFS -s FORCE_FILESYSTEM=1
|
||||
endif
|
||||
|
||||
# note: real PROXY_TO_PTHREAD is not used here; we do the pthread management ourselves
|
||||
ifeq ($(PROXY_TO_PTHREAD), 1)
|
||||
LIBS += -s OFFSCREENCANVAS_SUPPORT
|
||||
DEFINES += -DPROXY_TO_PTHREAD -DEMSCRIPTEN_STACK_SIZE=$(STACK_SIZE)
|
||||
override HAVE_THREADS = 1
|
||||
override WASM_WORKERS = 1
|
||||
# use the default stack size for the browser thread; the RetroArch thread will be created with the specified stack size
|
||||
override STACK_SIZE = 4194304
|
||||
else ifeq ($(HAVE_AL), 1)
|
||||
override ASYNC = 1
|
||||
override MIN_ASYNC = 0
|
||||
ifeq ($(ASYNC), 1)
|
||||
LDFLAGS += -s ASYNCIFY=$(ASYNC)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SDL2), 1)
|
||||
@@ -183,184 +58,51 @@ ifeq ($(HAVE_SDL2), 1)
|
||||
DEFINES += -DHAVE_SDL2
|
||||
endif
|
||||
|
||||
LDFLAGS := -L. --no-heap-copy -s STACK_SIZE=$(STACK_SIZE) -s INITIAL_MEMORY=$(INITIAL_HEAP) \
|
||||
-s EXPORTED_RUNTIME_METHODS=$(EXPORTS) -s EXIT_RUNTIME=1 \
|
||||
-s ALLOW_MEMORY_GROWTH=1 -s EXPORTED_FUNCTIONS="$(EXPORTED_FUNCTIONS)" \
|
||||
-s MODULARIZE=1 -s EXPORT_ES6=1 -s EXPORT_NAME="libretro_$(subst -,_,$(LIBRETRO))" \
|
||||
-s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=0 \
|
||||
-s ENVIRONMENT=web,worker -s WASM_BIGINT=1 \
|
||||
-s FETCH=1 \
|
||||
--extern-pre-js emscripten/extern_pre.js \
|
||||
--js-library emscripten/library_rwebcam.js \
|
||||
--js-library emscripten/library_platform_emscripten.js
|
||||
|
||||
ifeq ($(HAVE_OPENGLES), 1)
|
||||
ifeq ($(HAVE_OPENGLES3), 1)
|
||||
LDFLAGS += -s FULL_ES3=1 -s MIN_WEBGL_VERSION=2 -s MAX_WEBGL_VERSION=2
|
||||
else
|
||||
LDFLAGS += -s FULL_ES2=1 -s MIN_WEBGL_VERSION=1 -s MAX_WEBGL_VERSION=2
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(GL_DEBUG), 1)
|
||||
LDFLAGS += -s GL_ASSERTIONS=1 -s GL_DEBUG=1
|
||||
endif
|
||||
|
||||
ifeq ($(FS_DEBUG), 1)
|
||||
LDFLAGS += -s FS_DEBUG=1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RWEBAUDIO), 1)
|
||||
LDFLAGS += --js-library emscripten/library_rwebaudio.js
|
||||
DEFINES += -DHAVE_RWEBAUDIO
|
||||
ifeq ($(PROXY_TO_PTHREAD), 1)
|
||||
$(error ERROR: RWEBAUDIO is incompatible with PROXY_TO_PTHREAD)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_AUDIOWORKLET), 1)
|
||||
LDFLAGS += -s AUDIO_WORKLET=1
|
||||
DEFINES += -DHAVE_AUDIOWORKLET
|
||||
override WASM_WORKERS = 1
|
||||
ifeq ($(HAVE_THREADS), 0)
|
||||
$(error ERROR: AUDIOWORKLET requires HAVE_THREADS)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_AL), 1)
|
||||
LDFLAGS += -lopenal
|
||||
DEFINES += -DHAVE_AL
|
||||
endif
|
||||
|
||||
ifeq ($(PROXY_TO_PTHREAD), 1)
|
||||
else ifeq ($(JSPI), 1)
|
||||
else ifeq ($(ASYNC), 1)
|
||||
else
|
||||
DEFINES += -DEMSCRIPTEN_AUDIO_EXTERNAL_BLOCK
|
||||
ifeq ($(MIN_ASYNC), 1)
|
||||
DEFINES += -DEMSCRIPTEN_AUDIO_ASYNC_BLOCK
|
||||
else
|
||||
DEFINES += -DEMSCRIPTEN_AUDIO_FAKE_BLOCK
|
||||
endif
|
||||
ifneq ($(ALLOW_AUDIO_BUSYWAIT), 1)
|
||||
DEFINES += -DEMSCRIPTEN_AUDIO_EXTERNAL_WRITE_BLOCK
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(ALLOW_AUDIO_BUSYWAIT), 1)
|
||||
DEFINES += -DEMSCRIPTEN_AUDIO_BUSYWAIT
|
||||
endif
|
||||
|
||||
# explanation of some of these defines:
|
||||
# EMSCRIPTEN_AUDIO_EXTERNAL_BLOCK: audio blocking occurs in the main loop instead of in the audio driver functions.
|
||||
# EMSCRIPTEN_AUDIO_EXTERNAL_WRITE_BLOCK: along with above, enables external blocking in the write function.
|
||||
# EMSCRIPTEN_AUDIO_BUSYWAIT: write function will busywait. init function may still use an external block.
|
||||
# EMSCRIPTEN_AUDIO_ASYNC_BLOCK: external block uses emscripten_sleep (requires MIN_ASYNC).
|
||||
# EMSCRIPTEN_AUDIO_FAKE_BLOCK: external block uses main loop timing (doesn't require asyncify).
|
||||
# when building with either PROXY_TO_PTHREAD or ASYNC (full asyncify), none of the above are required.
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
LDFLAGS += -pthread -s PTHREAD_POOL_SIZE=$(PTHREAD_POOL_SIZE)
|
||||
CFLAGS += -pthread -s SHARED_MEMORY
|
||||
endif
|
||||
|
||||
ifeq ($(WASM_WORKERS), 1)
|
||||
LDFLAGS += -s WASM_WORKERS=1
|
||||
endif
|
||||
|
||||
ifeq ($(JSPI), 1)
|
||||
CFLAGS += -fwasm-exceptions
|
||||
DEFINES += -DEMSCRIPTEN_ASYNCIFY -DEMSCRIPTEN_FULL_ASYNCIFY -DEMSCRIPTEN_JSPI
|
||||
LDFLAGS += -s JSPI=1 -fwasm-exceptions
|
||||
else ifeq ($(MIN_ASYNC), 1)
|
||||
DEFINES += -DEMSCRIPTEN_ASYNCIFY -DEMSCRIPTEN_MIN_ASYNCIFY
|
||||
LDFLAGS += -s ASYNCIFY=1 -s ASYNCIFY_STACK_SIZE=8192 -s ASYNCIFY_IGNORE_INDIRECT=1 -s ASYNCIFY_ADD='$(ASYNCIFY_ADD)' -s ASYNCIFY_REMOVE='$(ASYNCIFY_REMOVE)'
|
||||
ifeq ($(DEBUG), 1)
|
||||
LDFLAGS += -s ASYNCIFY_ADVISE #-s ASYNCIFY_DEBUG=1
|
||||
endif
|
||||
else ifeq ($(ASYNC), 1)
|
||||
DEFINES += -DEMSCRIPTEN_ASYNCIFY -DEMSCRIPTEN_FULL_ASYNCIFY
|
||||
LDFLAGS += -s ASYNCIFY=1 -s ASYNCIFY_STACK_SIZE=8192
|
||||
ifeq ($(DEBUG), 1)
|
||||
#LDFLAGS += -s ASYNCIFY_DEBUG=1 # broken?
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(CLOSURE_COMPILER), 1)
|
||||
LDFLAGS += --closure 1 --closure-args=--externs=emscripten/closure_externs.js --post-js emscripten/closure_post.js
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS) -Ideps
|
||||
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS) -D__STDC_CONSTANT_MACROS
|
||||
|
||||
libretro =
|
||||
libretro_new =
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
libretro = libretro_emscripten.bc
|
||||
libretro_new = libretro_emscripten.a
|
||||
endif
|
||||
CFLAGS += $(DEF_FLAGS) -Ideps -Ideps/stb
|
||||
libretro = libretro_emscripten.bc
|
||||
|
||||
ifneq ($(V), 1)
|
||||
Q := @
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
LDFLAGS += -O0 -g -gsource-map -s STACK_OVERFLOW_CHECK=2
|
||||
# -O0 in cflags gives "too many locals" errors
|
||||
CFLAGS += -O1 -g -gsource-map
|
||||
override ASSERTIONS = 1
|
||||
# "WASM_WORKERS is not currently compatible with `-fsanitize` tools"
|
||||
ifeq ($(WASM_WORKERS), 0)
|
||||
CFLAGS += -fsanitize=undefined
|
||||
LDFLAGS += -fsanitize=undefined
|
||||
endif
|
||||
LDFLAGS += -O0 -g
|
||||
CFLAGS += -O0 -g
|
||||
else
|
||||
LDFLAGS += -O3
|
||||
LDFLAGS += -O3 -s WASM=1
|
||||
# WARNING: some optimizations can break some cores (ex: LTO breaks tyrquake)
|
||||
LDFLAGS += -s PRECISE_F32=$(PRECISE_F32)
|
||||
ifeq ($(LTO), 1)
|
||||
LDFLAGS += -flto
|
||||
LDFLAGS += --llvm-lto 3
|
||||
endif
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifneq ($(ASSERTIONS), 0)
|
||||
LDFLAGS += -s ASSERTIONS=$(ASSERTIONS)
|
||||
endif
|
||||
|
||||
CFLAGS += -Wall -I. -Ilibretro-common/include -std=gnu99
|
||||
CFLAGS += -Wall -I. -Ilibretro-common/include -std=gnu99 $(LIBS) \
|
||||
-s EXPORTED_FUNCTIONS="['_main', '_malloc', '_cmd_savefiles', '_cmd_save_state', '_cmd_take_screenshot']"
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(libretro_new): ;
|
||||
|
||||
mv_libretro:
|
||||
$(Q)mv -f $(libretro) $(libretro_new) || true
|
||||
|
||||
$(TARGET): $(RARCH_OBJ) $(libretro_new) mv_libretro
|
||||
@$(if $(Q), $(shell echo echo "LD $@ \<obj\> $(libretro_new) $(LIBS) $(LDFLAGS)"),)
|
||||
$(Q)$(LD) -o $@ $(RARCH_OBJ) $(libretro_new) $(LIBS) $(LDFLAGS)
|
||||
$(TARGET): $(RARCH_OBJ) $(libretro)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LD) -o $@ $(RARCH_OBJ) $(libretro) $(LIBS) $(LDFLAGS)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
$(Q)$(CC) $(CFLAGS) $(DEFINES) $(EOPTS) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CXXFLAGS) $(DEFINES) -c -o $@ $<
|
||||
$(Q)$(CXX) $(CXXFLAGS) $(DEFINES) $(EOPTS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR)
|
||||
rm -f $(TARGET)
|
||||
|
||||
.PHONY: all clean mv_libretro
|
||||
.PHONY: all clean
|
||||
+113
-297
@@ -66,6 +66,7 @@ SHADER_CG_DIR := media/shaders_cg
|
||||
OVERLAY_DIR := media/overlays
|
||||
SHADER_GLSL_DIR := media/shaders_glsl
|
||||
|
||||
PYTHON2 := python2$(EXE_EXT)
|
||||
PYTHON3 := python3$(EXE_EXT)
|
||||
GIT := git$(EXE_EXT)
|
||||
|
||||
@@ -115,27 +116,19 @@ else ifeq ($(platform), ps3-cobra)
|
||||
|
||||
# NGC/Wii - libogc
|
||||
else ifeq ($(libogc_platform), 1)
|
||||
EXTERNAL_LIBOGC ?= 0
|
||||
HAVE_OGG_OGC ?= 0
|
||||
GX_PTHREAD_LEGACY ?= 1
|
||||
EXTERNAL_LIBOGC=0
|
||||
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
||||
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT)
|
||||
ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
||||
# Check whether ELF2DOL executable exists
|
||||
# (path has changed in more recent toolchains)
|
||||
ifeq ("$(wildcard $(ELF2DOL))","")
|
||||
ELF2DOL = $(DEVKITPRO)/tools/bin/elf2dol$(EXE_EXT)
|
||||
endif
|
||||
EXT_TARGET := $(TARGET_NAME)_$(platform).dol
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)_$(platform).elf
|
||||
|
||||
INCLUDE += -I.
|
||||
INCLUDE += -I. -I$(DEVKITPRO)/libogc/include -Iwii/libogc/include
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
CFLAGS += -DEXTERNAL_LIBOGC
|
||||
CXXFLAGS += -DEXTERNAL_LIBOGC
|
||||
INCLUDE += -I$(DEVKITPRO)/libogc/include
|
||||
|
||||
ifeq ($(platform), ngc)
|
||||
LIBDIRS += -L$(DEVKITPRO)/libogc/lib/cube
|
||||
@@ -146,7 +139,6 @@ else ifeq ($(libogc_platform), 1)
|
||||
else
|
||||
CFLAGS += -DINTERNAL_LIBOGC
|
||||
CXXFLAGS += -DINTERNAL_LIBOGC
|
||||
INCLUDE += -Iwii/libogc/include
|
||||
|
||||
ifeq ($(platform), ngc)
|
||||
LIBDIRS += -Lwii/libogc/libs/cube
|
||||
@@ -156,11 +148,6 @@ else ifeq ($(libogc_platform), 1)
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(GX_PTHREAD_LEGACY), 1)
|
||||
CFLAGS += -DGX_PTHREAD_LEGACY
|
||||
CXXFLAGS += -DGX_PTHREAD_LEGACY
|
||||
endif
|
||||
|
||||
ifeq ($(platform), ngc)
|
||||
MACHDEP := -DHW_DOL -mogc
|
||||
else ifeq ($(platform), wii)
|
||||
@@ -168,7 +155,7 @@ else ifeq ($(libogc_platform), 1)
|
||||
endif
|
||||
|
||||
LIBDIRS += -L.
|
||||
MACHDEP += -DGEKKO -mcpu=750 -meabi -mhard-float
|
||||
MACHDEP += -DGEKKO -mcpu=750 -meabi -mhard-float -DMSB_FIRST
|
||||
|
||||
ifeq ($(platform), ngc)
|
||||
LDFLAGS += $(MACHDEP) -Wl,-Map,$(notdir $(EXT_INTER_TARGET)).map
|
||||
@@ -184,10 +171,6 @@ else ifeq ($(libogc_platform), 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OGG_OGC), 1)
|
||||
LIBS += -L$(DEVKITPRO)/portlibs/ppc/lib -lvorbisfile -lvorbis -logg
|
||||
endif
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
LIBS += -lfat
|
||||
endif
|
||||
@@ -208,31 +191,24 @@ else ifeq ($(libogc_platform), 1)
|
||||
|
||||
CFLAGS += -DGEKKO -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
|
||||
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RWEBP := 1
|
||||
HAVE_RDDS := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_RMODTRACKER := 1
|
||||
HAVE_IBXM := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(platform), wii)
|
||||
HAVE_AUDIOMIXER := 1
|
||||
#HAVE_LANGEXTRA := 1
|
||||
HAVE_WIIUSB_HID := 1
|
||||
HAVE_RARCH_EXEC := 1
|
||||
@@ -268,9 +244,7 @@ else ifeq ($(platform), xenon360)
|
||||
HAVE_THREADS := 1
|
||||
HAVE_GETOPT_LONG := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
# PSP
|
||||
else ifeq ($(platform), psp1)
|
||||
@@ -289,18 +263,13 @@ else ifeq ($(platform), psp1)
|
||||
|
||||
BUILD_PRX = 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RWEBP := 1
|
||||
HAVE_RDDS := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_KERNEL_PRX := 1
|
||||
#HAVE_LANGEXTRA := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
ifeq ($(BUILD_PRX), 1)
|
||||
LDFLAGS += $(addprefix -L,$(PSPSDK)/lib) -specs=$(PSPSDK)/lib/prxspecs -Wl,-q,-T$(PSPSDK)/lib/linkfile.prx $(LDFLAGS)
|
||||
@@ -314,19 +283,21 @@ else ifeq ($(platform), vita)
|
||||
EXT_TARGET := $(TARGET_NAME)_$(platform).velf
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)_$(platform).elf
|
||||
MACHDEP := -DVITA
|
||||
INCLUDE += -Ideps/libvita2d/include
|
||||
PLATCFLAGS := -mfloat-abi=hard -fsingle-precision-constant \
|
||||
-mword-relocations -fno-unwind-tables -fno-asynchronous-unwind-tables -ftree-vectorize -fno-optimize-sibling-calls
|
||||
LIBS += -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub\
|
||||
-lSceSysmodule_stub -lSceCtrl_stub -lSceHid_stub -lSceTouch_stub -lSceAudio_stub -lSceFiber_stub\
|
||||
-lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub \
|
||||
-lSceMotion_stub -lSceAppMgr_stub -lm -lc
|
||||
-lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub \
|
||||
-lSceMotion_stub -lSceAppMgr_stub -lpng -lm -lc
|
||||
|
||||
PLATOBJS += gfx/drivers/vita_shaders/color_v_gxp.o \
|
||||
gfx/drivers/vita_shaders/color_f_gxp.o \
|
||||
gfx/drivers/vita_shaders/texture_v_gxp.o \
|
||||
gfx/drivers/vita_shaders/texture_f_gxp.o \
|
||||
gfx/drivers/vita_shaders/texture_tint_v_gxp.o \
|
||||
gfx/drivers/vita_shaders/texture_tint_f_gxp.o
|
||||
PLATOBJS += $(DEPS_DIR)/libvita2d/shader/clear_v_gxp.o \
|
||||
$(DEPS_DIR)/libvita2d/shader/clear_f_gxp.o \
|
||||
$(DEPS_DIR)/libvita2d/shader/color_v_gxp.o \
|
||||
$(DEPS_DIR)/libvita2d/shader/color_f_gxp.o \
|
||||
$(DEPS_DIR)/libvita2d/shader/texture_v_gxp.o \
|
||||
$(DEPS_DIR)/libvita2d/shader/texture_f_gxp.o \
|
||||
$(DEPS_DIR)/libvita2d/shader/texture_tint_f_gxp.o
|
||||
|
||||
PLATOBJS += \
|
||||
libretro-common/audio/conversion/s16_to_float_neon.o \
|
||||
@@ -338,46 +309,40 @@ else ifeq ($(platform), vita)
|
||||
LIBDIRS += -L.
|
||||
LDFLAGS += -Wl,-q
|
||||
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_LANGEXTRA := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RWEBP := 1
|
||||
HAVE_RDDS := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_GXM := 1
|
||||
HAVE_VITA2D := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
else ifeq ($(platform), windows_msvc6_x86)
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RWEBP := 1
|
||||
HAVE_RDDS := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 0
|
||||
HAVE_IFINFO := 0
|
||||
HAVE_NETWORK_CMD := 0
|
||||
HAVE_NETPLAYDISCOVERY := 0
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_COMMAND := 1
|
||||
@@ -386,10 +351,7 @@ else ifeq ($(platform), windows_msvc6_x86)
|
||||
HAVE_DYLIB := 1
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -397,11 +359,7 @@ else ifeq ($(platform), windows_msvc6_x86)
|
||||
CXX = cl.exe
|
||||
LD = link.exe
|
||||
|
||||
# _WIN32_WINDOWS says this build runs on 9x, which is what selects
|
||||
# libretro-common's ANSI Win32 path. It used to fall out of the low
|
||||
# _WIN32_WINNT below, but that is the NT scale and NT is
|
||||
# Unicode-native; the two are independent minimums and both apply.
|
||||
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0351 -D_WIN32_WINDOWS=0x0400 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0351 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib
|
||||
|
||||
VCDIR ?= $(shell reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\DevStudio\6.0\Products\Microsoft Visual C++" -v "ProductDir" | grep -io '[A-Z]:\\.*')
|
||||
@@ -411,24 +369,24 @@ else ifeq ($(platform), windows_msvc6_x86)
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VCDIR)/Include")
|
||||
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VCDIR)/Lib")
|
||||
|
||||
export INCLUDE := $(INCLUDE);$(INETSDK)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps
|
||||
export INCLUDE := $(INCLUDE);$(INETSDK)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(INETSDK)\Lib
|
||||
else ifeq ($(platform), windows_msvc2003_x86)
|
||||
HAVE_GDI := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RWEBP := 1
|
||||
HAVE_RDDS := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 0
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_COMMAND := 1
|
||||
@@ -437,11 +395,7 @@ else ifeq ($(platform), windows_msvc2003_x86)
|
||||
HAVE_DYLIB := 1
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -449,10 +403,7 @@ else ifeq ($(platform), windows_msvc2003_x86)
|
||||
CXX = cl.exe
|
||||
LD = link.exe
|
||||
|
||||
# See the msvc6 target: _WIN32_WINDOWS is the 9x minimum, _WIN32_WINNT
|
||||
# the NT one.
|
||||
PLATCFLAGS += -D_WIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -D_WIN32_WINDOWS=0x0400 -D__STDC_CONSTANT_MACROS -D_MBCS -D_VC80_UPGRADE=0x0710
|
||||
PLATCFLAGS += -DHAVE_GFX_WIDGETS
|
||||
PLATCFLAGS += -D_WIN32 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -D__STDC_CONSTANT_MACROS -D_MBCS -D_VC80_UPGRADE=0x0710
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib
|
||||
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VS71COMNTOOLS)../../Vc7/bin"):$(PATH)
|
||||
@@ -463,30 +414,28 @@ else ifeq ($(platform), windows_msvc2003_x86)
|
||||
ifeq ($(HAVE_DIRECTX), 1)
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND
|
||||
DXSDK_DIR := $(DXSDK_DIR:\=)
|
||||
export INCLUDE := $(INCLUDE);$(INETSDK)\Include;$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps
|
||||
export INCLUDE := $(INCLUDE);$(INETSDK)\Include;$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(INETSDK)\Lib;$(DXSDK_DIR)\Lib\x86
|
||||
else
|
||||
export INCLUDE := $(INCLUDE);$(INETSDK)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps
|
||||
export INCLUDE := $(INCLUDE);$(INETSDK)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(INETSDK)\Lib
|
||||
endif
|
||||
else ifeq ($(platform), windows_msvc2005_x86)
|
||||
HAVE_GDI := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RWEBP := 1
|
||||
HAVE_RDDS := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 0
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_OZONE := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_COMMAND := 1
|
||||
@@ -495,18 +444,8 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
HAVE_DYLIB := 1
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_OPENGL1 := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -514,67 +453,40 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
CXX = cl.exe
|
||||
LD = link.exe
|
||||
|
||||
# 0x0410 is Windows 98 - a _WIN32_WINDOWS value. On the NT scale it
|
||||
# reads as "NT 4.1", a version that does not exist; every SDK gate it
|
||||
# passes is an NT 4.0 gate, so moving it to the macro it was always
|
||||
# meant for changes no API exposure and states the actual target.
|
||||
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0400 -D_WIN32_WINDOWS=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_OZONE -DHAVE_GFX_WIDGETS -DHAVE_CC_RESAMPLER
|
||||
PLATCFLAGS += -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
PLATCFLAGS += -DHAVE_UPDATE_CORE_INFO
|
||||
PLATCFLAGS += -DHAVE_CDROM
|
||||
PLATCFLAGS += -bigobj
|
||||
|
||||
LDFLAGS += -MANIFEST shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib msimg32.lib
|
||||
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS -D__MMX__ -D__SSE__ -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_SHADERPIPELINE -DHAVE_OZONE
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib msimg32.lib
|
||||
|
||||
PATH := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/bin"):$(PATH)
|
||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../IDE")
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VS80COMNTOOLS)../../VC/include")
|
||||
LIB := $(shell IFS=$$'\n'; cygpath -w "$(VS80COMNTOOLS)../../VC/lib")
|
||||
|
||||
WindowsSdkDir := $(shell reg query "HKLM\SOFTWARE\Microsoft\MicrosoftSDK\InstalledSDKs\8F9E5EF3-A9A5-491B-A889-C58EFFECE8B3" -v "Install Dir" | grep -o '[A-Z]:\\.*')
|
||||
|
||||
WindowsSDKIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include")
|
||||
WindowsSDKAtlIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\atl")
|
||||
WindowsSDKCrtIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\crt")
|
||||
WindowsSDKGlIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\gl")
|
||||
WindowsSDKMfcIncludeDir := $(shell cygpath -w "$(WindowsSdkDir)\Include\mfc")
|
||||
WindowsSDKLibDir := $(shell cygpath -w "$(WindowsSdkDir)\Lib")
|
||||
|
||||
INCLUDE := $(INCLUDE);$(WindowsSDKIncludeDir);$(WindowsSDKAtlIncludeDir);$(WindowsSDKCrtIncludeDir);$(WindowsSDKGlIncludeDir);$(WindowsSDKMfcIncludeDir);libretro/msvc/msvc-2005
|
||||
LIB := $(LIB);$(WindowsSDKLibDir)
|
||||
|
||||
ifeq ($(HAVE_DIRECTX), 1)
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND -DHAVE_D3D -DHAVE_D3D8
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND
|
||||
DXSDK_DIR := $(DXSDK_DIR:\=)
|
||||
export INCLUDE := $(INCLUDE);$(INETSDK)\Include;$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps
|
||||
export INCLUDE := $(INCLUDE);$(INETSDK)\Include;$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(INETSDK)\Lib;$(DXSDK_DIR)\Lib\x86
|
||||
else
|
||||
export INCLUDE := $(INCLUDE);$(INETSDK)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps
|
||||
export INCLUDE := $(INCLUDE);$(INETSDK)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(INETSDK)\Lib
|
||||
endif
|
||||
else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
HAVE_GDI := 1
|
||||
HAVE_CHEEVOS := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RWEBP := 1
|
||||
HAVE_RDDS := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_OZONE := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_COMMAND := 1
|
||||
@@ -585,16 +497,7 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_OPENGL1 := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -603,16 +506,8 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS
|
||||
PLATCFLAGS += -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA
|
||||
PLATCFLAGS += -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_OZONE
|
||||
PLATCFLAGS += -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
PLATCFLAGS += -DHAVE_UPDATE_CORE_INFO
|
||||
PLATCFLAGS += -DWIN32 -DHAVE_CDROM
|
||||
PLATCFLAGS += -DHAVE_GFX_WIDGETS
|
||||
PLATCFLAGS += -bigobj
|
||||
|
||||
LDFLAGS += -MANIFEST shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib msimg32.lib
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DWIN32 -DHAVE_CDROM
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib msimg32.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2010_,,$(platform))
|
||||
|
||||
@@ -637,39 +532,36 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS100COMNTOOLS)../IDE")
|
||||
INCLUDE := $(shell IFS=$$'\n'; cygpath -w "$(VS100COMNTOOLS)../../VC/include")
|
||||
|
||||
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -io '[A-Z]:\\.*')
|
||||
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A" -v "InstallationFolder" | grep -io '[A-Z]:\\.*')
|
||||
WindowsSdkDir ?= $(shell reg query "HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1A" -v "InstallationFolder" | grep -io '[A-Z]:\\.*')
|
||||
WindowsSdkDir := $(WindowsSdkDir:\=)
|
||||
|
||||
ifeq ($(HAVE_DIRECTX), 1)
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND -DHAVE_D3D -DHAVE_D3D8 -DHAVE_XAUDIO -DHAVE_XINPUT
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND -DHAVE_D3D -DHAVE_D3D9 -DHAVE_XAUDIO -DHAVE_XINPUT
|
||||
DXSDK_DIR := $(DXSDK_DIR:\=)
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)\Include;$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)\Include;$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(WindowsSdkDir)\$(PlatLib);$(DXSDK_DIR)\Lib\$(WinArch)
|
||||
else
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(WindowsSdkDir)\$(PlatLib)
|
||||
endif
|
||||
else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
HAVE_GDI := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RWEBP := 1
|
||||
HAVE_RDDS := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_COMMAND := 1
|
||||
@@ -680,10 +572,7 @@ else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -692,10 +581,8 @@ else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
PLATCFLAGS += -DHAVE_UPDATE_CORE_INFO
|
||||
PLATCFLAGS += -DWIN32 -DHAVE_CDROM
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DWIN32 -DHAVE_CDROM
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2012_,,$(platform))
|
||||
|
||||
@@ -731,32 +618,29 @@ else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
ifeq ($(HAVE_DIRECTX), 1)
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND -DHAVE_D3D -DHAVE_D3D9 -DHAVE_XAUDIO -DHAVE_XINPUT
|
||||
DXSDK_DIR := $(DXSDK_DIR:\=)
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)\Include\um;$(WindowsSdkDir)\Include\shared;$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)\Include\um;$(WindowsSdkDir)\Include\shared;$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(WindowsSdkDir)\$(PlatLib);$(DXSDK_DIR)\Lib\$(WinArch)
|
||||
else
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)\Include\um;$(WindowsSdkDir)\Include\shared;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)\Include\um;$(WindowsSdkDir)\Include\shared;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(WindowsSdkDir)\$(PlatLib)
|
||||
endif
|
||||
else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
HAVE_GDI := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RWEBP := 1
|
||||
HAVE_RDDS := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_COMMAND := 1
|
||||
@@ -767,10 +651,7 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -779,10 +660,8 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
LD = link.exe
|
||||
|
||||
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
PLATCFLAGS += -DHAVE_UPDATE_CORE_INFO
|
||||
PLATCFLAGS += -DWIN32 -DHAVE_CDROM
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DWIN32 -DHAVE_CDROM
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2013_,,$(platform))
|
||||
|
||||
@@ -818,32 +697,29 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
ifeq ($(HAVE_DIRECTX), 1)
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND -DHAVE_D3D -DHAVE_D3D9 -DHAVE_XAUDIO -DHAVE_XINPUT
|
||||
DXSDK_DIR := $(DXSDK_DIR:\=)
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)\Include\um;$(WindowsSdkDir)\Include\shared;$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)\Include\um;$(WindowsSdkDir)\Include\shared;$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(WindowsSdkDir)\$(PlatLib);$(DXSDK_DIR)\Lib\$(WinArch)
|
||||
else
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)\Include\um;$(WindowsSdkDir)\Include\shared;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps
|
||||
export INCLUDE := $(INCLUDE);$(WindowsSdkDir)\Include\um;$(WindowsSdkDir)\Include\shared;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(WindowsSdkDir)\$(PlatLib)
|
||||
endif
|
||||
else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
HAVE_GDI := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RWEBP := 1
|
||||
HAVE_RDDS := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_COMMAND := 1
|
||||
@@ -854,10 +730,7 @@ else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DIRECTX ?= 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
EXT_TARGET := $(TARGET_NAME).exe
|
||||
EXT_INTER_TARGET := $(TARGET_NAME).exe
|
||||
@@ -867,9 +740,7 @@ else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
|
||||
PLATCFLAGS += -utf-8
|
||||
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
PLATCFLAGS += -DHAVE_UPDATE_CORE_INFO
|
||||
PLATCFLAGS += -DWIN32 -DHAVE_CDROM
|
||||
PLATCFLAGS += -D__i686__ -D__MMX__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DWIN32 -DHAVE_CDROM
|
||||
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
|
||||
|
||||
PlatformSuffix = $(subst windows_msvc2015_,,$(platform))
|
||||
@@ -921,31 +792,28 @@ else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
ifeq ($(HAVE_DIRECTX), 1)
|
||||
PLATCFLAGS += -DHAVE_DINPUT -DHAVE_DSOUND -DHAVE_D3D -DHAVE_D3D9 -DHAVE_XAUDIO -DHAVE_XINPUT
|
||||
DXSDK_DIR := $(DXSDK_DIR:\=)
|
||||
export INCLUDE := $(INCLUDE);$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps
|
||||
export INCLUDE := $(INCLUDE);$(DXSDK_DIR)\Include;libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB);$(DXSDK_DIR)\Lib\$(WinArch)
|
||||
else
|
||||
export INCLUDE := $(INCLUDE);libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps
|
||||
export INCLUDE := $(INCLUDE);libretro-common\include;libretro-common\include\compat\msvc;gfx\include;deps;deps\stb
|
||||
export LIB := $(LIB)
|
||||
endif
|
||||
else ifeq (qnx,$(platform))
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RWEBP := 1
|
||||
HAVE_RDDS := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_COMMAND := 1
|
||||
@@ -955,11 +823,7 @@ else ifeq (qnx,$(platform))
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 0
|
||||
WANT_GLSLANG := 0
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
HAVE_CONFIGFILE := 1
|
||||
CC=qcc -Vgcc_ntoarmv7le
|
||||
CXX=QCC -Vgcc_ntoarmv7le
|
||||
|
||||
@@ -967,32 +831,27 @@ else ifeq (qnx,$(platform))
|
||||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
PLATCFLAGS += -DHAVE_SHADERPIPELINE -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_GL_SYNC -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SPIRV_CROSS -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
PLATCFLAGS += -DHAVE_UPDATE_CORE_INFO
|
||||
PLATCFLAGS += -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_XCB -DHAVE_EGL -DHAVE_BB10 -DHAVE_GLSL -DHAVE_AL -DHAVE_BSV_MOVIE -DRARCH_MOBILE
|
||||
PLATCFLAGS += -DHAVE_SHADERPIPELINE -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_FBO -DHAVE_GL_SYNC -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_XCB -DHAVE_EGL -DHAVE_BB10 -DHAVE_GLSL -DHAVE_AL -DRARCH_MOBILE
|
||||
EXT_TARGET := $(TARGET_NAME)
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)
|
||||
INCLUDE += -Ilibretro-common/include -Igfx/include -Ideps -Ideps/rcheevos/include -Ideps/SPIRV-Cross -Ideps/glslang -I.
|
||||
INCLUDE += -Ilibretro-common/include -Igfx/include -Ideps -Ideps/stb -Ideps/rcheevos/include -Ideps/SPIRV-Cross -Ideps/glslang -I.
|
||||
LIBS += -lEGL -lbps -lscreen -lsocket -lm -lGLESv2 -lOpenAL
|
||||
else ifneq (,$(findstring unix,$(platform)))
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RWEBP := 1
|
||||
HAVE_RDDS := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_COMMAND := 1
|
||||
@@ -1002,17 +861,12 @@ else ifneq (,$(findstring unix,$(platform)))
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_GRIFFIN_CPP := 1
|
||||
WANT_GLSLANG := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
|
||||
PLATCFLAGS += -D__MMX__ -D__SSE__ -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_SHADERPIPELINE -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_GL_SYNC -DHAVE_SLANG -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SPIRV_CROSS -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
PLATCFLAGS += -DHAVE_UPDATE_CORE_INFO
|
||||
PLATCFLAGS += -DHAVE_VULKAN -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_X11 -DHAVE_XCB -DHAVE_UDEV -DHAVE_BSV_MOVIE -DHAVE_PULSE
|
||||
PLATCFLAGS += -D__MMX__ -D__SSE__ -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_SHADERPIPELINE -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_FBO -DHAVE_GL_SYNC -DHAVE_SLANG -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_VULKAN -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_X11 -DHAVE_XCB -DHAVE_UDEV -DHAVE_PULSE
|
||||
EXT_TARGET := $(TARGET_NAME)
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)
|
||||
INCLUDE += -Ilibretro-common/include -Igfx/include -Ideps -Ideps/rcheevos/include -Ideps/SPIRV-Cross -Ideps/glslang -I.
|
||||
INCLUDE += -Ilibretro-common/include -Igfx/include -Ideps -Ideps/stb -Ideps/rcheevos/include -Ideps/SPIRV-Cross -Ideps/glslang -I.
|
||||
LIBS += -ldl -lm -lpthread -lGL -ludev -lpulse -lX11 -lX11-xcb -lXxf86vm
|
||||
endif
|
||||
|
||||
@@ -1021,7 +875,8 @@ ifneq (,$(findstring msvc,$(platform)))
|
||||
else
|
||||
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(PLATCFLAGS) $(INCLUDE)
|
||||
INCLUDE += -I./libretro-common/include \
|
||||
-Ideps
|
||||
-Ideps \
|
||||
-Ideps/stb
|
||||
endif
|
||||
|
||||
OBJ = griffin/griffin.o $(PLATOBJS)
|
||||
@@ -1055,8 +910,8 @@ ifeq ($(HAVE_WIIUSB_HID), 1)
|
||||
CFLAGS += -DHAVE_WIIUSB_HID -DHAVE_HID
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GXM), 1)
|
||||
CFLAGS += -DHAVE_GXM
|
||||
ifeq ($(HAVE_VITA2D), 1)
|
||||
CFLAGS += -DHAVE_VITA2D
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LIBRETRODB), 1)
|
||||
@@ -1079,18 +934,15 @@ ifeq ($(HAVE_RARCH_EXEC), 1)
|
||||
CFLAGS += -DHAVE_RARCH_EXEC
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_ZLIB), 1)
|
||||
CFLAGS += -DHAVE_ZLIB
|
||||
CFLAGS += -I./libretro-common/include/compat/zlib
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RPNG), 1)
|
||||
CFLAGS += -DHAVE_RPNG
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RWEBP), 1)
|
||||
CFLAGS += -DHAVE_RWEBP
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RDDS), 1)
|
||||
CFLAGS += -DHAVE_RDDS
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RBMP), 1)
|
||||
CFLAGS += -DHAVE_RBMP
|
||||
endif
|
||||
@@ -1103,10 +955,6 @@ ifeq ($(HAVE_IMAGEVIEWER), 1)
|
||||
CFLAGS += -DHAVE_IMAGEVIEWER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_BSV_MOVIE), 1)
|
||||
CFLAGS += -DHAVE_BSV_MOVIE
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RUNAHEAD), 1)
|
||||
CFLAGS += -DHAVE_RUNAHEAD
|
||||
endif
|
||||
@@ -1115,32 +963,20 @@ ifeq ($(HAVE_7ZIP), 1)
|
||||
CFLAGS += -DHAVE_7ZIP
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SCREENSHOTS), 1)
|
||||
CFLAGS += -DHAVE_SCREENSHOTS
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_REWIND), 1)
|
||||
CFLAGS += -DHAVE_REWIND
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_AUDIOMIXER), 1)
|
||||
CFLAGS += -DHAVE_AUDIOMIXER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RWAV), 1)
|
||||
CFLAGS += -DHAVE_RWAV
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OVERLAY), 1)
|
||||
CFLAGS += -DHAVE_OVERLAY
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETWORKING), 1)
|
||||
CFLAGS += -DHAVE_NETWORKING
|
||||
ifeq ($(HAVE_VIDEO_LAYOUT), 1)
|
||||
CFLAGS += -DHAVE_VIDEO_LAYOUT
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_IFINFO), 1)
|
||||
CFLAGS += -DHAVE_IFINFO
|
||||
ifeq ($(HAVE_NETWORKING), 1)
|
||||
CFLAGS += -DHAVE_NETWORKING
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETPLAYDISCOVERY), 1)
|
||||
@@ -1151,10 +987,6 @@ ifeq ($(RARCH_CONSOLE), 1)
|
||||
CFLAGS += -DRARCH_CONSOLE
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CORE_INFO_CACHE), 1)
|
||||
CFLAGS += -DHAVE_CORE_INFO_CACHE
|
||||
endif
|
||||
|
||||
ifeq ($(RARCH_MOBILE), 1)
|
||||
CFLAGS += -DRARCH_MOBILE
|
||||
endif
|
||||
@@ -1173,26 +1005,18 @@ ifeq ($(HAVE_XMB), 1)
|
||||
CFLAGS += -DHAVE_XMB
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STB_FONT), 1)
|
||||
CFLAGS += -DHAVE_STB_FONT
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LANGEXTRA), 1)
|
||||
CFLAGS += -DHAVE_LANGEXTRA
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_DSP_FILTER), 1)
|
||||
CFLAGS += -DHAVE_DSP_FILTER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_VIDEO_FILTER), 1)
|
||||
CFLAGS += -DHAVE_VIDEO_FILTER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WINDOW_OFFSET), 1)
|
||||
CFLAGS += -DHAVE_WINDOW_OFFSET
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
CFLAGS += -DHAVE_THREADS
|
||||
|
||||
@@ -1209,14 +1033,6 @@ ifeq ($(HAVE_CONFIGFILE), 1)
|
||||
CFLAGS += -DHAVE_CONFIGFILE
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_PATCH), 1)
|
||||
CFLAGS += -DHAVE_PATCH
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CHEATS), 1)
|
||||
CFLAGS += -DHAVE_CHEATS
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RSOUND), 1)
|
||||
CFLAGS += -DHAVE_RSOUND
|
||||
endif
|
||||
|
||||
-248
@@ -1,248 +0,0 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Default toolchain directory
|
||||
TOOLCHAIN_DIR="$(HOST_DIR)"
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-g++
|
||||
endif
|
||||
|
||||
ifdef GCW0_STRIP
|
||||
STRIP = $(GCW0_STRIP)
|
||||
else
|
||||
STRIP = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-strip
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/arm-buildroot-linux-gnueabi/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/arm-buildroot-linux-gnueabi/sysroot/usr/bin/freetype-config
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/arm-buildroot-linux-gnueabi/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
MIYOO = 1
|
||||
DINGUX = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 0
|
||||
HAVE_ALSA = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 0
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_CXX = 1
|
||||
HAVE_RMP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 1
|
||||
HAVE_GETADDRINFO = 0
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 0
|
||||
HAVE_HID = 0
|
||||
HAVE_RMODTRACKER = 1
|
||||
HAVE_IMAGEVIEWER = 0
|
||||
HAVE_LANGEXTRA = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_MMAP = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGLES = 0
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENSSL = 0
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RWEBP = 1
|
||||
HAVE_RDDS = 1
|
||||
HAVE_RUNAHEAD = 0
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_STB_IMAGE = 0
|
||||
HAVE_RVORBIS = 0
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 0
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 0
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
#HAVE_TINYALSA = 1
|
||||
HAVE_NEAREST_RESAMPLER = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -march=armv5te -mtune=arm926ej-s -ffast-math -fomit-frame-pointer
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -DMIYOO=1 -DDINGUX -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable -flto
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE
|
||||
LIBS := -ldl -lrt -pthread -lasound
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN -DHAVE_ALSA
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
MMAP_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
ifeq ($(STRIP_BIN),1)
|
||||
$(STRIP) --strip-unneeded $(TARGET)
|
||||
endif
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
|
||||
install: $(TARGET)
|
||||
mkdir -p $(DESTDIR)$(BIN_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(GLOBAL_CONFIG_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/applications 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/metainfo 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DOC_DIR) 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(MAN_DIR)/man6 2>/dev/null || /bin/true
|
||||
mkdir -p $(DESTDIR)$(DATA_DIR)/pixmaps 2>/dev/null || /bin/true
|
||||
cp $(TARGET) $(DESTDIR)$(BIN_DIR)
|
||||
cp tools/cg2glsl.py $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
cp retroarch.cfg $(DESTDIR)$(GLOBAL_CONFIG_DIR)
|
||||
cp com.libretro.RetroArch.metainfo.xml $(DESTDIR)$(DATA_DIR)/metainfo
|
||||
cp com.libretro.RetroArch.desktop $(DESTDIR)$(DATA_DIR)/applications
|
||||
cp docs/retroarch.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
cp docs/retroarch-cg2glsl.6 $(DESTDIR)$(MAN_DIR)/man6
|
||||
cp media/com.libretro.RetroArch.svg $(DESTDIR)$(DATA_DIR)/pixmaps
|
||||
cp COPYING $(DESTDIR)$(DOC_DIR)
|
||||
cp README.md $(DESTDIR)$(DOC_DIR)
|
||||
chmod 755 $(DESTDIR)$(BIN_DIR)/$(TARGET)
|
||||
chmod 755 $(DESTDIR)$(BIN_DIR)/retroarch-cg2glsl
|
||||
chmod 644 $(DESTDIR)$(GLOBAL_CONFIG_DIR)/retroarch.cfg
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/applications/com.libretro.RetroArch.desktop
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/metainfo/com.libretro.RetroArch.metainfo.xml
|
||||
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch.6
|
||||
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch-cg2glsl.6
|
||||
chmod 644 $(DESTDIR)$(DATA_DIR)/pixmaps/com.libretro.RetroArch.svg
|
||||
@if test -d media/assets && test $(HAVE_ASSETS); then \
|
||||
echo "Installing media assets..."; \
|
||||
mkdir -p $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
if test $(HAVE_MATERIALUI) = 1; then \
|
||||
cp -r media/assets/glui/ $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
fi; \
|
||||
if test $(HAVE_XMB) = 1; then \
|
||||
cp -r media/assets/xmb/ $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
fi; \
|
||||
if test $(HAVE_OZONE) = 1; then \
|
||||
cp -r media/assets/ozone/ $(DESTDIR)$(ASSETS_DIR)/assets; \
|
||||
fi; \
|
||||
cp media/assets/COPYING $(DESTDIR)$(DOC_DIR)/COPYING.assets; \
|
||||
echo "Asset copying done."; \
|
||||
fi
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
+13
-29
@@ -19,45 +19,31 @@ GRIFFIN_BUILD = 0
|
||||
|
||||
OBJ :=
|
||||
|
||||
DEFINES := -D__SWITCH__=1 -U__linux__ -U__linux -DGLM_FORCE_PURE=1 -DRARCH_CONSOLE -DRARCH_INTERNAL -DGLOBAL_CONFIG_DIR='"/switch"' -DHAVE_RVORBIS
|
||||
DEFINES := -D__SWITCH__=1 -U__linux__ -U__linux -DGLM_FORCE_PURE=1 -DRARCH_CONSOLE -DRARCH_INTERNAL -DGLOBAL_CONFIG_DIR='"/switch"' -DHAVE_STB_VORBIS
|
||||
|
||||
HAVE_RMP3 = 1
|
||||
HAVE_DR_MP3 = 1
|
||||
HAVE_TRANSLATE = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_RTGA = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RWEBP = 1
|
||||
HAVE_RDDS = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RWAV = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_STATIC_CORES = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
HAVE_NETWORKING = 1
|
||||
HAVE_IFINFO = 1
|
||||
HAVE_NETPLAYDISCOVERY = 1
|
||||
HAVE_STB_FONT = 1
|
||||
HAVE_CHEEVOS = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_RVORBIS = 1
|
||||
HAVE_RMODTRACKER = 1
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
HAVE_CLOUDSYNC = 1
|
||||
HAVE_SSL = 1
|
||||
HAVE_CHD = 0 # disabled due to static libretro-common and libchdr conflicts between different cores
|
||||
HAVE_STB_VORBIS = 1
|
||||
|
||||
# RetroArch libnx useful flags
|
||||
HAVE_THREADS = 1
|
||||
@@ -77,12 +63,14 @@ ifeq ($(HAVE_OPENGL), 1)
|
||||
HAVE_XMB = 1
|
||||
HAVE_OZONE = 1
|
||||
HAVE_OVERLAY = 1
|
||||
HAVE_VIDEO_LAYOUT = 1
|
||||
HAVE_GLSL = 1
|
||||
else
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_STRIPES = 0
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
@@ -128,14 +116,10 @@ APP_ICON := pkg/libnx/retroarch.jpg
|
||||
#---------------------------------------------------------------------------------
|
||||
ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -mcpu=cortex-a57+crc+fp+simd
|
||||
|
||||
CFLAGS := -g -Wall -O3 -fcommon -ffunction-sections \
|
||||
$(ARCH) $(DEFINES) $(INCLUDE_DIRS) -I$(LIBNX)/include -I$(PORTLIBS)/include/ -include $(LIBNX)/include/switch.h
|
||||
CFLAGS := -g -Wall -O3 -ffast-math -ffunction-sections \
|
||||
$(ARCH) $(DEFINES) $(INCLUDE_DIRS) -I$(LIBNX)/include -I$(PORTLIBS)/include/ -include $(LIBNX)/include/switch.h #$(shell $(PORTLIBS)/bin/freetype-config --cflags)
|
||||
|
||||
CFLAGS += $(INCLUDE) -DSWITCH=1 -DHAVE_LIBNX=1 -DNXLINK=1 -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_UPDATE_CORE_INFO
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
CFLAGS += $(INCLUDE) -DSWITCH=1 -DHAVE_LIBNX=1 -DNXLINK=1 -DHAVE_SHADERPIPELINE -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_STB_FONT #-DHAVE_FREETYPE
|
||||
|
||||
ifeq ($(strip $(HAVE_STATIC_DUMMY)),1)
|
||||
CFLAGS += -DHAVE_STATIC_DUMMY=1
|
||||
@@ -149,7 +133,7 @@ LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs $(ARCH) -Wl,--allow-multiple-de
|
||||
# add things from Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
|
||||
LIBS := -lswresample -lavformat -lavcodec -lavutil -lswscale -lstdc++ -lbz2 -lpng -lz -lnx -lvpx -lopus -llzma -lmbedtls -lmbedx509 -lmbedcrypto -lnx -lm
|
||||
LIBS := -lswresample -lavformat -lavcodec -lavutil -lswscale -lstdc++ -lbz2 -lpng -lz -lnx -lvpx -lopus -llzma -lm
|
||||
|
||||
ifeq ($(HAVE_OPENGL), 1)
|
||||
LIBS := -lEGL -lglapi -ldrm_nouveau $(LIBS)
|
||||
|
||||
-234
@@ -1,234 +0,0 @@
|
||||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Default toolchain directory
|
||||
TOOLCHAIN_DIR=/opt/miyoo
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-g++
|
||||
endif
|
||||
|
||||
ifdef GCW0_STRIP
|
||||
STRIP = $(GCW0_STRIP)
|
||||
else
|
||||
STRIP = $(TOOLCHAIN_DIR)/usr/bin/arm-linux-strip
|
||||
endif
|
||||
|
||||
SYSROOT ?= $(shell $(CC) --print-sysroot)
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(SYSROOT)/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(SYSROOT)/usr/bin/freetype-config
|
||||
|
||||
GCW0_INC_DIR ?= $(SYSROOT)/usr/include
|
||||
GCW0_LIB_DIR ?= $(SYSROOT)/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
MIYOO = 1
|
||||
DINGUX = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 0
|
||||
HAVE_ALSA = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 0
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_CHD = 1
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_CXX = 1
|
||||
HAVE_RMP3 = 1
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 1
|
||||
HAVE_GETADDRINFO = 0
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 0
|
||||
HAVE_HID = 0
|
||||
HAVE_RMODTRACKER = 1
|
||||
HAVE_IMAGEVIEWER = 0
|
||||
HAVE_LANGEXTRA = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_MMAP = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGLES = 0
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENSSL = 0
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RWEBP = 1
|
||||
HAVE_RDDS = 1
|
||||
HAVE_RUNAHEAD = 0
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_STB_IMAGE = 0
|
||||
HAVE_RVORBIS = 0
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 0
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_XDELTA = 0 # Disabled until we figure out how to include <lzma.h>
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 0
|
||||
HAVE_CORE_INFO_CACHE = 1
|
||||
#HAVE_TINYALSA = 1
|
||||
HAVE_NEAREST_RESAMPLER = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -march=armv5te -mtune=arm926ej-s -fomit-frame-pointer
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -DMIYOO=1 -DDINGUX -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable -flto
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE
|
||||
LIBS := -ldl -lrt -pthread -lasound
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN -DHAVE_ALSA
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
MMAP_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -O2 -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
ifneq ($(V),1)
|
||||
Q := @
|
||||
endif
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
define INFO
|
||||
ASFLAGS: $(ASFLAGS)
|
||||
CC: $(CC)
|
||||
CFLAGS: $(CFLAGS)
|
||||
CPPFLAGS: $(CPPFLAGS)
|
||||
CXX: $(CXX)
|
||||
CXXFLAGS: $(CXXFLAGS)
|
||||
DEFINES: $(DEFINES)
|
||||
LDFLAGS: $(LDFLAGS)
|
||||
LIBRARY_DIRS: $(LIBRARY_DIRS)
|
||||
LIBS: $(LIBS)
|
||||
LINK: $(LINK)
|
||||
OBJCFLAGS: $(OBJCFLAGS)
|
||||
RARCH_OBJ: $(RARCH_OBJ)
|
||||
endef
|
||||
export INFO
|
||||
|
||||
info:
|
||||
ifneq ($(V),1)
|
||||
@echo "$$INFO"
|
||||
endif
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
ifeq ($(STRIP_BIN),1)
|
||||
$(STRIP) --strip-unneeded $(TARGET)
|
||||
endif
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
@$(if $(Q), echo $@,)
|
||||
$(Q)rm -rf $(OBJDIR_BASE)
|
||||
$(Q)rm -f $(TARGET)
|
||||
$(Q)rm -f *.d
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
+16
-14
@@ -11,11 +11,8 @@ WindowsSdkDir = C:\Program Files (x86)\Windows Kits\10\$(NOTHING)
|
||||
WindowsSDKVersion := 10.0.14393.0\$(NOTHING)
|
||||
VCINSTALLDIR := C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\$(NOTHING)
|
||||
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_D3DX := 1
|
||||
HAVE_D3D8 := 0
|
||||
HAVE_D3D9 := 1
|
||||
HAVE_D3D10 := 1
|
||||
@@ -24,23 +21,22 @@ HAVE_D3D12 := 1
|
||||
HAVE_CG := 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_OPENGL1 := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_VULKAN := 1
|
||||
HAVE_XAUDIO := 1
|
||||
HAVE_XINPUT := 1
|
||||
HAVE_WASAPI := 1
|
||||
HAVE_WASAPI := 0
|
||||
HAVE_THREAD_STORAGE := 1
|
||||
HAVE_WINMM := 1
|
||||
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RWEBP := 1
|
||||
HAVE_RDDS := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_RGUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_STB_FONT := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_COMMAND := 1
|
||||
@@ -50,29 +46,33 @@ HAVE_DYLIB := 1
|
||||
HAVE_DYNAMIC := 1
|
||||
HAVE_DINPUT := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_BUILTINZLIB := 1
|
||||
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_IFINFO := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_LANGEXTRA := 1
|
||||
HAVE_CHEEVOS := 1
|
||||
HAVE_SHADERPIPELINE := 1
|
||||
HAVE_IMAGEVIEWER := 1
|
||||
HAVE_BSV_MOVIE := 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(HAVE_D3D8), 1)
|
||||
D3D8_LIBS := -ld3d8
|
||||
ifeq ($(HAVE_D3DX), 1)
|
||||
D3DX8_LIBS := -ld3dx8
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D9), 1)
|
||||
D3D9_LIBS := -ld3d9
|
||||
ifeq ($(HAVE_D3DX), 1)
|
||||
D3DX9_LIBS := -ld3dx9
|
||||
endif
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
@@ -192,9 +192,11 @@ else
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
endif
|
||||
|
||||
DEFINES += -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DHAVE_DYNAMIC -DJSON_STATIC
|
||||
DEFINES += -DRARCH_INTERNAL -DHAVE_DYNAMIC -DJSON_STATIC
|
||||
INCLUDE_DIRS += -I. -Igfx/include
|
||||
|
||||
#OBJ := version_git.o
|
||||
|
||||
OBJ := $(patsubst %rarch.o,%rarch.res,$(OBJ))
|
||||
OBJ := $(addprefix $(BUILD_DIR)/,$(OBJ))
|
||||
OBJ := $(OBJ:.o=.obj)
|
||||
|
||||
-299
@@ -1,299 +0,0 @@
|
||||
ROOT_DIR := .
|
||||
DEPS_DIR := $(ROOT_DIR)/deps
|
||||
DEBUG ?= 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
BIG_STACK = 1
|
||||
PC_DEVELOPMENT_IP_ADDRESS = 255.255.255.255
|
||||
PC_DEVELOPMENT_UDP_PORT = 3490
|
||||
RARCH_CONSOLE = 0
|
||||
USBGECKO = 0
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
|
||||
SPACE :=
|
||||
SPACE := $(SPACE) $(SPACE)
|
||||
BACKSLASH :=
|
||||
BACKSLASH := \$(BACKSLASH)
|
||||
filter_out1 = $(filter-out $(firstword $1),$1)
|
||||
filter_out2 = $(call filter_out1,$(call filter_out1,$1))
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
ifeq ($(shell uname -s),)
|
||||
EXE_EXT = .exe
|
||||
system_platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -s)),)
|
||||
system_platform = osx
|
||||
else ifneq ($(findstring MINGW,$(shell uname -s)),)
|
||||
system_platform = win
|
||||
endif
|
||||
|
||||
TARGET_NAME := retroarch
|
||||
|
||||
INCLUDE :=
|
||||
LDFLAGS :=
|
||||
LIBDIRS :=
|
||||
|
||||
ifeq ($(LIBRETRO), nxengine)
|
||||
WHOLE_ARCHIVE_LINK = 1
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl,--whole-archive
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
LIB_CORE :=
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
LIB_CORE += -lretro_ngc
|
||||
endif
|
||||
|
||||
LIBS := $(WHOLE_START) $(LIB_CORE) $(WHOLE_END)
|
||||
|
||||
libogc_platform := 1
|
||||
|
||||
EXTERNAL_LIBOGC ?= 0
|
||||
HAVE_OGG_OGC ?= 0
|
||||
GX_PTHREAD_LEGACY ?= 1
|
||||
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
|
||||
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
|
||||
LD = $(DEVKITPPC)/bin/powerpc-eabi-ld$(EXE_EXT)
|
||||
ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
||||
EXT_TARGET := $(TARGET_NAME)_ngc.dol
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)_ngc.elf
|
||||
|
||||
# Check whether ELF2DOL executable exists
|
||||
# (path has changed in more recent toolchains)
|
||||
ifeq ("$(wildcard $(ELF2DOL))","")
|
||||
ELF2DOL = $(DEVKITPRO)/tools/bin/elf2dol$(EXE_EXT)
|
||||
endif
|
||||
|
||||
INCLUDE += -I.
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
CFLAGS += -DEXTERNAL_LIBOGC
|
||||
CXXFLAGS += -DEXTERNAL_LIBOGC
|
||||
LIBDIRS += -L$(DEVKITPRO)/libogc/lib/cube
|
||||
INCLUDE += -I$(DEVKITPRO)/libogc/include
|
||||
else
|
||||
CFLAGS += -DINTERNAL_LIBOGC
|
||||
CXXFLAGS += -DINTERNAL_LIBOGC
|
||||
LIBDIRS += -Lwii/libogc/libs/cube
|
||||
INCLUDE += -Iwii/libogc/include
|
||||
endif
|
||||
|
||||
ifeq ($(GX_PTHREAD_LEGACY), 1)
|
||||
CFLAGS += -DGX_PTHREAD_LEGACY
|
||||
CXXFLAGS += -DGX_PTHREAD_LEGACY
|
||||
endif
|
||||
|
||||
MACHDEP := -DHW_DOL -mogc
|
||||
|
||||
LIBDIRS += -L.
|
||||
MACHDEP += -DGEKKO -mcpu=750 -meabi -mhard-float
|
||||
|
||||
LDFLAGS += $(MACHDEP) -Wl,-Map,$(notdir $(EXT_INTER_TARGET)).map
|
||||
|
||||
ifeq ($(BIG_STACK), 1)
|
||||
LDFLAGS += -T bootstrap/gx/ogc.ld
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OGG_OGC), 1)
|
||||
LIBS += -L$(DEVKITPRO)/portlibs/ppc/lib -lvorbisfile -lvorbis -logg
|
||||
endif
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
LIBS += -lfat
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
LIBS += -lbba
|
||||
endif
|
||||
|
||||
LIBS += -logc
|
||||
|
||||
CFLAGS += -DGEKKO -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
|
||||
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_DSP_FILTER := 1
|
||||
HAVE_VIDEO_FILTER := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RWEBP := 1
|
||||
HAVE_RDDS := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_RMODTRACKER := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_PATCH := 1
|
||||
HAVE_XDELTA := 0 # disabled because <lzma.h> isn't available (or we haven't figured out how to install it)
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_SCREENSHOTS := 1
|
||||
HAVE_REWIND := 1
|
||||
HAVE_AUDIOMIXER := 1
|
||||
HAVE_RWAV := 1
|
||||
RARCH_CONSOLE = 1
|
||||
HAVE_CHEATS := 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_STATIC_AUDIO_FILTERS := 1
|
||||
HAVE_STATIC_VIDEO_FILTERS := 1
|
||||
HAVE_XMB := 0
|
||||
HAVE_OZONE := 0
|
||||
HAVE_RGUI := 1
|
||||
HAVE_MATERIALUI := 0
|
||||
|
||||
INCLUDE += -I./libretro-common/include \
|
||||
-Ideps
|
||||
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(PLATCFLAGS) $(INCLUDE)
|
||||
|
||||
OBJ = $(PLATOBJS) audio/drivers/gx_audio.o gfx/drivers/gx_gfx.o input/drivers/gx_input.o frontend/drivers/platform_gx.o input/drivers_joypad/gx_joypad.o
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 0)
|
||||
OBJ += wii/libogc/libfat/libfat.o wii/libogc/libfat/fatfile.o wii/libogc/libfat/file_allocation_table.o wii/libogc/libfat/cache.o wii/libogc/libfat/fatdir.o wii/libogc/libfat/partition.o wii/libogc/libfat/directory.o wii/libogc/libfat/filetime.o wii/libogc/libfat/disc.o
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
CFLAGS += $(DEFINES)
|
||||
|
||||
ifeq ($(WANT_GLSLANG), 1)
|
||||
OBJ += griffin/griffin_glslang.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_LOGGER
|
||||
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_KERNEL_PRX), 1)
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WIIUSB_HID), 1)
|
||||
CFLAGS += -DHAVE_WIIUSB_HID -DHAVE_HID
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_STACK),1)
|
||||
CFLAGS += -DBIG_STACK
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RARCH_EXEC), 1)
|
||||
CFLAGS += -DHAVE_RARCH_EXEC
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(RARCH_CONSOLE), 1)
|
||||
CFLAGS += -DRARCH_CONSOLE
|
||||
endif
|
||||
|
||||
ifeq ($(RARCH_MOBILE), 1)
|
||||
CFLAGS += -DRARCH_MOBILE
|
||||
endif
|
||||
|
||||
CFLAGS += -std=gnu99 -DHAVE_RGUI -DHAVE_MENU -DHAVE_GRIFFIN=1 -Wno-char-subscripts -DRARCH_INTERNAL
|
||||
|
||||
ifeq ($(HAVE_FILTERS_BUILTIN), 1)
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RSOUND), 1)
|
||||
CFLAGS += -DHAVE_RSOUND
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GETOPT_LONG), 1)
|
||||
CFLAGS += -DHAVE_GETOPT_LONG=1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETWORK_CMD), 1)
|
||||
CFLAGS += -DHAVE_NETWORK_CMD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_DYNAMIC), 1)
|
||||
CFLAGS += -DHAVE_DYNAMIC
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g -DDEBUG
|
||||
else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifneq ($(V),1)
|
||||
Q := @
|
||||
endif
|
||||
|
||||
OBJOUT = -o
|
||||
LINKOUT = -o
|
||||
LINK = $(CXX)
|
||||
|
||||
all: $(EXT_TARGET)
|
||||
|
||||
define INFO
|
||||
CC: $(CC)
|
||||
CFLAGS: $(CFLAGS)
|
||||
CXX: $(CXX)
|
||||
LD: $(LD)
|
||||
LDFLAGS: $(LDFLAGS)
|
||||
LIBDIRS: $(LIBDIRS)
|
||||
LIBS: $(LIBS)
|
||||
LINK: $(LINK)
|
||||
LINKOUT: $(LINKOUT)
|
||||
OBJ: $(OBJ)
|
||||
OBJOUT: $(OBJOUT)
|
||||
PLATEXTRA: $(PLATEXTRA)
|
||||
endef
|
||||
export INFO
|
||||
|
||||
info:
|
||||
ifneq ($(V),1)
|
||||
@echo "$$INFO"
|
||||
endif
|
||||
|
||||
%.dol: %.elf
|
||||
$(ELF2DOL) $< $@
|
||||
|
||||
$(EXT_INTER_TARGET): $(OBJ)
|
||||
@$(if $(Q), $(shell echo echo LINK $@),)
|
||||
$(Q)$(LINK) $(LINKOUT)$@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(PLATEXTRA) $(LIBS)
|
||||
|
||||
%.o: %.c
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.cpp
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.S
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.binobj: %.bin
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LD) -r -b binary $(OBJOUT)$@ $<
|
||||
|
||||
clean:
|
||||
@$(if $(Q), echo $@,)
|
||||
$(Q)rm -f $(EXT_TARGET)
|
||||
$(Q)rm -f $(EXT_INTER_TARGET)
|
||||
$(Q)rm -f $(OBJ)
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
||||
+12
-35
@@ -1,46 +1,23 @@
|
||||
include version.all
|
||||
|
||||
DEBUG = 0
|
||||
DEBUG = 0
|
||||
|
||||
CC = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc
|
||||
LD = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc -o
|
||||
CC = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc
|
||||
LD = $(PNDSDK)/bin/arm-none-linux-gnueabi-gcc -o
|
||||
|
||||
TARGET := retroarch-pandora
|
||||
TARGET := retroarch-pandora
|
||||
|
||||
LDDIRS = -L. -L$(PNDSDK)/usr/lib
|
||||
INCDIRS = -I. -I$(PNDSDK)/usr/include
|
||||
LDDIRS = -L. -L$(PNDSDK)/usr/lib
|
||||
INCDIRS = -I. -I$(PNDSDK)/usr/include
|
||||
|
||||
OBJ = griffin/griffin.o audio/resamplers/sinc_resampler_neon.o libretro-common/conversion/s16_to_float_neon.o libretro-common/conversion/float_to_s16_neon.o
|
||||
LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib
|
||||
OBJ = griffin/griffin.o audio/resamplers/sinc_resampler_neon.o libretro-common/conversion/s16_to_float_neon.o libretro-common/conversion/float_to_s16_neon.o
|
||||
LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib
|
||||
|
||||
LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound
|
||||
DEFINES = -std=gnu99
|
||||
DEFINES += -DHAVE_THREADS \
|
||||
-DHAVE_GETOPT_LONG=1 \
|
||||
-DHAVE_GRIFFIN \
|
||||
-DRARCH_INTERNAL \
|
||||
-DHAVE_CONFIGFILE \
|
||||
-DHAVE_PATCH \
|
||||
-DHAVE_SCREENSHOTS \
|
||||
-DHAVE_REWIND \
|
||||
-D__ARM_ARCH_6__ \
|
||||
-DHAVE_OPENGL \
|
||||
-DHAVE_OPENGLES \
|
||||
-DHAVE_OPENGLES2 \
|
||||
-DHAVE_GLSL \
|
||||
-DHAVE_DYNAMIC \
|
||||
-DHAVE_RPNG \
|
||||
-DHAVE_RWEBP \
|
||||
-DHAVE_RDDS \
|
||||
-DHAVE_RJPEG \
|
||||
-DHAVE_OVERLAY \
|
||||
-DHAVE_ALSA \
|
||||
-D__linux__ \
|
||||
-DHAVE_DSP_FILTER \
|
||||
-DHAVE_VIDEO_FILTER \
|
||||
-D__OPENPANDORA__ \
|
||||
-DPANDORA
|
||||
LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound
|
||||
DEFINES = -std=gnu99 -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -DRARCH_INTERNAL
|
||||
DEFINES += -DHAVE_CONFIGFILE -D__ARM_ARCH_6__ -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_OVERLAY -DHAVE_VIDEO_LAYOUT -DHAVE_ALSA -DHAVE_ZLIB -D__linux__
|
||||
DEFINES += $(INCDIRS)
|
||||
DEFINES += -D__OPENPANDORA__ -DPANDORA
|
||||
DEFINES += -marm -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
|
||||
+93
-168
@@ -3,94 +3,55 @@ DEBUG ?= 0
|
||||
GRIFFIN_BUILD = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
HAVE_GLES3 ?= 0
|
||||
HAVE_MOUSE ?= 0
|
||||
HAVE_KEYBOARD ?= 0
|
||||
|
||||
PS4_TITLE_ID := RETROARCH
|
||||
PS4_TITLE_NAME := RetroArch
|
||||
|
||||
PC_DEVELOPMENT_IP_ADDRESS = 192.168.1.137
|
||||
PC_DEVELOPMENT_UDP_PORT = 18194
|
||||
PC_DEVELOPMENT_IP_ADDRESS =
|
||||
PC_DEVELOPMENT_UDP_PORT =
|
||||
|
||||
AUTH_INFO = 000000000000000000000000001C004000FF000000000080000000000000000000000000000000000000008000400040000000000000008000000000000000080040FFFF000000F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
OBJ :=
|
||||
|
||||
OBJ += deps/xxHash/xxhash.o \
|
||||
# input/drivers/ps4_input.o \
|
||||
# input/drivers_joypad/ps4_joypad.o \
|
||||
# audio/drivers/psp_audio.o \
|
||||
# gfx/drivers_context/orbis_ctx.o \
|
||||
# frontend/drivers/platform_orbis.o
|
||||
|
||||
ifeq ($(HAVE_GLES3),1)
|
||||
DEFINES += -DHAVE_OPENGLES3
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
endif
|
||||
DEFINES :=
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1
|
||||
DEFINES += -DHAVE_MENU -DHAVE_LIBRETRODB -DHAVE_CONFIGFILE
|
||||
DEFINES += -DHAVE_RPNG -DHAVE_RWEBP -DHAVE_RDDS -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_CORE_INFO_CACHE
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEFINES += -DHAVE_NETLOGGER
|
||||
endif
|
||||
else
|
||||
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_LANGEXTRA := 1
|
||||
HAVE_IMAGEVIEWER := 1
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RWEBP := 1
|
||||
HAVE_RDDS := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_EGL := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_GLSL := 1
|
||||
HAVE_SHADERPIPELINE := 1
|
||||
HAVE_OPENGL := 1
|
||||
HAVE_OPENGLES := 1
|
||||
HAVE_OPENGLES2 := 1
|
||||
HAVE_NETWORKING := 0
|
||||
HAVE_IFINFO := 0
|
||||
HAVE_SOCKET_LEGACY := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_RGUI := 1
|
||||
HAVE_RVORBIS := 1
|
||||
HAVE_RFLAC := 1
|
||||
HAVE_RMP3 := 1
|
||||
HAVE_MATERIALUI := 1
|
||||
HAVE_XMB := 1
|
||||
HAVE_OZONE := 1
|
||||
HAVE_RGUI := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_THREAD_ATTR := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_CC_RESAMPLER := 1
|
||||
HAVE_CHEEVOS := 0
|
||||
HAVE_RUNAHEAD := 1
|
||||
RARCH_CONSOLE := 1
|
||||
HAVE_MAIN := 1
|
||||
HAVE_ONLINE_UPDATER := 1
|
||||
HAVE_COMPRESSION := 1
|
||||
HAVE_UPDATE_ASSETS := 1
|
||||
HAVE_UPDATE_CORES := 1
|
||||
HAVE_UPDATE_CORE_INFO := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_CHD := 1
|
||||
HAVE_LANGEXTRA := 0
|
||||
HAVE_RPNG := 1
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_EGL := 1
|
||||
HAVE_GFX_WIDGETS := 1
|
||||
HAVE_GLSL := 1
|
||||
HAVE_OPENGLES := 1
|
||||
HAVE_NETWORKING := 0
|
||||
HAVE_SOCKET_LEGACY := 0
|
||||
HAVE_MENU := 1
|
||||
HAVE_MENU_COMMON := 1
|
||||
HAVE_CONFIGFILE := 1
|
||||
HAVE_RGUI := 0
|
||||
HAVE_MATERIALUI := 0
|
||||
HAVE_XMB := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_LIBRETRODB := 1
|
||||
HAVE_CC_RESAMPLER := 1
|
||||
HAVE_CHEEVOS := 1
|
||||
RARCH_CONSOLE := 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_CORE_INFO_CACHE := 1
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
HAVE_NETLOGGER = 1
|
||||
@@ -98,143 +59,107 @@ else
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(ORBISDEV)),)
|
||||
$(error "Please set ORBISDEV in your environment. export ORBISDEV=<path to>orbisdev")
|
||||
ifeq ($(strip $(PS4SDK)),)
|
||||
$(error "Please set PS4SDK in your environment. export PS4SDK=<path to>ps4sdk")
|
||||
endif
|
||||
|
||||
PREFIX := orbis-
|
||||
CC := clang
|
||||
CXX := clang++
|
||||
AS := $(PREFIX)as
|
||||
export PATH := $(PATH):$(PS4SDK)/bin
|
||||
|
||||
PREFIX :=
|
||||
|
||||
CC := $(PREFIX)clang
|
||||
CXX := $(PREFIX)clang
|
||||
AS := $(PREFIX)clang
|
||||
AR := $(PREFIX)ar
|
||||
OBJCOPY := $(PREFIX)objcopy
|
||||
STRIP := $(PREFIX)strip
|
||||
NM := $(PREFIX)nm
|
||||
LD := clang
|
||||
LD := $(CXX)
|
||||
|
||||
LIBDIRS += -L. -Lcores -Lbuild -L$(ORBISDEV)/usr/lib
|
||||
INCDIRS += -I. -Idefines -Ideps -Ilibretro-common/include -Ideps/rcheevos/include -I$(ORBISDEV)/usr/include -I$(ORBISDEV)/usr/include/c++/v1 -I$(ORBISDEV)/usr/include/orbis
|
||||
INCDIRS := -I. -Ideps/7zip -Ilibretro-common/include -Ideps/stb -Ilibretro-common/include/compat/zlib
|
||||
LIBDIRS := -L.
|
||||
|
||||
ARCHFLAGS += --target=x86_64-scei-ps4 -DORBIS -D__ORBIS__ -D__PS4__ -D_BSD_SOURCE
|
||||
DEFINES += -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_FILTERS_BUILTIN \
|
||||
-DHAVE_XMB -DHAVE_RGUI -DHAVE_OZONE \
|
||||
-DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_CORES -DHAVE_UPDATE_CORE_INFO -DHAVE_UPDATE_ASSETS \
|
||||
ARCHFLAGS := -m64 -DORBIS
|
||||
CFLAGS += $(ARCHFLAGS) -std=c11 -mcmodel=large -ffreestanding -nostdlib -nostdinc -fno-builtin -fno-stack-protector
|
||||
|
||||
# Compiling with -Werror and disabling some warnings
|
||||
DEFINES += -Werror -Wno-macro-redefined -Wno-typedef-redefinition -Wno-non-literal-null-conversion -Wno-void-pointer-to-int-cast \
|
||||
-Wno-format -Wno-tautological-constant-out-of-range-compare -Wno-implicit-function-declaration
|
||||
|
||||
ifeq ($(HAVE_KEYBOARD), 1)
|
||||
DEFINES += -DHAVE_KEYBOARD
|
||||
PS4_LIBS += -lSceDbgKeyboard_stub
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O2 -g
|
||||
else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_MOUSE),1)
|
||||
DEFINES += -DHAVE_MOUSE
|
||||
PS4_LIBS += -lSceMouse_stub
|
||||
endif
|
||||
ASFLAGS := $(ARCHFLAGS) -I$(PS4SDK)/include -target x86_64-scei-ps4-elf -fPIE
|
||||
LDFLAGS := -O3 -Wall -m64 -nostartfiles -nostdlib -L$(PS4SDK)/lib -pie
|
||||
ARFLAGS := rcs
|
||||
|
||||
CRTFILE ?= $(PS4SDK)/crt0.s
|
||||
|
||||
CFLAGS += -Wall -pedantic -Wno-zero-length-array -Wno-format-pedantic
|
||||
CFLAGS += -D__PS4__ -I$(PS4SDK)/include -I $(PS4SDK)/include/sce
|
||||
CFLAGS += -target x86_64-scei-ps4-elf -fPIE
|
||||
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),)
|
||||
DEFINES += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"'
|
||||
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"'
|
||||
endif
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_UDP_PORT),)
|
||||
DEFINES += -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
CFLAGS += -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := --whole-archive
|
||||
WHOLE_END := --no-whole-archive
|
||||
WHOLE_START := -Wl,--whole-archive
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
CXXFLAGS := $(CFLAGS)
|
||||
|
||||
PS4_LIBS += -luser_mem_sys -lkernel_stub -lSceLibcInternal_stub -lunwind -lc++ -lc++abi -lc++experimental \
|
||||
-lorbisLink -lkernelUtil -ldebugnet -lorbisNfs -lSceSysmodule_stub -lSceSystemService_stub -lSceNet_stub \
|
||||
-lSceUserService_stub -lScePigletv2VSH_stub -lSceVideoOut_stub -lSceGnmDriver_stub -lorbisPad \
|
||||
-lScePad_stub -lSceAudioOut_stub -lSceIme_stub -lSceNetCtl_stub -lSQLite
|
||||
PS4_LIBS := -lps4link -ldebugnet -lorbisFile -lelfloader -lorbisKeyboard -lorbis2d -lpng -lz -lorbisGl -lorbisPad -lorbisAudio -lmod -lorbisFileBrowser -lorbisXbmFont -lSceNet_stub -lScePigletv2VSH_stub -lSceSystemService_stub -lSceUserService_stub -lScePad_stub -lSceAudioOut_stub -lSceIme_stub -lSceSysmodule_stub \
|
||||
-lPs4_extension_kernel_call_standard -lPs4_extension_kernel_execute_dynlib_prepare_dlclose -lPs4_common_kernel -lPs4_common_user -lPs4_common_generic -lPs4LibCInternalAdaptive_stub -lPs4LibKernelAdaptive_stub -lSceLibcInternal_stub -lkernel_stub -lps4Kernel_stub -lPs4_base_stub_resolve_minimal -lPs4_base_kernel_dlsym_standard -lPs4_base_kernel_seek_elf_address_standard -lPs4_base_assembler_register_parameter_standard -lPs4_base_assembler_system_call_standard
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
LIBS := $(PS4_LIBS)
|
||||
else
|
||||
LIBS := $(WHOLE_START) -lretro_orbis $(WHOLE_END) $(PS4_LIBS)
|
||||
endif
|
||||
LIBS := $(WHOLE_START) -lretro_orbis $(WHOLE_END) $(PS4_LIBS)
|
||||
|
||||
TARGETS := $(TARGET).elf
|
||||
|
||||
CFLAGS := $(ARCHFLAGS) $(INCDIRS) $(DEFINES)
|
||||
CXXFLAGS := $(ARCHFLAGS) $(INCDIRS) $(DEFINES)
|
||||
LDFLAGS := $(LIBDIRS) -Wl,--gc-sections -Wl,-z -Wl,max-page-size=0x4000 -Wl,--dynamic-linker="/libexec/ld-elf.so.1" -Wl,-pie -Wl,--eh-frame-hdr -target x86_64-scei-ps4-elf -T $(ORBISDEV)/usr/lib/linker.x
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -fno-inline
|
||||
CXXFLAGS += -O0 -fno-inline
|
||||
else
|
||||
CFLAGS += -O3
|
||||
CXXFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifneq ($(V),1)
|
||||
Q := @
|
||||
endif
|
||||
|
||||
TARGETS := $(TARGET).self
|
||||
DEPFLAGS = -MT $@ -MMD -MP -MF $*.Tdepend
|
||||
POSTCOMPILE = mv -f $*.Tdepend $*.depend
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
define INFO
|
||||
CC: $(CC)
|
||||
CFLAGS: $(CFLAGS)
|
||||
CXX: $(CXX)
|
||||
CXXFLAGS: $(CXXFLAGS)
|
||||
LD: $(LD)
|
||||
LDFLAGS: $(LDFLAGS)
|
||||
LIBS: $(LIBS)
|
||||
OBJ: $(OBJ)
|
||||
OBJOUT: $(OBJOUT)
|
||||
ORBISDEV: $(ORBISDEV)
|
||||
TARGET: $(TARGET)
|
||||
endef
|
||||
export INFO
|
||||
|
||||
info:
|
||||
ifneq ($(V),1)
|
||||
@echo "$$INFO"
|
||||
endif
|
||||
|
||||
OBJOUT = -o
|
||||
%.o: %.cpp
|
||||
%.o: %.cpp %.depend
|
||||
$(CXX) -c -o $@ $< $(CXXFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
%.o: %.c
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.cpp
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CXXFLAGS) -c $(OBJOUT)$@ $<
|
||||
%.o: %.c %.depend
|
||||
$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
%.o: %.S
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
%.o: %.S %.depend
|
||||
$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
%.o: %.s
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) -c $(OBJOUT)$@ $<
|
||||
%.o: %.s %.depend
|
||||
$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
|
||||
$(POSTCOMPILE)
|
||||
|
||||
$(TARGET).elf: $(OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LD) $(ORBISDEV)/usr/lib/crt0.o $(OBJ) $(LDFLAGS) $(LIBS) -o $(TARGET).elf
|
||||
%.depend: ;
|
||||
|
||||
$(TARGET).oelf: $(TARGET).elf
|
||||
orbis-elf-create $(TARGET).elf $(TARGET).oelf
|
||||
|
||||
$(TARGET).self: $(TARGET).oelf
|
||||
python $(ORBISDEV)/bin/make_fself.py --auth-info $(AUTH_INFO) $(TARGET).oelf $(TARGET).self
|
||||
|
||||
install:
|
||||
cp $(TARGET).self $(SELF_PATH_INSTALL)/homebrew.self
|
||||
@echo "Installed!"
|
||||
$(TARGET).elf: $(OBJ) libretro_orbis.a
|
||||
$(LD) $(CRTFILE) $(OBJ) $(LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
||||
clean:
|
||||
$(Q)rm -f $(OBJ) $(TARGET).elf $(TARGET).oelf $(TARGET).self
|
||||
rm -f $(OBJ) $(TARGET).elf
|
||||
rm -f $(OBJ:.o=.depend)
|
||||
|
||||
.PHONY: clean all
|
||||
.PRECIOUS: %.depend
|
||||
|
||||
-include $(OBJ:.o=.depend)
|
||||
@@ -1,131 +0,0 @@
|
||||
TARGET := retroarch_orbis_salamander
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
|
||||
PS4_TITLE_ID := RETROARCH
|
||||
PS4_TITLE_NAME := RetroArch
|
||||
|
||||
PC_DEVELOPMENT_IP_ADDRESS = 192.168.1.137
|
||||
PC_DEVELOPMENT_UDP_PORT = 18194
|
||||
|
||||
AUTH_INFO = 000000000000000000000000001C004000FF000000000080000000000000000000000000000000000000008000400040000000000000008000000000000000080040FFFF000000F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
|
||||
|
||||
|
||||
|
||||
ifeq ($(strip $(ORBISDEV)),)
|
||||
$(error "Please set ORBISDEV in your environment. export ORBISDEV=<path to>orbisdev")
|
||||
endif
|
||||
|
||||
PREFIX := orbis-
|
||||
CC := clang
|
||||
CXX := clang++
|
||||
AS := $(PREFIX)as
|
||||
AR := $(PREFIX)ar
|
||||
OBJCOPY := $(PREFIX)objcopy
|
||||
STRIP := $(PREFIX)strip
|
||||
NM := $(PREFIX)nm
|
||||
LD := clang
|
||||
|
||||
LIBDIRS += -L. -Lcores -Lbuild -L$(ORBISDEV)/usr/lib
|
||||
INCDIRS += -I. -Idefines -Ilibretro-common/include -I$(ORBISDEV)/usr/include -I$(ORBISDEV)/usr/include/c++/v1 -I$(ORBISDEV)/usr/include/orbis
|
||||
|
||||
ARCHFLAGS += --target=x86_64-scei-ps4 -DORBIS -D__ORBIS__ -D__PS4__ -D_BSD_SOURCE
|
||||
|
||||
|
||||
DEFINES += -DORBIS -D__ORBIS__ -DIS_SALAMANDER -DRARCH_CONSOLE -D__PS4__ -D_BSD_SOURCE
|
||||
|
||||
# Compiling with -Werror and disabling some warnings
|
||||
DEFINES += -Werror -Wno-macro-redefined -Wno-typedef-redefinition -Wno-non-literal-null-conversion -Wno-void-pointer-to-int-cast \
|
||||
-Wno-format -Wno-tautological-constant-out-of-range-compare -Wno-implicit-function-declaration
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
DEFINES += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),)
|
||||
DEFINES += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"'
|
||||
endif
|
||||
|
||||
ifneq ($(PC_DEVELOPMENT_UDP_PORT),)
|
||||
DEFINES += -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
endif
|
||||
|
||||
PS4_LIBS += -luser_mem_sys -lkernel_stub -lSceLibcInternal_stub -lunwind -lc++ -lc++abi -lc++experimental \
|
||||
-lorbisLink -lkernelUtil -ldebugnet -lorbisNfs -lSceSysmodule_stub -lSceSystemService_stub -lSceNet_stub \
|
||||
-lSceUserService_stub -lScePigletv2VSH_stub -lSceVideoOut_stub -lSceGnmDriver_stub -lorbisPad \
|
||||
-lScePad_stub -lSceAudioOut_stub -lSceIme_stub -lSceNetCtl_stub -lSQLite
|
||||
|
||||
|
||||
LIBS := $(PS4_LIBS)
|
||||
|
||||
|
||||
CFLAGS := $(ARCHFLAGS) $(INCDIRS) $(DEFINES)
|
||||
CXXFLAGS := $(ARCHFLAGS) $(INCDIRS) $(DEFINES)
|
||||
LDFLAGS := $(LIBDIRS) -Wl,--gc-sections -Wl,-z -Wl,max-page-size=0x4000 -Wl,--dynamic-linker="/libexec/ld-elf.so.1" -Wl,-pie -Wl,--eh-frame-hdr -target x86_64-scei-ps4-elf -T $(ORBISDEV)/usr/lib/linker.x
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -fno-inline
|
||||
CXXFLAGS += -O0 -fno-inline
|
||||
else
|
||||
CFLAGS += -O3
|
||||
CXXFLAGS += -O3
|
||||
endif
|
||||
|
||||
OBJS = frontend/frontend_salamander.o \
|
||||
frontend/frontend_driver.o \
|
||||
frontend/drivers/platform_orbis.o \
|
||||
libretro-common/file/file_path.o \
|
||||
libretro-common/file/file_path_io.o \
|
||||
libretro-common/string/stdstring.o \
|
||||
libretro-common/lists/string_list.o \
|
||||
libretro-common/lists/dir_list.o \
|
||||
libretro-common/file/retro_dirent.o \
|
||||
libretro-common/encodings/encoding_utf.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/compat/fopen_utf8.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/file/config_file_io.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/time/rtime.o \
|
||||
network/net_logger.o \
|
||||
verbosity.o
|
||||
|
||||
TARGETS := $(TARGET).elf
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
OBJOUT = -o
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.S
|
||||
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
|
||||
|
||||
%.o: %.s
|
||||
$(CC) -c $(OBJOUT)$@ $<
|
||||
|
||||
$(TARGET).elf: $(OBJ)
|
||||
$(LD) $(ORBISDEV)/usr/lib/crt0.o $(OBJ) $(LDFLAGS) $(LIBS) -o $(TARGET).elf
|
||||
|
||||
$(TARGET).oelf: $(TARGET).elf
|
||||
@orbis-elf-create $(TARGET).elf $(TARGET).oelf
|
||||
|
||||
$(TARGET).self: $(TARGET).oelf
|
||||
python $(ORBISDEV)/bin/make_fself.py --auth-info $(AUTH_INFO) $(TARGET).oelf $(TARGET).self
|
||||
|
||||
install:
|
||||
@cp $(TARGET).self $(SELF_PATH_INSTALL)/homebrew.self
|
||||
@echo "Installed!"
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(TARGET).elf $(TARGET).oelf $(TARGET).self
|
||||
|
||||
.PHONY: clean all
|
||||
+7
-2
@@ -11,16 +11,20 @@ all: $(BINDIR)/retroarch
|
||||
|
||||
pnd: retroarch.pnd
|
||||
|
||||
install: all $(BINDIR)/retroarch-zip $(PNDDIR)/readme.html
|
||||
install: all $(BINDIR)/retroarch-joyconfig $(BINDIR)/retroarch-zip $(PNDDIR)/readme.html
|
||||
|
||||
retroarch:
|
||||
./configure --prefix=$PND_BASEDIR/$PRJ --disable-ffmpeg --disable-cg --disable-pulse --disable-jack --enable-opengles
|
||||
./configure --prefix=$PND_BASEDIR/$PRJ --disable-ffmpeg --disable-cg --disable-python --disable-libpng --disable-pulse --disable-jack --enable-gles --enable-xml
|
||||
make -f Makefile
|
||||
|
||||
$(BINDIR)/retroarch: retroarch
|
||||
mkdir -p $(BINDIR)
|
||||
cp retroarch $(BINDIR)/retroarch
|
||||
|
||||
$(BINDIR)/retroarch-joyconfig: tools/retroarch-joyconfig
|
||||
mkdir -p $(BINDIR)
|
||||
cp tools/retroarch-joyconfig $(BINDIR)/retroarch-joyconfig
|
||||
|
||||
$(BINDIR)/retroarch-zip: retroarch-zip
|
||||
mkdir -p $(BINDIR)
|
||||
cp retroarch-zip $(BINDIR)/retroarch-zip
|
||||
@@ -45,5 +49,6 @@ clean:
|
||||
rm -f input/*.o
|
||||
rm -f tools/*.o
|
||||
rm -f $(BINDIR)/retroarch
|
||||
rm -f $(BINDIR)/retroarch-joyconfig
|
||||
rm -f $(PNDDIR)/readme.html
|
||||
rm -f retroarch
|
||||
+81
-124
@@ -1,103 +1,84 @@
|
||||
TARGET := retroarch_ps2
|
||||
TARGET_RELEASE = retroarchps2.elf
|
||||
|
||||
BUILD_FOR_PCSX2 = 0
|
||||
DEBUG = 0
|
||||
SCREEN_DEBUG = 0
|
||||
GRIFFIN_BUILD = 0
|
||||
HAVE_KERNEL_PRX = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FILE_LOGGER = 0
|
||||
HAVE_THREADS = 0
|
||||
BIG_STACK = 0
|
||||
MUTE_WARNINGS = 1
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
HAVE_STATIC_DUMMY ?= 0
|
||||
PS2_IP = 192.168.1.10
|
||||
PS2_IP = 192.168.1.150
|
||||
|
||||
TARGET = retroarchps2.elf
|
||||
TARGET_RELEASE = retroarchps2-release.elf
|
||||
|
||||
# Lib CDVD
|
||||
CDVD_DIR = ps2/libcdvd
|
||||
|
||||
# Compile the IRXs first
|
||||
IRX_DIR = ps2/irx
|
||||
IRX_FILES = $(wildcard ps2/irx/*.c)
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_LV := -O0 -g
|
||||
DEFINES += -DDEBUG
|
||||
RARCH_DEFINES += -DDEBUG
|
||||
else
|
||||
OPTIMIZE_LV := -O3
|
||||
OPTIMIZE_LV := -O2
|
||||
LDFLAGS := -s
|
||||
endif
|
||||
|
||||
ifeq ($(MUTE_WARNINGS), 1)
|
||||
DISABLE_WARNINGS := -Wno-unused -Wno-format -Wno-format-truncation
|
||||
DISABLE_WARNINGS := -Wno-sign-compare -Wno-unused -Wno-parentheses
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_STATIC_DUMMY),1)
|
||||
DEFINES += -DHAVE_STATIC_DUMMY
|
||||
else
|
||||
LIBS += -lretro_ps2
|
||||
endif
|
||||
|
||||
ifeq ($(SCREEN_DEBUG), 1)
|
||||
LIBS += -ldebug
|
||||
DEFINES += -DSCREEN_DEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_FOR_PCSX2), 1)
|
||||
DEFINES += -DBUILD_FOR_PCSX2
|
||||
endif
|
||||
|
||||
DEFINES += -DRARCH_INTERNAL -DRARCH_CONSOLE
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DHAVE_REWIND -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS
|
||||
DEFINES += -DHAVE_RPNG -DHAVE_RWEBP -DHAVE_RDDS -DHAVE_RJPEG -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER -DHAVE_AUDIOMIXER
|
||||
DEFINES += -DHAVE_VIDEO_FILTER -DHAVE_RGUI -DHAVE_WINDOW_OFFSET
|
||||
DEFINES += -DHAVE_DSP_FILTER
|
||||
else
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RWEBP = 1
|
||||
HAVE_RDDS = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_PATCH = 0 # disabled because <lzma.h> isn't available (or we haven't figured out how to install it)
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_SCREENSHOTS = 1
|
||||
HAVE_REWIND = 1
|
||||
HAVE_AUDIOMIXER = 1
|
||||
HAVE_RWAV = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_WINDOW_OFFSET = 1
|
||||
|
||||
include Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
INCDIRS += $(INCLUDE_DIRS)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(PS2SDK)),)
|
||||
$(error "Please set PS2SDK in your environment. export PS2SDK=<path to>ps2sdk")
|
||||
endif
|
||||
|
||||
ifneq ($(V),1)
|
||||
Q := @
|
||||
endif
|
||||
|
||||
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include
|
||||
INCDIR += -Ilibretro-common/include -Ideps
|
||||
|
||||
LDFLAGS += -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ports/lib -L.
|
||||
# Lib cdvd is needed to get proper time
|
||||
LIBS += -lpatches -lgskit -ldmakit -lps2_drivers -lelf-loader
|
||||
|
||||
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) $(DEFINES) -DPS2 -fsingle-precision-constant -ffast-math
|
||||
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include -I$(CDVD_DIR)/ee
|
||||
INCDIR += -Ips2 -Ips2/include -Ilibretro-common/include -Ideps -Ideps/stb -Ideps/7zip
|
||||
INCDIR += -Ideps/pthreads -Ideps/pthreads/platform/ps2 -Ideps/pthreads/platform/helper
|
||||
GPVAL = -G0
|
||||
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
EE_OBJS += $(OBJ)
|
||||
RARCH_DEFINES += -DPS2 -DUSE_IOP_CTYPE_MACRO -D_MIPS_ARCH_R5900 -DHAVE_ZLIB -DHAVE_NO_BUILTINZLIB -DHAVE_RPNG -DHAVE_RJPEG
|
||||
RARCH_DEFINES += -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS += -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L$(CDVD_DIR)/lib -L.
|
||||
LIBS += -lretro_ps2 -lgskit -ldmakit -lgskit_toolkit -laudsrv -lmf -lpadx -lmtap -lmc -lhdd -lsdl -lfileXio -lz
|
||||
LIBS += -lcdvdfs -lpatches -lpoweroff
|
||||
|
||||
ifeq ($(BUILD_FOR_PCSX2), 1)
|
||||
RARCH_DEFINES += -DBUILD_FOR_PCSX2
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
RARCH_DEFINES += -DHAVE_THREADS
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_KERNEL_PRX), 1)
|
||||
CFLAGS += -DHAVE_KERNEL_PRX
|
||||
endif
|
||||
|
||||
ifeq ($(BIG_STACK), 1)
|
||||
CFLAGS += -DBIG_STACK
|
||||
endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
# All the IRX objects
|
||||
EE_OBJS += $(IRX_DIR)/freemtap_irx.o $(IRX_DIR)/freepad_irx.o $(IRX_DIR)/freesio2_irx.o $(IRX_DIR)/iomanX_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/fileXio_irx.o $(IRX_DIR)/mcman_irx.o $(IRX_DIR)/mcserv_irx.o $(IRX_DIR)/usbd_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/usbhdfsd_irx.o $(IRX_DIR)/freesd_irx.o $(IRX_DIR)/audsrv_irx.o $(IRX_DIR)/poweroff_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/cdvd_irx.o
|
||||
|
||||
# Missing objecst on the PS2SDK
|
||||
EE_OBJS += ps2/compat_files/compat_ctype.o ps2/compat_files/time.o ps2/compat_files/ps2_devices.o
|
||||
EE_OBJS += ps2/compat_files/fileXio_cdvd.o ps2/compat_files/ps2_descriptor.o
|
||||
|
||||
#EE_OBJS = griffin/griffin.o bootstrap/ps2/kernel_functions.o
|
||||
EE_OBJS += griffin/griffin.o
|
||||
|
||||
EE_CFLAGS = $(CFLAGS)
|
||||
EE_CXXFLAGS = $(CFLAGS)
|
||||
@@ -105,30 +86,18 @@ EE_LDFLAGS = $(LDFLAGS)
|
||||
EE_LIBS = $(LIBS)
|
||||
EE_ASFLAGS = $(ASFLAGS)
|
||||
EE_INCS = $(INCDIR)
|
||||
EE_BIN = $(TARGET).elf
|
||||
EE_BIN = $(TARGET)
|
||||
EE_GPVAL = $(GPVAL)
|
||||
|
||||
all: $(EE_BIN)
|
||||
|
||||
define INFO
|
||||
EE_BIN: $(EE_BIN)
|
||||
EE_CC: $(EE_CC)
|
||||
EE_CFLAGS: $(EE_CFLAGS)
|
||||
EE_CXX: $(EE_CXX)
|
||||
EE_CXXFLAGS: $(EE_CXXFLAGS)
|
||||
EE_INCS: $(EE_INCS)
|
||||
EE_OBJS: $(EE_OBJS)
|
||||
endef
|
||||
export INFO
|
||||
all: irxdir $(EE_BIN)
|
||||
|
||||
info:
|
||||
ifneq ($(V),1)
|
||||
@echo "$$INFO"
|
||||
endif
|
||||
irxdir:
|
||||
$(MAKE) -C $(IRX_DIR)
|
||||
|
||||
clean:
|
||||
@$(if $(Q), $(shell echo echo RM $<),)
|
||||
$(Q)rm -f $(EE_BIN) $(EE_OBJS)
|
||||
rm -f $(EE_BIN) $(EE_OBJS)
|
||||
$(MAKE) -C $(IRX_DIR) clean
|
||||
|
||||
prepare:
|
||||
ps2client -h $(PS2_IP) reset
|
||||
@@ -137,30 +106,18 @@ prepare:
|
||||
run:
|
||||
ps2client -h $(PS2_IP) execee host:$(EE_BIN)
|
||||
|
||||
sim:
|
||||
ifeq ($(shell uname), Darwin)
|
||||
/Applications/PCSX2.app/Contents/MacOS/PCSX2 -elf $(PWD)/$(EE_BIN)
|
||||
else
|
||||
PCSX2 -elf $(PWD)/$(EE_BIN) -nogui
|
||||
endif
|
||||
debug: clean prepare all run
|
||||
|
||||
debug: clean all run
|
||||
|
||||
release: all
|
||||
package:
|
||||
ps2-packer $(EE_BIN) $(TARGET_RELEASE)
|
||||
|
||||
release: clean all package
|
||||
|
||||
#Include preferences
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal_cpp
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal
|
||||
|
||||
%.o: %.c
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@
|
||||
|
||||
%.o: %.cc
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(EE_CXX) $(EE_CXXFLAGS) $(EE_INCS) -c $< -o $@
|
||||
|
||||
%.o: %.cpp
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(EE_CXX) $(EE_CXXFLAGS) $(EE_INCS) -c $< -o $@
|
||||
#Linking with C++
|
||||
$(EE_BIN): $(EE_OBJS) $(PS2SDK)/ee/startup/crt0.o
|
||||
$(EE_CXX) $(EE_NO_CRT) -T$(PS2SDK)/ee/startup/linkfile $(EE_CXXFLAGS) \
|
||||
-o $(EE_BIN) $(PS2SDK)/ee/startup/crt0.o $(CRTI_OBJ) $(CRTBEGIN_OBJ) $(EE_OBJS) $(CRTEND_OBJ) $(CRTN_OBJ) $(EE_LDFLAGS) $(EE_LIBS)
|
||||
@@ -1,90 +0,0 @@
|
||||
BUILD_FOR_PCSX2 = 0
|
||||
DEBUG = 0
|
||||
SCREEN_DEBUG = 0
|
||||
MUTE_WARNINGS = 1
|
||||
PS2_IP = 192.168.1.150
|
||||
|
||||
TARGET = raboot-debug.elf
|
||||
TARGET_RELEASE = raboot.elf
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OPTIMIZE_LV := -O0 -g
|
||||
RARCH_DEFINES += -DDEBUG
|
||||
else
|
||||
OPTIMIZE_LV := -O3
|
||||
LDFLAGS := -s
|
||||
endif
|
||||
|
||||
ifeq ($(MUTE_WARNINGS), 1)
|
||||
DISABLE_WARNINGS := -Wno-unused -Wno-format -Wno-format-truncation
|
||||
endif
|
||||
|
||||
INCDIR = -Ilibretro-common/include
|
||||
INCDIR += -I$(PS2SDK)/ports/include
|
||||
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -fsingle-precision-constant -ffast-math
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES += -DPS2 -DIS_SALAMANDER -DRARCH_CONSOLE
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS += -L$(PS2SDK)/ports/lib
|
||||
LIBS = -lelf-loader -lps2_drivers -lpatches
|
||||
|
||||
ifeq ($(SCREEN_DEBUG), 1)
|
||||
LIBS += -ldebug
|
||||
RARCH_DEFINES += -DSCREEN_DEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_FOR_PCSX2), 1)
|
||||
RARCH_DEFINES += -DBUILD_FOR_PCSX2
|
||||
endif
|
||||
|
||||
CFLAGS += $(RARCH_DEFINES)
|
||||
|
||||
EE_OBJS = frontend/frontend_salamander.o \
|
||||
frontend/frontend_driver.o \
|
||||
frontend/drivers/platform_ps2.o \
|
||||
libretro-common/file/file_path.o \
|
||||
libretro-common/file/file_path_io.o \
|
||||
libretro-common/string/stdstring.o \
|
||||
libretro-common/lists/string_list.o \
|
||||
libretro-common/lists/dir_list.o \
|
||||
libretro-common/file/retro_dirent.o \
|
||||
libretro-common/encodings/encoding_utf.o \
|
||||
libretro-common/compat/fopen_utf8.o \
|
||||
libretro-common/compat/compat_strl.o \
|
||||
libretro-common/compat/compat_strldup.o \
|
||||
libretro-common/compat/compat_strcasestr.o \
|
||||
libretro-common/file/config_file.o \
|
||||
libretro-common/file/config_file_io.o \
|
||||
libretro-common/streams/file_stream.o \
|
||||
libretro-common/vfs/vfs_implementation.o \
|
||||
libretro-common/hash/lrc_hash.o \
|
||||
libretro-common/time/rtime.o \
|
||||
verbosity.o
|
||||
|
||||
EE_CFLAGS = $(CFLAGS)
|
||||
EE_CXXFLAGS = $(CFLAGS)
|
||||
EE_LDFLAGS = $(LDFLAGS)
|
||||
EE_LIBS = $(LIBS)
|
||||
EE_ASFLAGS = $(ASFLAGS)
|
||||
EE_INCS = $(INCDIR)
|
||||
EE_BIN = $(TARGET)
|
||||
EE_GPVAL = $(GPVAL)
|
||||
|
||||
all: $(EE_BIN)
|
||||
|
||||
clean:
|
||||
rm -f $(EE_BIN) $(EE_OBJS)
|
||||
|
||||
debug: clean all run
|
||||
|
||||
run:
|
||||
ps2client -h $(PS2_IP) execee host:$(EE_BIN)
|
||||
|
||||
release: all
|
||||
ps2-packer $(EE_BIN) $(TARGET_RELEASE)
|
||||
|
||||
#Include preferences
|
||||
include $(PS2SDK)/samples/Makefile.pref
|
||||
include $(PS2SDK)/samples/Makefile.eeglobal_cpp
|
||||
+207
@@ -0,0 +1,207 @@
|
||||
include version.all
|
||||
|
||||
#which compiler to build with - GCC or SNC
|
||||
#set to GCC for debug builds for use with debugger
|
||||
CELL_BUILD_TOOLS = SNC
|
||||
CELL_GPU_TYPE = RSX
|
||||
CELL_PSGL_VERSION = opt
|
||||
|
||||
ASSETS_DIR := media/assets
|
||||
|
||||
# options
|
||||
DOWNLOAD_SHADERS = 1
|
||||
STRIPPING_ENABLE = 0
|
||||
DEBUG = 0
|
||||
HAVE_GCMGL = 0
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FREETYPE = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001
|
||||
CONTENT_ID = SSNE10000
|
||||
|
||||
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7"
|
||||
PC_DEVELOPMENT_UDP_PORT = 3490
|
||||
|
||||
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
|
||||
include $(CELL_MK_DIR)/sdk.makedef.mk
|
||||
|
||||
PPU_TARGET = retroarch_ps3.elf
|
||||
SALAMANDER_TARGET = retroarch-salamander_ps3.elf
|
||||
|
||||
EBOOT_PATH = pkg/ps3/USRDIR/EBOOT.BIN
|
||||
CORE_PATH = pkg/ps3/USRDIR/cores/CORE.SELF
|
||||
|
||||
LDDIRS = -L. -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt
|
||||
INCDIRS = -I. \
|
||||
-Idefines \
|
||||
-Ideps \
|
||||
-Ideps/stb \
|
||||
-Ideps/rcheevos/include \
|
||||
-Ilibretro-common/include \
|
||||
-Ilibretro-common/include/compat/zlib
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
ifeq ($(shell uname -a),)
|
||||
EXE_EXT = .exe
|
||||
system_platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
system_platform = osx
|
||||
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
||||
system_platform = win
|
||||
endif
|
||||
|
||||
PKG_SCRIPT = tools/ps3/ps3py/pkg.py
|
||||
ifeq ($(shell uname), Linux)
|
||||
PKG_FINALIZE = package_finalize
|
||||
MAKE_SELF_WC = make_self_wc
|
||||
MAKE_SELF = make_self_npdrm
|
||||
PYTHON2 = python2
|
||||
GIT = git
|
||||
else
|
||||
PKG_FINALIZE = package_finalize.exe
|
||||
MAKE_SELF_WC = make_self_wc.exe
|
||||
MAKE_SELF = make_self_npdrm.exe
|
||||
PYTHON2 = python2.exe
|
||||
GIT = git.exe
|
||||
endif
|
||||
|
||||
PPU_SRCS = griffin/griffin.c
|
||||
|
||||
DEFINES += -DHAVE_VIDEO_LAYOUT
|
||||
DEFINES += -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_GFX_WIDGETS -DHAVE_RGUI -DHAVE_XMB -DHAVE_OZONE -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT -DHAVE_RUNAHEAD -DHAVE_DR_MP3 -DHAVE_DR_FLAC
|
||||
DEFINES += -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES
|
||||
|
||||
ifeq ($(DEX_BUILD), 1)
|
||||
DEFINES += -DDEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(CEX_BUILD), 1)
|
||||
DEFINES += -DCEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(ODE_BUILD), 1)
|
||||
DEFINES += -DODE_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GCMGL), 1)
|
||||
DEFINES += -DHAVE_GCMGL
|
||||
GL_LIBS := -L. -lrgl_ps3
|
||||
else
|
||||
GL_LIBS := -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt -lPSGL -lPSGLcgc
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FREETYPE), 1)
|
||||
DEFINES += -DHAVE_FREETYPE
|
||||
FONT_LIBS := -lfontFT_stub -lfreetype_stub
|
||||
endif
|
||||
|
||||
ifeq ($(CELL_BUILD_TOOLS), SNC)
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
else ifneq ($(system_platform), win)
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
PPU_CCLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl, --whole-archive
|
||||
WHOLE_END := -Wl, --no-whole-archive
|
||||
endif
|
||||
|
||||
PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -lcgc -lgcm_cmdasm -lgcm_sys_stub -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lsysutil_np_stub -lpngdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lnetctl_stub -lpthread
|
||||
|
||||
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
||||
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LANGEXTRA -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_CHEEVOS -DRC_DISABLE_LUA
|
||||
|
||||
#DEFINES += -DHAVE_IMAGEVIEWER
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
PPU_OPTIMIZE_LV := -O2 -g
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
DEFINES += -DHAVE_LOGGER
|
||||
endif
|
||||
|
||||
PPU_CFLAGS := $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
||||
PPU_CXXFLAGS := $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
||||
|
||||
EXIST_EBOOT_WILDCARD := $(wildcard $(EBOOT_PATH))
|
||||
EXIST_CORE_WILDCARD := $(wildcard $(CORE_PATH))
|
||||
|
||||
EBOOT_EXISTS = 1
|
||||
CORE_EXISTS = 1
|
||||
|
||||
ifneq ($(strip $(EXIST_EBOOT_WILDCARD)),)
|
||||
EBOOT_EXISTS = 0
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(EXIST_CORE_WILDCARD)),)
|
||||
CORE_EXISTS = 0
|
||||
endif
|
||||
|
||||
include $(CELL_MK_DIR)/sdk.target.mk
|
||||
|
||||
MAKE_FSELF = $(CELL_SDK)/host-win32/bin/make_fself.exe
|
||||
MAKE_FSELF_NPDRM = $(CELL_SDK)/host-win32/bin/make_fself_npdrm.exe
|
||||
MAKE_PACKAGE_NPDRM = $(CELL_SDK)/host-win32/bin/make_package_npdrm.exe
|
||||
|
||||
.PHONY: create-npdrm-core create-core create-npdrm-salamander create-shaders clean-selfs create-salamander
|
||||
|
||||
create-npdrm-core:
|
||||
$(MAKE_FSELF_NPDRM) $(PPU_TARGET) $(CORE_PATH)
|
||||
|
||||
create-core:
|
||||
$(MAKE_SELF_WC) $(PPU_TARGET) $(CORE_PATH)
|
||||
|
||||
create-npdrm-salamander:
|
||||
$(MAKE_FSELF_NPDRM) $(SALAMANDER_TARGET) $(EBOOT_PATH)
|
||||
|
||||
create-salamander:
|
||||
$(MAKE_SELF) $(SALAMANDER_TARGET) $(EBOOT_PATH) $(CONTENT_ID_FULL)
|
||||
|
||||
copy-media-files:
|
||||
@cp -r $(ASSETS_DIR)/glui pkg/ps3/USRDIR/cores/assets
|
||||
@cp -r $(ASSETS_DIR)/xmb pkg/ps3/USRDIR/cores/assets
|
||||
|
||||
create-shaders:
|
||||
make -f Makefile.griffin platform=ps3 shaders-deploy
|
||||
|
||||
pkg: $(PPU_TARGET) create-shaders copy-media-files create-npdrm-salamander create-npdrm-core
|
||||
$(MAKE_PACKAGE_NPDRM) pkg/ps3/package.conf pkg/ps3
|
||||
|
||||
pkg-signed: $(PPU_TARGET) create-shaders copy-media-files create-salamander create-core
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
|
||||
pkg-signed-standalone: $(PPU_TARGET) create-shaders copy-media-files create-core
|
||||
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
|
||||
pkg-signed-cfw: $(PPU_TARGET) create-shaders copy-media-files create-salamander create-core
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
$(PKG_FINALIZE) retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
|
||||
pkg-signed-cfw-standalone: $(PPU_TARGET) create-shaders copy-media-files create-core
|
||||
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
$(PKG_FINALIZE) retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
|
||||
clean-selfs:
|
||||
ifeq ($(EBOOT_EXISTS),1)
|
||||
@echo "WARNING: Couldn't find file to delete: [$(EBOOT_PATH)], skipping this step."
|
||||
else
|
||||
rm $(EBOOT_PATH)
|
||||
endif
|
||||
ifeq ($(CORE_EXISTS),1)
|
||||
@echo "WARNING: Couldn't find file to delete: [$(CORE_PATH)], skipping this step."
|
||||
else
|
||||
rm $(CORE_PATH)
|
||||
endif
|
||||
@@ -0,0 +1,196 @@
|
||||
include version.all
|
||||
|
||||
#which compiler to build with - GCC or SNC
|
||||
#set to GCC for debug builds for use with debugger
|
||||
CELL_BUILD_TOOLS = GCC
|
||||
CELL_GPU_TYPE = RSX
|
||||
CELL_PSGL_VERSION = ultra-opt
|
||||
|
||||
# options
|
||||
DOWNLOAD_SHADERS = 1
|
||||
STRIPPING_ENABLE = 0
|
||||
DEBUG = 0
|
||||
HAVE_GCMGL = 1
|
||||
HAVE_LOGGER = 0
|
||||
HAVE_FREETYPE = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
|
||||
CONTENT_ID_FULL = UP0001-SSNE10000_00-0000000000000001
|
||||
CONTENT_ID = SSNE10000
|
||||
|
||||
PC_DEVELOPMENT_IP_ADDRESS = "192.168.1.7"
|
||||
PC_DEVELOPMENT_UDP_PORT = 3490
|
||||
|
||||
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
|
||||
include $(CELL_MK_DIR)/sdk.makedef.mk
|
||||
|
||||
PPU_TARGET = retroarch_ps3.elf
|
||||
SALAMANDER_TARGET = retroarch-salamander_ps3.elf
|
||||
|
||||
EBOOT_PATH = pkg/ps3/USRDIR/EBOOT.BIN
|
||||
CORE_PATH = pkg/ps3/USRDIR/cores/CORE.SELF
|
||||
|
||||
LDDIRS = -L. -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt
|
||||
INCDIRS = -I. -Idefines -Ideps -Ideps/stb
|
||||
|
||||
# system platform
|
||||
system_platform = unix
|
||||
ifeq ($(shell uname -a),)
|
||||
EXE_EXT = .exe
|
||||
system_platform = win
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
system_platform = osx
|
||||
else ifneq ($(findstring MINGW,$(shell uname -a)),)
|
||||
system_platform = win
|
||||
endif
|
||||
|
||||
PKG_SCRIPT = tools/ps3/ps3py/pkg.py
|
||||
ifeq ($(shell uname), Linux)
|
||||
PKG_FINALIZE = package_finalize
|
||||
MAKE_SELF_WC = make_self_wc
|
||||
MAKE_SELF = make_self_npdrm
|
||||
PYTHON2 = python2
|
||||
GIT = git
|
||||
else
|
||||
PKG_FINALIZE = package_finalize.exe
|
||||
MAKE_SELF_WC = make_self_wc.exe
|
||||
MAKE_SELF = make_self_npdrm.exe
|
||||
PYTHON2 = python2.exe
|
||||
GIT = git.exe
|
||||
endif
|
||||
|
||||
PPU_SRCS = griffin/griffin.c
|
||||
|
||||
DEFINES += -DHAVE_RGUI -DHAVE_MATERIALUI -DHAVE_XMB -DHAVE_MENU -DRARCH_INTERNAL
|
||||
|
||||
ifeq ($(DEX_BUILD), 1)
|
||||
DEFINES += -DDEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(CEX_BUILD), 1)
|
||||
DEFINES += -DCEX_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(ODE_BUILD), 1)
|
||||
DEFINES += -DODE_BUILD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GCMGL), 1)
|
||||
DEFINES += -DHAVE_GCMGL
|
||||
GL_LIBS := -L. -lrgl_ps3
|
||||
else
|
||||
GL_LIBS := -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt -lPSGL -lPSGLcgc
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FREETYPE), 1)
|
||||
DEFINES += -DHAVE_FREETYPE
|
||||
FONT_LIBS := -lfontFT_stub -lfreetype_stub
|
||||
endif
|
||||
|
||||
ifeq ($(CELL_BUILD_TOOLS), SNC)
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/sn/bin/ps3ppuld.exe
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/sn/bin/ps3ppusnc.exe
|
||||
else ifneq($(system_platform), win)
|
||||
PPU_CXX = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-g++.exe
|
||||
PPU_CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe
|
||||
PPU_CXXLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
PPU_CCLD = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ld.exe
|
||||
endif
|
||||
|
||||
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_START := -Wl, --whole-archive
|
||||
WHOLE_END := -Wl, --no-whole-archive
|
||||
endif
|
||||
|
||||
PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -lcgc -lgcm_cmdasm -lgcm_sys_stub -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lsysutil_np_stub -lpngdec_stub -ljpgdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lnetctl_stub -lpthread
|
||||
|
||||
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
||||
|
||||
#DEFINES += -DHAVE_VIDEO_LAYOUT
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=0 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_STB_VORBIS
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
PPU_OPTIMIZE_LV := -O3 -g
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
DEFINES += -DHAVE_LOGGER
|
||||
endif
|
||||
|
||||
PPU_CFLAGS := $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
||||
PPU_CXXFLAGS := $(PPU_OPTIMIZE_LV) $(INCDIRS) $(DEFINES)
|
||||
|
||||
EXIST_EBOOT_WILDCARD := $(wildcard $(EBOOT_PATH))
|
||||
EXIST_CORE_WILDCARD := $(wildcard $(CORE_PATH))
|
||||
|
||||
EBOOT_EXISTS = 1
|
||||
CORE_EXISTS = 1
|
||||
|
||||
ifneq ($(strip $(EXIST_EBOOT_WILDCARD)),)
|
||||
EBOOT_EXISTS = 0
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(EXIST_CORE_WILDCARD)),)
|
||||
CORE_EXISTS = 0
|
||||
endif
|
||||
|
||||
include $(CELL_MK_DIR)/sdk.target.mk
|
||||
|
||||
MAKE_FSELF = $(CELL_SDK)/host-win32/bin/make_fself.exe
|
||||
MAKE_FSELF_NPDRM = $(CELL_SDK)/host-win32/bin/make_fself_npdrm.exe
|
||||
MAKE_PACKAGE_NPDRM = $(CELL_SDK)/host-win32/bin/make_package_npdrm.exe
|
||||
|
||||
.PHONY: create-npdrm-core create-core create-npdrm-salamander create-shaders clean-selfs create-salamander
|
||||
|
||||
create-npdrm-core:
|
||||
$(MAKE_FSELF_NPDRM) $(PPU_TARGET) $(CORE_PATH)
|
||||
|
||||
create-core:
|
||||
$(MAKE_SELF_WC) $(PPU_TARGET) $(CORE_PATH)
|
||||
|
||||
create-npdrm-salamander:
|
||||
$(MAKE_FSELF_NPDRM) $(SALAMANDER_TARGET) $(EBOOT_PATH)
|
||||
|
||||
create-salamander:
|
||||
$(MAKE_SELF) $(SALAMANDER_TARGET) $(EBOOT_PATH) $(CONTENT_ID_FULL)
|
||||
|
||||
copy-media-files:
|
||||
@cp -r $(ASSETS_DIR)/glui pkg/ps3/USRDIR/cores/assets
|
||||
@cp -r $(ASSETS_DIR)/xmb pkg/ps3/USRDIR/cores/assets
|
||||
|
||||
create-shaders:
|
||||
make -f Makefile.shaders deploy-ps3
|
||||
|
||||
pkg: $(PPU_TARGET) create-shaders copy-media-files create-npdrm-salamander create-npdrm-core
|
||||
$(MAKE_PACKAGE_NPDRM) pkg/ps3/package.conf pkg/ps3
|
||||
|
||||
pkg-signed: $(PPU_TARGET) create-shaders copy-media-files create-salamander create-core
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
|
||||
pkg-signed-standalone: $(PPU_TARGET) create-shaders copy-media-files create-core
|
||||
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
|
||||
pkg-signed-cfw: $(PPU_TARGET) create-shaders copy-media-files create-salamander create-core
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
$(PKG_FINALIZE) retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
|
||||
pkg-signed-cfw-standalone: $(PPU_TARGET) create-shaders copy-media-files create-core
|
||||
$(MAKE_SELF) $(PPU_TARGET) $(EBOOT_PATH) $(CONTENT_ID)
|
||||
$(PYTHON2) $(PKG_SCRIPT) --contentid $(CONTENT_ID_FULL) pkg/ps3 retroarch-ps3-cfw-$(PACKAGE_VERSION).pkg
|
||||
$(PKG_FINALIZE) retroarch-ps3-cfw-$(PACKAGE_VERSION)-kmeaw.pkg
|
||||
|
||||
clean-selfs:
|
||||
ifeq ($(EBOOT_EXISTS),1)
|
||||
@echo "WARNING: Couldn't find file to delete: [$(EBOOT_PATH)], skipping this step."
|
||||
else
|
||||
rm $(EBOOT_PATH)
|
||||
endif
|
||||
ifeq ($(CORE_EXISTS),1)
|
||||
@echo "WARNING: Couldn't find file to delete: [$(CORE_PATH)], skipping this step."
|
||||
else
|
||||
rm $(CORE_PATH)
|
||||
endif
|
||||
Loaded 100 of 8772 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user