11## get the options object and "unpack" it 
22
3- wii_exe_name  =  wii_options [0 ]
4- wii_src_files  =  wii_options [1 ]
5- wii_deps  =  wii_options [2 ]
3+ exe_name  =  nintendo_options [0 ]
4+ src_files  =  nintendo_options [1 ]
5+ deps  =  nintendo_options [2 ]
66
77
88# libraries 
99
10- wii_dependencies  =  [
10+ dependencies  =  [
1111    ' freetype2'  ,
1212    ' harfbuzz'  ,
1313    ' ogg'  ,
@@ -17,7 +17,7 @@ wii_dependencies = [
1717    ' zlib'  ,
1818]
1919
20- wii_dependencies_native  =  [
20+ dependencies_native  =  [
2121    ' bte'  ,
2222    ' bz2'  ,
2323    ' fat'  ,
@@ -31,35 +31,35 @@ wii_dependencies_native = [
3131    ' wiiuse'  ,
3232]
3333
34- foreach  dep  : wii_dependencies 
35-     wii_deps  +=  dependency (
34+ foreach  dep  : dependencies 
35+     deps  +=  dependency (
3636        dep,
3737        required : true ,
3838        allow_fallback : false ,
3939        native : false ,
4040    )
4141endforeach 
4242
43- wii_library_dirs  =  meson .get_external_property(' library_dirs'  , ['' ])
44- if  wii_library_dirs .length() ==  0 
43+ library_dirs  =  meson .get_external_property(' library_dirs'  , ['' ])
44+ if  library_dirs .length() ==  0 
4545    error (' property \' library_dirs\'  has to be set!'  )
4646endif 
4747
4848c =  meson .get_compiler(' c'  )
49- foreach  dep  : wii_dependencies_native 
50-     wii_deps  +=  c.find_library (
49+ foreach  dep  : dependencies_native 
50+     deps  +=  c.find_library (
5151        dep,
5252        required : true ,
53-         dirs : wii_library_dirs ,
53+         dirs : library_dirs ,
5454    )
5555endforeach 
5656
5757## compilation 
5858
59- wii_elf_file  =  build_target (
60-     wii_exe_name  +  ' .elf'  ,
61-     wii_src_files ,
62-     dependencies : wii_deps ,
59+ elf_file  =  build_target (
60+     exe_name  +  ' .elf'  ,
61+     src_files ,
62+     dependencies : deps ,
6363    override_options : {
6464        ' warning_level'  : ' 3'  ,
6565        ' werror'  : true ,
@@ -68,17 +68,17 @@ wii_elf_file = build_target(
6868    target_type : ' executable'  ,
6969)
7070
71- DOL_DEPS =  [wii_elf_file ]
71+ DOL_DEPS =  [elf_file ]
7272
7373
7474elf2dol =  find_program (' elf2dol'  )
7575
7676# elf2dol <exe_name>.elf <exe_name>.dol  
7777custom_target (
78-     wii_exe_name  +  ' .dol'  ,
79-     command : [elf2dol, wii_elf_file .full_path(), wii_exe_name  +  ' .dol'  ],
78+     exe_name  +  ' .dol'  ,
79+     command : [elf2dol, elf_file .full_path(), exe_name  +  ' .dol'  ],
8080    depends : DOL_DEPS,
81-     output : [wii_exe_name  +  ' .dol'  ],
81+     output : [exe_name  +  ' .dol'  ],
8282    build_by_default : true ,
8383)
8484
@@ -88,7 +88,7 @@ use_meta_xml = ['true', 'True', '1', true].contains(
8888
8989if  use_meta_xml
9090
91-     wii_meta_xml_conf  =  configuration_data (
91+     meta_xml_conf  =  configuration_data (
9292        {
9393            ' OOPETRIS_VERSION'  : meson .project_version(),
9494            ' OOPETRIS_NAME'  : oopetris_name,
@@ -98,10 +98,10 @@ if use_meta_xml
9898        },
9999    )
100100
101-     wii_meta_xml  =  configure_file (
101+     meta_xml  =  configure_file (
102102        input : ' meta.xml.in'  ,
103103        output : ' meta.xml'  ,
104-         configuration : wii_meta_xml_conf ,
104+         configuration : meta_xml_conf ,
105105    )
106106
107107endif 
0 commit comments