aboutsummaryrefslogtreecommitdiff
path: root/meson.build
blob: aa8a7017d845b7b076b19d59314634221ec1922d (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
35
36
project('libnxt', 'c',
  default_options : 'warning_level=3',
  version : '0.4.0')

usbdep = dependency('libusb-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,
  dependencies : usbdep,
)

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