File tree Expand file tree Collapse file tree 4 files changed +44
-8
lines changed
Expand file tree Collapse file tree 4 files changed +44
-8
lines changed Original file line number Diff line number Diff line change 1+ name : Build Brus-16
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ linux :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@main
10+ - uses : libsdl-org/setup-sdl@main
11+ with :
12+ version : 3-head
13+ install-linux-dependencies : true
14+ - run : make emu
15+ - uses : actions/upload-artifact@main
16+ with :
17+ name : brus16_linux
18+ path : brus16
19+
20+ windows :
21+ runs-on : ubuntu-latest
22+ steps :
23+ - uses : actions/checkout@main
24+ - run : |
25+ sudo apt-get install -y mingw-w64
26+ wget https://github.com/libsdl-org/SDL/releases/download/prerelease-3.3.4/SDL3-devel-3.3.4-mingw.tar.gz
27+ tar -xzf SDL3-devel-3.3.4-mingw.tar.gz
28+ - run : make emu OS=Windows_NT CC=x86_64-w64-mingw32-gcc SDL=SDL3-3.3.4/x86_64-w64-mingw32
29+ - run : |
30+ mkdir release
31+ mv brus16.exe release/
32+ cp SDL3-3.3.4/x86_64-w64-mingw32/bin/SDL3.dll release/
33+ - uses : actions/upload-artifact@main
34+ with :
35+ name : brus16_windows
36+ path : release/
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ __pycache__/
88* .so
99* .dll
1010* .exe
11- SDL
11+ SDL3 *
1212
1313# Distribution / packaging
1414.Python
Original file line number Diff line number Diff line change 11from brus16 import *
22
3- save_game ('sine.bin' , f'''
3+ asm = save_game ('sine.bin' , f'''
44def main():
55 freq = { get_freq (880 )}
66 poke({ OSC_MEM + OSC_ABS } , 1)
Original file line number Diff line number Diff line change @@ -3,18 +3,18 @@ EMCC = emcc
33CFLAGS = -O2 -Wall -Wextra -Wpedantic
44LDFLAGS = -lSDL3
55SRC = src/brus16_emu.c src/brus16_cpu.c src/brus16_sfx.c
6+ TARGET = brus16
67
78ifeq ($(OS ) ,Windows_NT)
8- TARGET = brus16.exe
9- SDL = SDL/x86_64-w64-mingw32
9+ TARGET := $(TARGET).exe
10+ SDL = SDL3-3.3.4/x86_64-w64-mingw32
11+ CFLAGS += -I"$(SDL)/include"
1012 LDFLAGS += -L"$(SDL)/lib"
1113else
12- TARGET = brus16
13- SDL = SDL/include/SDL3
14+ CFLAGS += $( shell pkg-config --cflags sdl3)
15+ LDFLAGS += $( shell pkg-config --libs sdl3)
1416endif
1517
16- CFLAGS += -I"$(SDL ) /include"
17-
1818emu :
1919 $(CC ) $(CFLAGS ) -DDEBUG $(SRC ) -o $(TARGET ) $(LDFLAGS )
2020
You can’t perform that action at this time.
0 commit comments