Skip to content

Add a CMakeLists.txt #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
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
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Build and test artifacts.
beebjit
beebjit.exe
make_perf_rom
make_test_rom
make_timing_rom
Expand All @@ -9,3 +8,10 @@ test.rom
timing.rom
/.dir-locals.el
/TAGS

# CLion/Cmake crap
cmake-*
.idea

# Linux perf profiler
perf.data*
30 changes: 30 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
cmake_minimum_required(VERSION 3.4)
project(beebjit)

set_property(SOURCE <myfile>.S PROPERTY LANGUAGE C)

set(BEEBJIT_ASM_FILES asm_x64_common.S asm_x64_inturbo.S asm_x64_jit.S)

add_compile_options(-no-pie)
add_link_options(-no-pie)

foreach (ASM_SRC ${BEEBJIT_ASM_FILES})
set_property(SOURCE ${ASM_SRC} PROPERTY LANGUAGE C)
endforeach ()

set(BEEBJIT_SRC_FILES
main.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 cpu_driver.c asm_x64_abi.c asm_tables.c
asm_x64_common.c asm_x64_inturbo.c asm_x64_jit.c
asm_x64_common.S asm_x64_inturbo.S asm_x64_jit.S
jit_optimizer.c jit_opcode.c keyboard.c
teletext.c render.c serial.c log.c test.c tape.c
intel_fdc.c wd_fdc.c
disc_drive.c disc.c disc_fsd.c disc_hfe.c disc_ssd.c ibm_disc_format.c
debug.c jit.c util.c
os.c)


add_executable(beebjit ${BEEBJIT_SRC_FILES} ${BEEBJIT_ASM_FILES})
target_link_libraries(beebjit m X11 Xext pthread asound)