build: Simplify
This commit is contained in:
43
meson.build
43
meson.build
@@ -3,57 +3,26 @@ project('fadec', ['c'], default_options: ['warning_level=3', 'c_std=c99'])
|
||||
python3 = find_program('python3')
|
||||
|
||||
if get_option('warning_level').to_int() >= 3
|
||||
add_project_arguments(['-Wmissing-field-initializers',
|
||||
'-Wunused-parameter',
|
||||
'-Wold-style-definition',
|
||||
'-Wmissing-declarations',
|
||||
'-Wmissing-prototypes',
|
||||
'-Wmissing-noreturn',
|
||||
add_project_arguments(['-Wmissing-prototypes',
|
||||
'-Wshadow',
|
||||
'-Wpointer-arith',
|
||||
'-Wcast-align',
|
||||
'-Wcast-align=strict',
|
||||
'-Wwrite-strings',
|
||||
'-Winline',
|
||||
'-Wformat',
|
||||
'-Wformat-nonliteral',
|
||||
'-Wformat-security',
|
||||
'-Wswitch-default',
|
||||
'-Winit-self',
|
||||
'-Wnested-externs',
|
||||
'-Wstrict-prototypes',
|
||||
'-Wmissing-include-dirs',
|
||||
'-Wundef',
|
||||
'-Waggregate-return',
|
||||
'-Wredundant-decls',
|
||||
'-Wno-overlength-strings',
|
||||
'-Wmissing-format-attribute'],
|
||||
'-Wno-overlength-strings'],
|
||||
language: 'c')
|
||||
endif
|
||||
|
||||
decode_32 = false
|
||||
decode_64 = false
|
||||
|
||||
archmode = get_option('archmode')
|
||||
if archmode == 'only32' or archmode == 'both'
|
||||
add_project_arguments(['-DARCH_386'], language: 'c')
|
||||
decode_32 = true
|
||||
endif
|
||||
if archmode == 'only64' or archmode == 'both'
|
||||
add_project_arguments(['-DARCH_X86_64'], language: 'c')
|
||||
decode_64 = true
|
||||
endif
|
||||
|
||||
if not decode_32 and not decode_64
|
||||
error('no architecture mode')
|
||||
endif
|
||||
|
||||
generate_args = []
|
||||
if decode_32
|
||||
if get_option('archmode') != 'only64'
|
||||
generate_args += ['--32']
|
||||
endif
|
||||
if decode_64
|
||||
if get_option('archmode') != 'only32'
|
||||
generate_args += ['--64']
|
||||
endif
|
||||
|
||||
instr_data = custom_target('tables',
|
||||
command: [python3, '@INPUT0@', '@INPUT1@', '@OUTPUT@'] + generate_args,
|
||||
input: files('parseinstrs.py', 'instrs.txt'),
|
||||
|
||||
Reference in New Issue
Block a user