aboutsummaryrefslogtreecommitdiff
path: root/meson.build
blob: ce4f339f63a81287e7545ac6ff589be74f3466a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
project('libnxt', 'c',
  version : '0.3')

usbdep = dependency('libusb', version : ['>=0.1', '<1.0'])

subdir('flash_write')

prog_python = import('python').find_installation('python3')
flash_routine_h = custom_target(
  'flash_routine.h',
  output : 'flash_routine.h',
  input : ['make_flash_header.py', flash_bin, 'flash_routine.h.base'],
  command : [prog_python, '@INPUT0@', '-o', '@OUTPUT@', '@INPUT1@', '@INPUT2@'],
)

lib = static_library('libnxt',
  'error.c',
  'firmware.c',
  'flash.c',
  'lowlevel.c',
  'samba.c',
  flash_routine_h,
)

executable('fwflash',
  'main_fwflash.c',
  link_with : lib, dependencies : usbdep,
  install : true,
)
executable('fwexec',
  'main_fwexec.c',
  link_with : lib, dependencies : usbdep,
  install : true,
)