Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions build_headless_win_opt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh
set -e

# Cross-compile a headless Windows binary from Linux/MinGW.
# Headless means no GUI/audio: stub backends from os_*_null.c.

x86_64-w64-mingw32-gcc -D__USE_MINGW_ANSI_STDIO=0 \
-Wall -Wextra -Werror \
-Wpointer-arith -Wshadow \
-Wno-unknown-warning-option -Wno-address-of-packed-member \
-Wl,--disable-dynamicbase,--image-base,0x00400000 \
-O3 -DNDEBUG -flto -DBEEBJIT_HEADLESS -o beebjit-headless.exe \
main.c config.c bbc.c defs_6502.c state.c video.c via.c \
emit_6502.c interp.c inturbo.c state_6502.c sound.c timing.c \
jit_compiler.c jit_metadata.c cpu_driver.c \
jit_optimizer.c jit_opcode.c keyboard.c \
teletext.c render.c mc6850.c serial_ula.c \
log.c test.c adc.c cmos.c joystick.c \
tape.c tape_csw.c tape_uef.c \
intel_fdc.c wd_fdc.c \
disc_drive.c disc.c ibm_disc_format.c disc_tool.c \
disc_fsd.c disc_hfe.c disc_ssd.c disc_adl.c \
disc_rfi.c disc_kryo.c disc_scp.c disc_dfi.c \
debug.c jit.c expression.c \
util.c util_string.c util_container.c util_compress.c \
os.c \
asm/asm_abi.c asm/asm_tables.c asm/asm_util.c \
asm/asm_common.c asm/asm_common.S \
asm/asm_inturbo.c asm/asm_inturbo.S \
asm/asm_jit.c asm/asm_jit.S \
-lwinmm
7 changes: 6 additions & 1 deletion os.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,16 @@
#include "os_channel_windows.c"
#include "os_fault_windows.c"
#include "os_poller_windows.c"
#include "os_sound_windows.c"
#include "os_terminal_windows.c"
#include "os_thread_windows.c"
#include "os_time_windows.c"
#if defined(BEEBJIT_HEADLESS)
#include "os_sound_null.c"
#include "os_window_null.c"
#else
#include "os_sound_windows.c"
#include "os_window_windows.c"
#endif

#else

Expand Down
1 change: 1 addition & 0 deletions os_time_windows.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "os_time.h"

#include "log.h"
#include "util.h"

#include <inttypes.h>
Expand Down