diff options
author | 2018-05-10 14:25:33 +0300 | |
---|---|---|
committer | 2018-05-10 14:25:33 +0300 | |
commit | 4c8d5def856d93a12cf47819f6b70fe2d66d7366 (patch) | |
tree | 7319101f526285900d1f1631648daecb2a88255a /src | |
parent | f8a9eeea2b054db663d3c519d8b5bb78b7a6bf38 (diff) | |
download | coffeetemp-4c8d5def856d93a12cf47819f6b70fe2d66d7366.tar.gz coffeetemp-4c8d5def856d93a12cf47819f6b70fe2d66d7366.tar.bz2 coffeetemp-4c8d5def856d93a12cf47819f6b70fe2d66d7366.zip |
tempmodule: add rudimentary meson suport.
Diffstat (limited to 'src')
-rw-r--r-- | src/meson.build | 1 | ||||
-rw-r--r-- | src/tempmodule/meson.build | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/meson.build b/src/meson.build index 2b036a6..eba583d 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,4 +1,5 @@ subdir('server') +subdir('tempmodule') sources = dp_sources extra = dp_extra diff --git a/src/tempmodule/meson.build b/src/tempmodule/meson.build new file mode 100644 index 0000000..e974884 --- /dev/null +++ b/src/tempmodule/meson.build @@ -0,0 +1,16 @@ +if get_option('fwbuild') + espmake = find_program('espmake') + + sourcedir = meson.current_source_dir() + fw_filenames = ['main.ino', 'indicator.c', 'temperature.c', 'indicator.h', 'temperature.h'] + fw_sources = files(fw_filenames) + fw = custom_target('fw', + output : 'fw.bin', + input : fw_sources, + command : [espmake, '-C', sourcedir, '&&', 'cp', '/tmp/mkESP/main_d1_mini/main.bin', '@OUTDIR@/fw.bin']) + + if get_option('fwflash') + esptool = find_program('esptool.py') + run_target('flash_fw', depends : fw, command : [esptool, 'write_flash', '0x0', fw]) + endif +endif |