mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-19 07:31:15 +00:00
commit
abea3d10cc
40
.github/workflows/build.yml
vendored
40
.github/workflows/build.yml
vendored
@ -2,8 +2,11 @@ name: Build
|
||||
on: [pull_request]
|
||||
jobs:
|
||||
build-mac:
|
||||
name: Build Mac UI
|
||||
runs-on: macos-latest
|
||||
name: Mac UI on ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@ -11,15 +14,38 @@ jobs:
|
||||
working-directory: OSBindings/Mac
|
||||
run: xcodebuild CODE_SIGN_IDENTITY=-
|
||||
build-sdl:
|
||||
name: Build SDL UI
|
||||
runs-on: ubuntu-latest
|
||||
name: SDL UI on ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get --allow-releaseinfo-change update
|
||||
sudo apt-get --fix-missing install gcc-10 libsdl2-dev scons
|
||||
case $RUNNER_OS in
|
||||
Linux)
|
||||
sudo apt-get --allow-releaseinfo-change update
|
||||
sudo apt-get --fix-missing install gcc-10 libsdl2-dev scons
|
||||
;;
|
||||
macOS)
|
||||
brew install scons sdl2
|
||||
;;
|
||||
esac
|
||||
- name: Make
|
||||
working-directory: OSBindings/SDL
|
||||
run: scons -j$(nproc --all)
|
||||
shell: bash
|
||||
run: |
|
||||
case $RUNNER_OS in
|
||||
Linux)
|
||||
jobs=$(nproc --all)
|
||||
;;
|
||||
macOS)
|
||||
jobs=$(sysctl -n hw.activecpu)
|
||||
;;
|
||||
*)
|
||||
jobs=1
|
||||
esac
|
||||
scons -j"$jobs"
|
||||
|
@ -472,9 +472,9 @@ template <class BusHandler, bool is_iie> class Video: public VideoBase {
|
||||
// Supply the real phase value if this is an Apple build.
|
||||
// TODO: eliminate UGLY HACK.
|
||||
#if defined(__APPLE__) && !defined(IGNORE_APPLE)
|
||||
constexpr int phase = 224;
|
||||
constexpr uint8_t phase = 224;
|
||||
#else
|
||||
constexpr int phase = 0;
|
||||
constexpr uint8_t phase = 192;
|
||||
#endif
|
||||
|
||||
crt_.output_colour_burst((colour_burst_end - colour_burst_start) * 14, phase);
|
||||
|
@ -1,4 +1,5 @@
|
||||
import glob
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Establish UTF-8 encoding for Python 2.
|
||||
@ -7,7 +8,7 @@ if sys.version_info < (3, 0):
|
||||
sys.setdefaultencoding('utf-8')
|
||||
|
||||
# Create build environment.
|
||||
env = Environment()
|
||||
env = Environment(ENV = {'PATH' : os.environ['PATH']})
|
||||
|
||||
# Determine compiler and linker flags for SDL.
|
||||
env.ParseConfig('sdl2-config --cflags')
|
||||
@ -139,7 +140,14 @@ SOURCES += glob.glob('../../Storage/Tape/Parsers/*.cpp')
|
||||
env.Append(CCFLAGS = ['--std=c++17', '--std=c++1z', '-Wall', '-O2', '-DNDEBUG'])
|
||||
|
||||
# Add additional libraries to link against.
|
||||
env.Append(LIBS = ['libz', 'pthread', 'GL'])
|
||||
env.Append(LIBS = ['libz', 'pthread'])
|
||||
|
||||
# Add additional platform-specific compiler flags, libraries, and frameworks.
|
||||
if env['PLATFORM'] == 'darwin':
|
||||
env.Append(CCFLAGS = ['-DGL_SILENCE_DEPRECATION', '-DIGNORE_APPLE'])
|
||||
env.Append(FRAMEWORKS = ['Accelerate', 'OpenGL'])
|
||||
else:
|
||||
env.Append(LIBS = ['GL'])
|
||||
|
||||
# Build target.
|
||||
env.Program(target = 'clksignal', source = SOURCES)
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <memory>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
#include <SDL.h>
|
||||
|
||||
#include "../../Analyser/Static/StaticAnalyser.hpp"
|
||||
#include "../../Machines/Utility/MachineForTarget.hpp"
|
||||
|
Loading…
x
Reference in New Issue
Block a user