From e82c9e20db13312f7a086c1247bc59fa0e73eaa1 Mon Sep 17 00:00:00 2001 From: Alexis Engelke Date: Sat, 2 Jan 2021 16:27:28 +0100 Subject: [PATCH] build: Simplify --- meson.build | 43 ++++++------------------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/meson.build b/meson.build index f211a2f..1048968 100644 --- a/meson.build +++ b/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'),