Reorganizing meson files

This commit is contained in:
Sergio Martin 2024-01-14 10:31:17 +01:00
parent f88932e368
commit c71a339b18
3 changed files with 63 additions and 47 deletions

View File

@ -4,50 +4,14 @@ project('quickerNES','c','cpp',
default_options : ['cpp_std=c++20', 'default_library=shared', 'buildtype=release']
)
# Getting page alignment
# Getting page alignment option
pageSize = get_option('CPUFunctionAlignment')
# quickerNES Core sources
# Loading source dependencies
subdir('source')
quickerNESCoreSrc = [
'source/core/abstract_file.cpp',
'source/core/Nes_Apu.cpp',
'source/core/Nes_File.cpp',
'source/core/Nes_Oscs.cpp',
'source/core/apu_state.cpp',
'source/core/Nes_Buffer.cpp',
'source/core/Nes_Fme7_Apu.cpp',
'source/core/Nes_Ppu.cpp',
'source/core/Blip_Buffer.cpp',
'source/core/Nes_Cart.cpp',
'source/core/Nes_Mapper.cpp',
'source/core/Nes_Ppu_Impl.cpp',
'source/core/Data_Reader.cpp',
'source/core/Nes_Core.cpp',
'source/core/Nes_Ppu_Rendering.cpp',
'source/core/Effects_Buffer.cpp',
'source/core/Nes_Cpu.cpp',
'source/core/Nes_State.cpp',
'source/core/emu2413.cpp',
'source/core/nes_data.cpp',
'source/core/nes_util.cpp',
'source/core/emu2413_state.cpp',
'source/core/Nes_Effects_Buffer.cpp',
'source/core/Nes_Namco_Apu.cpp',
'source/core/Nes_Vrc6_Apu.cpp',
'source/core/Multi_Buffer.cpp',
'source/core/Nes_Emu.cpp',
'source/core/nes_ntsc.cpp',
'source/core/Nes_Vrc7.cpp',
]
# quickerNES Core Configuration
quickerNESCoreDependency = declare_dependency(
compile_args : [ '-Wfatal-errors', '-Wall', '-Werror', '-Wno-multichar', '-D_PAGE_SIZE="' + pageSize.to_string() + '"'],
include_directories : include_directories(['source', 'source/core', 'extern']),
sources : [ quickerNESCoreSrc, 'extern/metrohash128/metrohash128.cpp' ]
)
# Common application flags
commonCompileArgs = [ '-Wfatal-errors', '-Wall', '-Werror', '-Wno-multichar' ]
# Building playback tool
@ -61,8 +25,8 @@ quickerNESPlayerSrc = [
executable('player',
'source/player.cpp',
cpp_args : [ '-DNCURSES' ],
dependencies : [ quickerNESCoreDependency, dependency('sdl2'), dependency('SDL2_image') ],
cpp_args : [ commonCompileArgs, '-DNCURSES' ],
dependencies : [ quickerNESApplicationDependency, dependency('sdl2'), dependency('SDL2_image') ],
include_directories : include_directories(['source']),
link_args : [ '-lncurses' ],
sources : quickerNESPlayerSrc
@ -71,10 +35,11 @@ executable('player',
# Building tester tool
tester = executable('tester',
'source/tester.cpp',
dependencies: [ quickerNESCoreDependency ],
include_directories: include_directories(['../extern/json'])
)
'source/tester.cpp',
cpp_args : [ commonCompileArgs ],
dependencies : [ quickerNESApplicationDependency ],
include_directories : include_directories(['../extern/json'])
)
# Building tests
if get_option('buildTests') == true

41
source/core/meson.build Normal file
View File

@ -0,0 +1,41 @@
# quickerNES Core sources
quickerNESCoreSrc = [
'abstract_file.cpp',
'Nes_Apu.cpp',
'Nes_File.cpp',
'Nes_Oscs.cpp',
'apu_state.cpp',
'Nes_Buffer.cpp',
'Nes_Fme7_Apu.cpp',
'Nes_Ppu.cpp',
'Blip_Buffer.cpp',
'Nes_Cart.cpp',
'Nes_Mapper.cpp',
'Nes_Ppu_Impl.cpp',
'Data_Reader.cpp',
'Nes_Core.cpp',
'Nes_Ppu_Rendering.cpp',
'Effects_Buffer.cpp',
'Nes_Cpu.cpp',
'Nes_State.cpp',
'emu2413.cpp',
'nes_data.cpp',
'nes_util.cpp',
'emu2413_state.cpp',
'Nes_Effects_Buffer.cpp',
'Nes_Namco_Apu.cpp',
'Nes_Vrc6_Apu.cpp',
'Multi_Buffer.cpp',
'Nes_Emu.cpp',
'nes_ntsc.cpp',
'Nes_Vrc7.cpp',
]
# quickerNES Core Configuration
quickerNESCoreDependency = declare_dependency(
compile_args : [ '-D_PAGE_SIZE="' + pageSize.to_string() + '"'],
include_directories : include_directories(['.']),
sources : [ quickerNESCoreSrc ]
)

10
source/meson.build Normal file
View File

@ -0,0 +1,10 @@
# Getting core configuration
subdir('core')
# quickerNES Application Configuration
quickerNESApplicationDependency = declare_dependency(
include_directories : include_directories(['.', '../extern']),
sources : [ '../extern/metrohash128/metrohash128.cpp' ],
dependencies : [ quickerNESCoreDependency ]
)