Commit 6239fc31 authored by Lyude Paul's avatar Lyude Paul

meson: Allow building as both executable bins and libs

So we can link against this from panloader
parent c4a2639f
# TODO (for all of these): Is this the style we want?
[meson.build]
[{meson.build,meson_options.txt}]
indent_style = space
indent_size = 4
......
srcs = [
bin_srcs = [
'Main.cpp',
]
lib_srcs = [
'BifrostDisasm.cpp',
't6xx/disassemble.c',
't6xx/hfloat.c',
]
executable(
'disasm',
srcs,
include_directories: inc,
install: true,
)
if buildkind_opt.contains('bin')
executable(
'disasm',
bin_srcs + lib_srcs,
include_directories: inc,
install: true,
)
endif
if buildkind_opt.contains('lib')
library(
'spd-disasm',
lib_srcs,
include_directories: inc,
install: true,
)
endif
......@@ -16,5 +16,7 @@ endif
inc = include_directories('include')
buildkind_opt = get_option('buildkind')
subdir('Source')
subdir('include')
option(
'buildkind',
type : 'array',
choices: ['lib', 'bin'],
value : ['lib', 'bin'],
description : 'Whether to build disassemblers as libraries or binaries'
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment