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')
|
python3 = find_program('python3')
|
||||||
|
|
||||||
if get_option('warning_level').to_int() >= 3
|
if get_option('warning_level').to_int() >= 3
|
||||||
add_project_arguments(['-Wmissing-field-initializers',
|
add_project_arguments(['-Wmissing-prototypes',
|
||||||
'-Wunused-parameter',
|
|
||||||
'-Wold-style-definition',
|
|
||||||
'-Wmissing-declarations',
|
|
||||||
'-Wmissing-prototypes',
|
|
||||||
'-Wmissing-noreturn',
|
|
||||||
'-Wshadow',
|
'-Wshadow',
|
||||||
'-Wpointer-arith',
|
'-Wcast-align=strict',
|
||||||
'-Wcast-align',
|
|
||||||
'-Wwrite-strings',
|
'-Wwrite-strings',
|
||||||
'-Winline',
|
'-Winline',
|
||||||
'-Wformat',
|
|
||||||
'-Wformat-nonliteral',
|
|
||||||
'-Wformat-security',
|
|
||||||
'-Wswitch-default',
|
'-Wswitch-default',
|
||||||
'-Winit-self',
|
|
||||||
'-Wnested-externs',
|
|
||||||
'-Wstrict-prototypes',
|
'-Wstrict-prototypes',
|
||||||
'-Wmissing-include-dirs',
|
|
||||||
'-Wundef',
|
'-Wundef',
|
||||||
'-Waggregate-return',
|
'-Wno-overlength-strings'],
|
||||||
'-Wredundant-decls',
|
|
||||||
'-Wno-overlength-strings',
|
|
||||||
'-Wmissing-format-attribute'],
|
|
||||||
language: 'c')
|
language: 'c')
|
||||||
endif
|
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 = []
|
generate_args = []
|
||||||
if decode_32
|
if get_option('archmode') != 'only64'
|
||||||
generate_args += ['--32']
|
generate_args += ['--32']
|
||||||
endif
|
endif
|
||||||
if decode_64
|
if get_option('archmode') != 'only32'
|
||||||
generate_args += ['--64']
|
generate_args += ['--64']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
instr_data = custom_target('tables',
|
instr_data = custom_target('tables',
|
||||||
command: [python3, '@INPUT0@', '@INPUT1@', '@OUTPUT@'] + generate_args,
|
command: [python3, '@INPUT0@', '@INPUT1@', '@OUTPUT@'] + generate_args,
|
||||||
input: files('parseinstrs.py', 'instrs.txt'),
|
input: files('parseinstrs.py', 'instrs.txt'),
|
||||||
|
|||||||
Reference in New Issue
Block a user