| Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame] | 1 | project('flashprogutils', 'c', |
| Nikolai Artemiev | 47cb6fc | 2022-07-22 09:58:14 +1000 | [diff] [blame] | 2 | version : run_command('util/getversion.sh', '--version', check : true).stdout().strip(), |
| Nico Huber | b417c0c | 2019-09-24 22:12:40 +0200 | [diff] [blame] | 3 | license : 'GPL-2.0', |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 4 | meson_version : '>=0.53.0', |
| Anastasia Klimchuk | 3c50843 | 2022-04-13 15:15:24 +1000 | [diff] [blame] | 5 | default_options : [ |
| 6 | 'warning_level=2', |
| 7 | 'c_std=c99', |
| Anastasia Klimchuk | c676be9 | 2022-04-26 14:53:18 +1000 | [diff] [blame] | 8 | 'werror=true', |
| Anastasia Klimchuk | 3c50843 | 2022-04-13 15:15:24 +1000 | [diff] [blame] | 9 | 'optimization=s', |
| Nikolai Artemiev | 47cb6fc | 2022-07-22 09:58:14 +1000 | [diff] [blame] | 10 | 'debug=false', |
| 11 | ], |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 12 | ) |
| 13 | |
| 14 | # libtool versioning |
| 15 | lt_current = '1' |
| 16 | lt_revision = '0' |
| 17 | lt_age = '0' |
| 18 | lt_version = '@0@.@1@.@2@'.format(lt_current, lt_age, lt_revision) |
| 19 | |
| Jacob Garber | 4a84ec2 | 2019-07-25 19:12:31 -0600 | [diff] [blame] | 20 | # hide/enable some warnings |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 21 | warning_flags = [ |
| Anastasia Klimchuk | cde7011 | 2021-10-25 13:20:26 +1100 | [diff] [blame] | 22 | '-Wshadow', |
| 23 | '-Wmissing-prototypes', |
| Jacob Garber | 4a84ec2 | 2019-07-25 19:12:31 -0600 | [diff] [blame] | 24 | '-Wwrite-strings', |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 25 | '-Wno-unused-parameter', |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 26 | '-Wno-address-of-packed-member', |
| 27 | '-Wno-enum-conversion', |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 28 | '-Wno-missing-braces', |
| 29 | ] |
| 30 | |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 31 | cc = meson.get_compiler('c') |
| 32 | add_project_arguments(cc.get_supported_arguments(warning_flags), language : 'c') |
| 33 | add_project_arguments('-D_DEFAULT_SOURCE', language : 'c') |
| Rosen Penev | 566193f | 2020-07-18 12:50:16 -0700 | [diff] [blame] | 34 | add_project_arguments('-D_POSIX_C_SOURCE=200809L', language : 'c') # required for fileno, nanosleep, and strndup |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 35 | add_project_arguments('-D_BSD_SOURCE', language : 'c') # required for glibc < v2.19 |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 36 | add_project_arguments('-D__BSD_VISIBLE', language : 'c') # required for u_char, u_int, u_long on FreeBSD |
| 37 | add_project_arguments('-D__XSI_VISIBLE', language : 'c') # required for gettimeofday() on FreeBSD |
| 38 | add_project_arguments('-D_NETBSD_SOURCE', language : 'c') # required for indirect include of strings.h on NetBSD |
| 39 | add_project_arguments('-D_DARWIN_C_SOURCE', language : 'c') # required for indirect include of strings.h on MacOS |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 40 | |
| 41 | # get defaults from configure |
| Thomas Heijligen | b975da1 | 2022-08-13 12:10:05 +0200 | [diff] [blame] | 42 | config_print_wiki = get_option('classic_cli_print_wiki') |
| Thomas Heijligen | 84e9c91 | 2021-06-01 16:22:14 +0200 | [diff] [blame] | 43 | config_default_programmer_name = get_option('default_programmer_name') |
| 44 | config_default_programmer_args = get_option('default_programmer_args') |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 45 | |
| 46 | cargs = [] |
| 47 | deps = [] |
| Thomas Heijligen | 51208f3 | 2022-04-28 11:07:29 +0200 | [diff] [blame] | 48 | srcs = files( |
| 49 | '82802ab.c', |
| 50 | 'at45db.c', |
| 51 | 'bitbang_spi.c', |
| 52 | 'edi.c', |
| 53 | 'en29lv640b.c', |
| 54 | 'flashchips.c', |
| Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame] | 55 | 'flashprog.c', |
| Thomas Heijligen | 51208f3 | 2022-04-28 11:07:29 +0200 | [diff] [blame] | 56 | 'fmap.c', |
| 57 | 'helpers.c', |
| Edward O'Callaghan | 4c76c73 | 2022-08-12 11:03:00 +1000 | [diff] [blame] | 58 | 'helpers_fileio.c', |
| Thomas Heijligen | 51208f3 | 2022-04-28 11:07:29 +0200 | [diff] [blame] | 59 | 'ich_descriptors.c', |
| 60 | 'jedec.c', |
| 61 | 'layout.c', |
| Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame] | 62 | 'libflashprog.c', |
| Nico Huber | e759839 | 2026-06-23 22:29:15 +0200 | [diff] [blame] | 63 | 'm28f.c', |
| Nico Huber | 0e76d99 | 2023-01-12 20:22:55 +0100 | [diff] [blame] | 64 | 'memory_bus.c', |
| Thomas Heijligen | 51208f3 | 2022-04-28 11:07:29 +0200 | [diff] [blame] | 65 | 'opaque.c', |
| Edward O'Callaghan | 63f6a37 | 2022-08-12 12:56:43 +1000 | [diff] [blame] | 66 | 'parallel.c', |
| Thomas Heijligen | 51208f3 | 2022-04-28 11:07:29 +0200 | [diff] [blame] | 67 | 'print.c', |
| 68 | 'programmer.c', |
| 69 | 'programmer_table.c', |
| 70 | 'sfdp.c', |
| 71 | 'spi25.c', |
| Nico Huber | 8d0f465 | 2024-05-04 18:52:51 +0200 | [diff] [blame] | 72 | 'spi25_prepare.c', |
| Thomas Heijligen | 51208f3 | 2022-04-28 11:07:29 +0200 | [diff] [blame] | 73 | 'spi25_statusreg.c', |
| 74 | 'spi95.c', |
| 75 | 'spi.c', |
| 76 | 'sst28sf040.c', |
| 77 | 'sst49lfxxxc.c', |
| 78 | 'sst_fwhub.c', |
| 79 | 'stm50.c', |
| 80 | 'udelay.c', |
| 81 | 'w29ee011.c', |
| 82 | 'w39.c', |
| 83 | 'writeprotect.c', |
| 84 | 'writeprotect_ranges.c', |
| 85 | ) |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 86 | |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 87 | # check for required symbols |
| 88 | if cc.has_function('clock_gettime') |
| 89 | add_project_arguments('-DHAVE_CLOCK_GETTIME=1', language : 'c') |
| 90 | endif |
| 91 | if cc.has_function('strnlen') |
| 92 | add_project_arguments('-DHAVE_STRNLEN=1', language : 'c') |
| 93 | endif |
| 94 | if cc.check_header('sys/utsname.h') |
| 95 | add_project_arguments('-DHAVE_UTSNAME=1', language : 'c') |
| 96 | endif |
| Thomas Heijligen | c02b1a9 | 2022-04-25 14:54:10 +0200 | [diff] [blame] | 97 | if host_machine.system() in ['cygwin', 'windows'] |
| 98 | add_project_arguments('-DIS_WINDOWS=1', language : 'c') |
| 99 | else |
| 100 | add_project_arguments('-DIS_WINDOWS=0', language : 'c') |
| 101 | endif |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 102 | |
| Peter Stuge | 272b073 | 2022-12-11 03:55:02 +0100 | [diff] [blame] | 103 | if host_machine.system() == 'linux' |
| 104 | custom_baud_c = 'custom_baud_linux.c' |
| Peter Stuge | b8ee2d6 | 2022-12-11 16:20:16 +0100 | [diff] [blame] | 105 | elif host_machine.system() == 'darwin' |
| 106 | custom_baud_c = 'custom_baud_darwin.c' |
| Peter Stuge | 272b073 | 2022-12-11 03:55:02 +0100 | [diff] [blame] | 107 | else |
| 108 | custom_baud_c = 'custom_baud.c' |
| 109 | endif |
| 110 | |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 111 | systems_hwaccess = [ 'linux', 'openbsd', 'freebsd', 'dragonfly', 'netbsd' ] |
| 112 | systems_serial = [ 'linux', 'openbsd', 'freebsd', 'dragonfly', 'netbsd', 'darwin' ] |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 113 | |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 114 | cpus_port_io = [ 'x86', 'x86_64' ] |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 115 | cpus_raw_mem = [ 'x86', 'x86_64', 'mips', 'mips64', 'ppc', 'ppc64', 'arm', 'aarch64', 'sparc', 'sparc64', 'arc', 'e2k' ] |
| Peter Marheine | 306c8b7 | 2022-01-21 02:07:30 +0000 | [diff] [blame] | 116 | |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 117 | group_ftdi = get_option('programmer').contains('group_ftdi') |
| 118 | group_pci = get_option('programmer').contains('group_pci') |
| 119 | group_usb = get_option('programmer').contains('group_usb') |
| 120 | group_i2c = get_option('programmer').contains('group_i2c') |
| 121 | group_serial = get_option('programmer').contains('group_serial') |
| 122 | group_jlink = get_option('programmer').contains('group_jlink') |
| Steve Markgraf | 6189947 | 2023-01-09 23:06:52 +0100 | [diff] [blame] | 123 | group_gpiod = get_option('programmer').contains('group_gpiod') |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 124 | group_internal = get_option('programmer').contains('group_internal') |
| 125 | group_external = get_option('programmer').contains('group_external') |
| Peter Marheine | 306c8b7 | 2022-01-21 02:07:30 +0000 | [diff] [blame] | 126 | |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 127 | libpci = dependency('libpci', required : group_pci, static : (host_machine.system() == 'openbsd' ? true : false)) # On openbsd a static version of libpci is needed to get also -libz |
| 128 | libusb1 = dependency('libusb-1.0', required : group_usb) |
| 129 | libftdi1 = dependency('libftdi1', required : group_ftdi) |
| 130 | libjaylink = dependency('libjaylink', required : group_jlink) |
| Steve Markgraf | 6189947 | 2023-01-09 23:06:52 +0100 | [diff] [blame] | 131 | libgpiod = dependency('libgpiod', required : group_gpiod) |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 132 | |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 133 | subdir('platform') |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 134 | |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 135 | if systems_hwaccess.contains(host_machine.system()) |
| Thomas Heijligen | 4bd966c | 2022-05-16 10:56:55 +0200 | [diff] [blame] | 136 | srcs += files('hwaccess_physmap.c') |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 137 | if ['x86', 'x86_64'].contains(host_machine.cpu_family()) |
| Nico Huber | c0f3f0f | 2026-03-14 21:18:52 +0100 | [diff] [blame] | 138 | add_project_arguments('-DHAVE_OUTB=1', language : 'c') |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 139 | srcs += files('hwaccess_x86_msr.c', 'hwaccess_x86_io.c') |
| Thomas Heijligen | 140c126 | 2021-09-27 15:12:26 +0200 | [diff] [blame] | 140 | endif |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 141 | endif |
| 142 | |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 143 | # Pseudo dependencies |
| 144 | linux_headers = \ |
| 145 | cc.has_header('linux/i2c.h') and \ |
| 146 | cc.has_header('linux/i2c-dev.h') and \ |
| 147 | cc.has_header('mtd/mtd-user.h') and \ |
| 148 | cc.has_header('linux/spi/spidev.h') ? declare_dependency() : dependency('', required : false) |
| Thomas Heijligen | b975da1 | 2022-08-13 12:10:05 +0200 | [diff] [blame] | 149 | |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 150 | # '<programmer_name>' : { |
| 151 | # 'system' : list[string], # default: ['all'] |
| 152 | # 'cpu_families : list[string], # default: ['all'] |
| 153 | # 'deps' : list[dep], # default: [] |
| 154 | # 'groups : list[boolean], # default: [] |
| 155 | # 'srcs' : list[file], # default: [] |
| 156 | # 'flags' : list[string], # default: [] |
| 157 | # 'default' : boolean, # default: true |
| 158 | # 'active' : boolean, # added on runtime |
| 159 | # } |
| 160 | programmer = { |
| 161 | 'atahpt' : { |
| 162 | 'systems' : systems_hwaccess, |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 163 | 'cpu_families' : [ cpus_port_io ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 164 | 'deps' : [ libpci ], |
| 165 | 'groups' : [ group_pci, group_internal ], |
| 166 | 'srcs' : files('atahpt.c', 'pcidev.c'), |
| 167 | 'flags' : [ '-DCONFIG_ATAHPT=1' ], |
| 168 | 'default' : false, # not yet working |
| 169 | }, |
| 170 | 'atapromise' : { |
| 171 | 'systems' : systems_hwaccess, |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 172 | 'cpu_families' : [ cpus_port_io, cpus_raw_mem ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 173 | 'deps' : [ libpci ], |
| 174 | 'groups' : [ group_pci, group_internal ], |
| 175 | 'srcs' : files('atapromise.c', 'pcidev.c'), |
| 176 | 'flags' : [ '-DCONFIG_ATAPROMISE=1' ], |
| 177 | 'default' : false, |
| 178 | }, |
| 179 | 'atavia' : { |
| 180 | 'systems' : systems_hwaccess, |
| 181 | 'deps' : [ libpci ], |
| 182 | 'groups' : [ group_pci, group_internal ], |
| 183 | 'srcs' : files('atavia.c', 'pcidev.c'), |
| 184 | 'flags' : [ '-DCONFIG_ATAVIA=1' ], |
| 185 | }, |
| 186 | 'buspirate_spi' : { |
| 187 | 'systems' : systems_serial, |
| 188 | 'groups' : [ group_serial, group_external ], |
| Peter Stuge | 272b073 | 2022-12-11 03:55:02 +0100 | [diff] [blame] | 189 | 'srcs' : files('buspirate_spi.c', 'serial.c', custom_baud_c), |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 190 | 'flags' : [ '-DCONFIG_BUSPIRATE_SPI=1' ], |
| 191 | }, |
| 192 | 'ch341a_spi' : { |
| 193 | 'deps' : [ libusb1 ], |
| 194 | 'groups' : [ group_usb, group_external ], |
| 195 | 'srcs' : files('ch341a_spi.c'), |
| 196 | 'flags' : [ '-DCONFIG_CH341A_SPI=1' ], |
| 197 | }, |
| Nicholas Chin | 197b7c7 | 2022-10-23 13:10:31 -0600 | [diff] [blame] | 198 | 'ch347_spi' : { |
| 199 | 'deps' : [ libusb1 ], |
| 200 | 'groups' : [ group_usb, group_external ], |
| 201 | 'srcs' : files('ch347_spi.c'), |
| 202 | 'flags' : [ '-DCONFIG_CH347_SPI=1' ], |
| 203 | }, |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 204 | 'dediprog' : { |
| 205 | 'deps' : [ libusb1 ], |
| 206 | 'groups' : [ group_usb, group_external ], |
| 207 | 'srcs' : files('dediprog.c', 'usbdev.c'), |
| 208 | 'flags' : [ '-DCONFIG_DEDIPROG=1' ], |
| 209 | }, |
| 210 | 'developerbox_spi' : { |
| 211 | 'deps' : [ libusb1 ], |
| 212 | 'groups' : [ group_usb, group_external ], |
| 213 | 'srcs' : files('developerbox_spi.c', 'usbdev.c'), |
| 214 | 'flags' : [ '-DCONFIG_DEVELOPERBOX_SPI=1' ], |
| 215 | }, |
| 216 | 'digilent_spi' : { |
| 217 | 'deps' : [ libusb1 ], |
| 218 | 'groups' : [ group_usb, group_external ], |
| 219 | 'srcs' : files('digilent_spi.c'), |
| 220 | 'flags' : [ '-DCONFIG_DIGILENT_SPI=1' ], |
| 221 | }, |
| 222 | 'dirtyjtag_spi' : { |
| 223 | 'deps' : [ libusb1 ], |
| 224 | 'groups' : [ group_usb, group_external ], |
| 225 | 'srcs' : files('dirtyjtag_spi.c'), |
| 226 | 'flags' : [ '-DCONFIG_DIRTYJTAG_SPI=1' ], |
| 227 | }, |
| 228 | 'drkaiser' : { |
| 229 | 'systems' : systems_hwaccess, |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 230 | 'cpu_families' : [ cpus_raw_mem ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 231 | 'deps' : [ libpci ], |
| 232 | 'groups' : [ group_pci, group_internal ], |
| 233 | 'srcs' : files('drkaiser.c', 'pcidev.c'), |
| 234 | 'flags' : [ '-DCONFIG_DRKAISER=1' ], |
| 235 | }, |
| 236 | 'dummy' : { |
| 237 | 'srcs' : files('dummyflasher.c'), |
| 238 | 'flags' : [ '-DCONFIG_DUMMY=1' ], |
| 239 | }, |
| 240 | 'ft2232_spi' : { |
| 241 | 'deps' : [ libftdi1 ], |
| 242 | 'groups' : [ group_ftdi, group_external ], |
| 243 | 'srcs' : files('ft2232_spi.c' ), |
| 244 | 'flags' : [ '-DCONFIG_FT2232_SPI=1' ], |
| 245 | }, |
| Nico Huber | 522160f | 2024-08-11 11:03:05 +0200 | [diff] [blame] | 246 | 'ft4222_spi' : { |
| 247 | 'deps' : [ libusb1 ], |
| 248 | 'groups' : [ group_usb, group_ftdi, group_external ], |
| 249 | 'srcs' : files('ft4222_spi.c' ), |
| 250 | 'flags' : [ '-DCONFIG_FT4222_SPI=1' ], |
| 251 | }, |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 252 | 'gfxnvidia' : { |
| 253 | 'systems' : systems_hwaccess, |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 254 | 'cpu_families' : [ cpus_raw_mem ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 255 | 'deps' : [ libpci ], |
| 256 | 'groups' : [ group_pci, group_internal ], |
| 257 | 'srcs' : files('gfxnvidia.c', 'pcidev.c'), |
| 258 | 'flags' : [ '-DCONFIG_GFXNVIDIA=1' ], |
| 259 | }, |
| 260 | 'internal' : { |
| 261 | 'systems' : systems_hwaccess + ['linux'], |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 262 | 'cpu_families' : (host_machine.system() == 'linux' ? [ cpus_raw_mem ] : [ ['x86', 'x86_64'] ]), |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 263 | 'deps' : [ libpci ], |
| 264 | 'groups' : [ group_internal ], |
| 265 | 'srcs' : (host_machine.cpu_family() in ['x86', 'x86_64'] ? files( |
| 266 | 'processor_enable.c', |
| 267 | 'chipset_enable.c', |
| 268 | 'board_enable.c', |
| 269 | 'cbtable.c', |
| 270 | 'internal.c', |
| 271 | 'it87spi.c', |
| 272 | 'sb600spi.c', |
| 273 | 'amd_imc.c', |
| Nico Huber | a193983 | 2025-10-07 21:58:02 +0000 | [diff] [blame] | 274 | 'amd_rom3read.c', |
| Nico Huber | 735b186 | 2023-01-29 18:28:45 +0000 | [diff] [blame] | 275 | 'amd_spi100.c', |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 276 | 'wbsio_spi.c', |
| 277 | 'mcp6x_spi.c', |
| 278 | 'ichspi.c', |
| 279 | 'dmi.c', |
| 280 | 'pcidev.c', |
| 281 | 'known_boards.c', |
| 282 | ) : files( |
| 283 | 'board_enable.c', |
| 284 | 'cbtable.c', |
| 285 | 'chipset_enable.c', |
| 286 | 'internal.c', |
| 287 | 'processor_enable.c', |
| 288 | 'pcidev.c', |
| 289 | 'known_boards.c', |
| 290 | )), |
| 291 | 'flags' : [ |
| 292 | '-DCONFIG_INTERNAL=1', |
| 293 | '-DCONFIG_INTERNAL_DMI=' + (get_option('use_internal_dmi') ? '1' : '0'), |
| Nico Huber | 2f75379 | 2023-03-28 00:46:50 +0200 | [diff] [blame] | 294 | '-DLINUX_MTD_AS_INTERNAL=' + (host_machine.cpu_family() in ['x86', 'x86_64'] ? '0' : '1'), |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 295 | ] |
| 296 | }, |
| 297 | 'it8212' : { |
| 298 | 'systems' : systems_hwaccess, |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 299 | 'cpu_families' : [ cpus_raw_mem ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 300 | 'deps' : [ libpci ], |
| 301 | 'groups' : [ group_pci, group_internal ], |
| 302 | 'srcs' : files('it8212.c', 'pcidev.c'), |
| 303 | 'flags' : [ '-DCONFIG_IT8212=1' ], |
| 304 | }, |
| 305 | 'jlink_spi' : { |
| 306 | 'deps' : [ libjaylink ], |
| 307 | 'groups' : [ group_jlink, group_external ], |
| 308 | 'srcs' : files('jlink_spi.c'), |
| 309 | 'flags' : [ '-DCONFIG_JLINK_SPI=1' ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 310 | }, |
| Steve Markgraf | 6189947 | 2023-01-09 23:06:52 +0100 | [diff] [blame] | 311 | 'linux_gpio_spi' : { |
| 312 | 'systems' : [ 'linux' ], |
| 313 | 'deps' : [ libgpiod ], |
| 314 | 'groups' : [ group_gpiod, group_external ], |
| Nico Huber | 8d2c0df | 2024-01-14 23:39:40 +0100 | [diff] [blame] | 315 | 'srcs' : libgpiod.version() < '2.0.0' |
| 316 | ? files('linux_gpio_spi.c') |
| 317 | : files('linux_gpio2_spi.c'), |
| Nico Huber | aa5268d | 2023-03-09 17:15:23 +0100 | [diff] [blame] | 318 | 'flags' : [ '-DCONFIG_LINUX_GPIO_SPI=1' ], |
| Steve Markgraf | 6189947 | 2023-01-09 23:06:52 +0100 | [diff] [blame] | 319 | }, |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 320 | 'linux_mtd' : { |
| 321 | 'systems' : [ 'linux' ], |
| 322 | 'deps' : [ linux_headers ], |
| 323 | 'groups' : [ group_internal ], |
| 324 | 'srcs' : files('linux_mtd.c'), |
| 325 | 'flags' : [ '-DCONFIG_LINUX_MTD=1' ], |
| 326 | }, |
| 327 | 'linux_spi' : { |
| 328 | 'systems' : [ 'linux' ], |
| 329 | 'deps' : [ linux_headers ], |
| 330 | # internal / external? |
| 331 | 'srcs' : files('linux_spi.c'), |
| 332 | 'flags' : [ '-DCONFIG_LINUX_SPI=1' ], |
| 333 | }, |
| 334 | 'mstarddc_spi' : { |
| 335 | 'systems' : [ 'linux' ], |
| 336 | 'deps' : [ linux_headers ], |
| 337 | 'groups' : [ group_i2c ], |
| 338 | 'srcs' : files('mstarddc_spi.c'), |
| 339 | 'flags' : [ '-DCONFIG_MSTARDDC_SPI=1' ], |
| 340 | 'default' : false |
| 341 | }, |
| 342 | 'nic3com' : { |
| 343 | 'systems' : systems_hwaccess, |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 344 | 'cpu_families' : [ cpus_port_io ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 345 | 'deps' : [ libpci ], |
| 346 | 'groups' : [ group_pci, group_internal ], |
| 347 | 'srcs' : files('nic3com.c', 'pcidev.c'), |
| 348 | 'flags' : [ '-DCONFIG_NIC3COM=1' ], |
| 349 | }, |
| 350 | 'nicintel' : { |
| 351 | 'systems' : systems_hwaccess, |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 352 | 'cpu_families' : [ cpus_raw_mem ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 353 | 'deps' : [ libpci ], |
| 354 | 'groups' : [ group_pci, group_internal ], |
| 355 | 'srcs' : files('nicintel.c', 'pcidev.c'), |
| 356 | 'flags' : [ '-DCONFIG_NICINTEL=1' ], |
| 357 | }, |
| 358 | 'nicintel_eeprom' : { |
| 359 | 'systems' : systems_hwaccess, |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 360 | 'cpu_families' : [ cpus_raw_mem ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 361 | 'deps' : [ libpci ], |
| 362 | 'groups' : [ group_pci, group_internal ], |
| 363 | 'srcs' : files('nicintel_eeprom.c', 'pcidev.c'), |
| 364 | 'flags' : [ '-DCONFIG_NICINTEL_EEPROM=1' ], |
| 365 | }, |
| 366 | 'nicintel_spi' : { |
| 367 | 'systems' : systems_hwaccess, |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 368 | 'cpu_families' : [ cpus_raw_mem ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 369 | 'deps' : [ libpci ], |
| 370 | 'groups' : [ group_pci, group_internal ], |
| 371 | 'srcs' : files('nicintel_spi.c', 'pcidev.c'), |
| 372 | 'flags' : [ '-DCONFIG_NICINTEL_SPI=1' ], |
| 373 | }, |
| 374 | 'nicnatsemi' : { |
| 375 | 'systems' : systems_hwaccess, |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 376 | 'cpu_families' : [ cpus_port_io ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 377 | 'deps' : [ libpci ], |
| 378 | 'groups' : [ group_pci, group_internal ], |
| 379 | 'srcs' : files('nicnatsemi.c', 'pcidev.c'), |
| 380 | 'flags' : [ '-DCONFIG_NICNATSEMI=1' ], |
| 381 | 'default' : false, # not complete nor tested |
| 382 | }, |
| 383 | 'nicrealtek' : { |
| 384 | 'systems' : systems_hwaccess, |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 385 | 'cpu_families' : [ cpus_port_io ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 386 | 'deps' : [ libpci ], |
| 387 | 'groups' : [ group_pci, group_internal ], |
| 388 | 'srcs' : files('nicrealtek.c', 'pcidev.c'), |
| 389 | 'flags' : [ '-DCONFIG_NICREALTEK=1' ], |
| 390 | }, |
| 391 | 'ogp_spi' : { |
| 392 | 'systems' : systems_hwaccess, |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 393 | 'cpu_families' : [ cpus_raw_mem ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 394 | 'deps' : [ libpci ], |
| 395 | 'groups' : [ group_pci, group_internal ], |
| 396 | 'srcs' : files('ogp_spi.c', 'pcidev.c'), |
| 397 | 'flags' : [ '-DCONFIG_OGP_SPI=1' ], |
| 398 | }, |
| 399 | 'pickit2_spi' : { |
| 400 | 'deps' : [ libusb1 ], |
| 401 | 'groups' : [ group_usb, group_external ], |
| 402 | 'srcs' : files('pickit2_spi.c'), |
| 403 | 'flags' : [ '-DCONFIG_PICKIT2_SPI=1' ], |
| 404 | }, |
| 405 | 'pony_spi' : { |
| 406 | 'systems' : systems_serial, |
| 407 | 'groups' : [ group_serial, group_external ], |
| Peter Stuge | 272b073 | 2022-12-11 03:55:02 +0100 | [diff] [blame] | 408 | 'srcs' : files('pony_spi.c', 'serial.c', custom_baud_c), |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 409 | 'flags' : [ '-DCONFIG_PONY_SPI=1' ], |
| 410 | }, |
| 411 | 'rayer_spi' : { |
| 412 | 'systems' : systems_hwaccess, |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 413 | 'cpu_families' : [ cpus_port_io ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 414 | 'groups' : [ group_internal ], |
| 415 | 'srcs' : files('rayer_spi.c'), |
| 416 | 'flags' : [ '-DCONFIG_RAYER_SPI=1' ], |
| 417 | }, |
| 418 | 'satamv' : { |
| 419 | 'systems' : systems_hwaccess, |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 420 | 'cpu_families' : [ cpus_port_io, cpus_raw_mem ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 421 | 'deps' : [ libpci ], |
| 422 | 'groups' : [ group_pci, group_internal ], |
| 423 | 'srcs' : files('satamv.c', 'pcidev.c'), |
| 424 | 'flags' : ['-DCONFIG_SATAMV=1'], |
| 425 | }, |
| 426 | 'satasii' : { |
| 427 | 'systems' : systems_hwaccess, |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 428 | 'cpu_families' : [ cpus_raw_mem ], |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 429 | 'deps' : [ libpci ], |
| 430 | 'groups' : [ group_pci, group_internal ], |
| 431 | 'srcs' : files('satasii.c', 'pcidev.c'), |
| 432 | 'flags' : [ '-DCONFIG_SATASII=1' ], |
| 433 | }, |
| Nico Huber | 47cea9a | 2026-06-30 21:42:23 +0200 | [diff] [blame^] | 434 | 'scsilsi' : { |
| 435 | 'systems' : systems_hwaccess, |
| 436 | 'cpu_families' : [ cpus_raw_mem ], |
| 437 | 'deps' : [ libpci ], |
| 438 | 'groups' : [ group_pci, group_internal ], |
| 439 | 'srcs' : files('scsilsi.c', 'pcidev.c'), |
| 440 | 'flags' : [ '-DCONFIG_SCSILSI=1' ], |
| 441 | }, |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 442 | 'serprog' : { |
| 443 | 'systems' : systems_serial, |
| 444 | 'groups' : [ group_serial, group_external ], |
| Peter Stuge | 272b073 | 2022-12-11 03:55:02 +0100 | [diff] [blame] | 445 | 'srcs' : files('serprog.c', 'serial.c', custom_baud_c), |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 446 | 'flags' : [ '-DCONFIG_SERPROG=1' ], |
| 447 | }, |
| 448 | 'stlinkv3_spi' : { |
| 449 | 'deps' : [ libusb1 ], |
| 450 | 'groups' : [ group_usb, group_external ], |
| 451 | 'srcs' : files('stlinkv3_spi.c', 'usbdev.c'), |
| 452 | 'flags' : [ '-DCONFIG_STLINKV3_SPI=1' ], |
| 453 | }, |
| 454 | 'usbblaster_spi' : { |
| 455 | 'deps' : [ libftdi1 ], |
| 456 | 'groups' : [ group_ftdi, group_external ], |
| 457 | 'srcs' : files('usbblaster_spi.c'), |
| 458 | 'flags' : [ '-DCONFIG_USBBLASTER_SPI=1' ], |
| 459 | }, |
| 460 | } |
| 461 | |
| 462 | active_programmer_count = 0 |
| 463 | foreach p_name, p_data : programmer |
| 464 | p_data += { |
| 465 | 'systems' : p_data.get('systems', ['all']), |
| 466 | 'cpu_families' : p_data.get('cpu_families', ['all']), |
| 467 | 'deps' : p_data.get('deps', []), |
| 468 | 'groups' : p_data.get('groups', []), |
| 469 | 'srcs' : p_data.get('srcs', []), |
| 470 | 'flags' : p_data.get('flags', []), |
| 471 | 'default' : p_data.get('default', true), |
| 472 | } |
| 473 | |
| 474 | active = false |
| 475 | deps_found = true |
| 476 | not_found_dep = '' |
| 477 | not_active_message = '' |
| 478 | selected_hard = p_name in get_option('programmer') |
| 479 | selected_soft = p_data.get('groups').contains(true) or \ |
| 480 | 'all' in get_option('programmer') or \ |
| 481 | 'auto' in get_option('programmer') and p_data.get('default') |
| Nico Huber | 72c9e40 | 2024-04-21 13:07:17 +0200 | [diff] [blame] | 482 | |
| 483 | available = (p_data.get('systems') == ['all'] or p_data.get('systems').contains(host_machine.system())) |
| 484 | if p_data.get('cpu_families') != ['all'] |
| 485 | foreach families_list : p_data.get('cpu_families') |
| 486 | available = available and families_list.contains(host_machine.cpu_family()) |
| 487 | endforeach |
| 488 | endif |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 489 | |
| 490 | foreach dep : p_data.get('deps') |
| 491 | if not dep.found() |
| 492 | deps_found = false |
| 493 | not_found_dep = dep.name() |
| 494 | break |
| 495 | endif |
| 496 | endforeach |
| 497 | |
| 498 | if selected_hard |
| 499 | if not available |
| 500 | error(p_name + ' selected but not supported on this platform') |
| 501 | elif not deps_found |
| 502 | error(p_name + ' selected but dependency ' + not_found_dep +'not found') |
| 503 | else |
| 504 | active = true |
| 505 | endif |
| 506 | elif selected_soft |
| 507 | if not available |
| 508 | not_active_message = 'Not available on platform' |
| 509 | elif not deps_found |
| 510 | not_active_message = 'dependency ' + not_found_dep + ' not found' |
| 511 | else |
| 512 | active = true |
| 513 | endif |
| 514 | else |
| 515 | not_active_message = 'not selected' |
| 516 | endif |
| 517 | |
| 518 | p_data += { |
| 519 | 'active' : active, |
| 520 | 'summary' : not_active_message, |
| 521 | } |
| 522 | programmer += {p_name : p_data} |
| 523 | if active |
| 524 | active_programmer_count += 1 |
| 525 | endif |
| 526 | endforeach |
| 527 | |
| 528 | if active_programmer_count == 0 |
| 529 | error('At least one programmer must be selected') |
| 530 | endif |
| 531 | |
| 532 | # add srcs, cargs & deps from active programmer to global srcs, cargs & deps |
| 533 | foreach p_name, p_data : programmer |
| 534 | if p_data.get('active') |
| 535 | srcs += p_data.get('srcs') |
| 536 | cargs += p_data.get('flags') |
| 537 | deps += p_data.get('deps') |
| 538 | endif |
| 539 | endforeach |
| Thomas Heijligen | b975da1 | 2022-08-13 12:10:05 +0200 | [diff] [blame] | 540 | |
| 541 | if config_print_wiki.enabled() |
| 542 | if get_option('classic_cli').disabled() |
| 543 | error('`classic_cli_print_wiki` can not be enabled without `classic_cli`') |
| 544 | else |
| 545 | srcs += files('print_wiki.c') |
| 546 | cargs += '-DCONFIG_PRINT_WIKI=1' |
| 547 | endif |
| Thomas Heijligen | 2ae9bf2 | 2022-05-03 12:00:14 +0200 | [diff] [blame] | 548 | endif |
| 549 | |
| Nico Huber | e68b08b | 2023-02-11 00:00:54 +0100 | [diff] [blame] | 550 | cargs += '-DCONFIG_DEFAULT_PROGRAMMER_NAME="' + config_default_programmer_name + '"' |
| Thomas Heijligen | 2ae9bf2 | 2022-05-03 12:00:14 +0200 | [diff] [blame] | 551 | cargs += '-DCONFIG_DEFAULT_PROGRAMMER_ARGS="' + config_default_programmer_args + '"' |
| 552 | |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 553 | install_headers([ |
| Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame] | 554 | 'include/libflashprog.h', |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 555 | ], |
| 556 | ) |
| 557 | |
| Thomas Heijligen | 58015c2 | 2022-04-14 13:50:55 +0200 | [diff] [blame] | 558 | include_dir = include_directories('include') |
| 559 | |
| Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame] | 560 | mapfile = 'libflashprog.map' |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 561 | if host_machine.system() == 'darwin' |
| 562 | vflag = '' |
| 563 | else |
| 564 | vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile) |
| 565 | endif |
| Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame] | 566 | libflashprog = both_libraries( |
| 567 | 'flashprog', |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 568 | sources : [ |
| 569 | srcs, |
| 570 | ], |
| Thomas Heijligen | 58015c2 | 2022-04-14 13:50:55 +0200 | [diff] [blame] | 571 | include_directories : include_dir, |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 572 | soversion : lt_current, |
| 573 | version : lt_version, |
| 574 | dependencies : [ |
| 575 | deps, |
| 576 | ], |
| 577 | c_args : [ |
| 578 | cargs, |
| 579 | ], |
| 580 | install : true, |
| 581 | link_args : vflag, |
| 582 | link_depends : mapfile, |
| 583 | ) |
| 584 | |
| Mario Limonciello | d954d5d | 2019-09-24 16:06:57 -0500 | [diff] [blame] | 585 | version = meson.project_version() |
| 586 | #strip leading characters |
| 587 | if version.startswith('v') |
| 588 | version = version.split('v')[1] |
| 589 | endif |
| 590 | if version.startswith('p') |
| 591 | version = version.split('p')[1] |
| 592 | endif |
| 593 | |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 594 | pkgg = import('pkgconfig') |
| 595 | pkgg.generate( |
| Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame] | 596 | libraries : libflashprog, |
| Mario Limonciello | d954d5d | 2019-09-24 16:06:57 -0500 | [diff] [blame] | 597 | version : version, |
| Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame] | 598 | name : 'flashprog', |
| 599 | filebase : 'flashprog', |
| 600 | description : 'library to interact with flashprog', |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 601 | ) |
| 602 | |
| Nico Huber | 9d09e0f | 2025-03-02 22:55:10 +0100 | [diff] [blame] | 603 | config_data = configuration_data() |
| 604 | config_data.set('VERSION', meson.project_version()) |
| 605 | config_data.set('MAN_DATE', run_command('util/getversion.sh', '--man-date', check : true).stdout().strip()) |
| 606 | |
| 607 | configure_file( |
| 608 | input : 'include/version.h.in', |
| 609 | output : 'version.h', |
| 610 | configuration : config_data, |
| 611 | ) |
| 612 | |
| Nico Huber | 8f7122c | 2023-02-11 18:28:33 +0100 | [diff] [blame] | 613 | foreach man : [ 'flashprog.8', 'flashprog-config.8', 'flashprog-write-protect.8' ] |
| Nico Huber | 1f693db | 2023-02-11 18:28:33 +0100 | [diff] [blame] | 614 | configure_file( |
| 615 | input : man + '.tmpl', |
| 616 | output : man, |
| Nico Huber | 9d09e0f | 2025-03-02 22:55:10 +0100 | [diff] [blame] | 617 | configuration : config_data, |
| Nico Huber | 1f693db | 2023-02-11 18:28:33 +0100 | [diff] [blame] | 618 | install: true, |
| 619 | install_dir: join_paths(get_option('mandir'), 'man8'), |
| 620 | ) |
| 621 | endforeach |
| Richard Hughes | dad3a16 | 2020-02-17 09:57:01 +0000 | [diff] [blame] | 622 | |
| Thomas Heijligen | a12e010 | 2022-08-13 12:42:05 +0200 | [diff] [blame] | 623 | if get_option('classic_cli').auto() or get_option('classic_cli').enabled() |
| 624 | executable( |
| Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame] | 625 | 'flashprog', |
| Thomas Heijligen | a12e010 | 2022-08-13 12:42:05 +0200 | [diff] [blame] | 626 | files( |
| Nico Huber | a705043 | 2023-02-11 18:01:26 +0100 | [diff] [blame] | 627 | 'cli.c', |
| Nico Huber | 1f693db | 2023-02-11 18:28:33 +0100 | [diff] [blame] | 628 | 'cli_config.c', |
| Nico Huber | 8f7122c | 2023-02-11 18:28:33 +0100 | [diff] [blame] | 629 | 'cli_wp.c', |
| Thomas Heijligen | a12e010 | 2022-08-13 12:42:05 +0200 | [diff] [blame] | 630 | 'cli_classic.c', |
| 631 | 'cli_common.c', |
| 632 | 'cli_output.c', |
| 633 | ), |
| 634 | c_args : cargs, |
| 635 | include_directories : include_dir, |
| 636 | install : true, |
| Nico Huber | 63d30a2 | 2024-11-01 14:18:30 +0100 | [diff] [blame] | 637 | install_dir : get_option('bindir'), |
| Nico Huber | c3b02dc | 2023-08-12 01:13:45 +0200 | [diff] [blame] | 638 | link_with : libflashprog.get_static_lib(), # flashprog needs internal symbols of libflashprog |
| Thomas Heijligen | a12e010 | 2022-08-13 12:42:05 +0200 | [diff] [blame] | 639 | ) |
| 640 | endif |
| Richard Hughes | cb97368 | 2018-12-19 11:44:22 +0000 | [diff] [blame] | 641 | |
| Thomas Heijligen | b7341b1 | 2022-08-13 12:21:44 +0200 | [diff] [blame] | 642 | if get_option('ich_descriptors_tool').auto() or get_option('ich_descriptors_tool').enabled() |
| 643 | subdir('util/ich_descriptors_tool') |
| 644 | endif |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 645 | |
| 646 | programmer_names_active = [] |
| 647 | programmer_names_not_active = [] |
| 648 | foreach p_name, p_data : programmer |
| 649 | if p_data.get('active') |
| 650 | programmer_names_active += p_name |
| 651 | else |
| 652 | programmer_names_not_active += p_name + ' (' + p_data.get('summary', '') + ')' |
| 653 | endif |
| 654 | endforeach |
| 655 | |
| Jakob Haufe | fbba454 | 2024-10-23 20:45:08 +0200 | [diff] [blame] | 656 | subdir('util') |
| 657 | |
| Thomas Heijligen | 3ecf0b6 | 2022-08-18 12:16:29 +0200 | [diff] [blame] | 658 | summary({ |
| 659 | 'active' : [programmer_names_active], |
| 660 | 'non active' : [programmer_names_not_active], |
| 661 | }, section : 'Programmer') |