mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/pkg/emlearn: add model.h to repo
The Makefile rule to regenerate model.h has been left in place, but just adding the header to the test allows to build the application without heaving emlearn installed, which is convenient for the CI. Actual users of emlearn will like still want to generate the header.
This commit is contained in:
parent
9bdb697edb
commit
2c89b7acd3
4
tests/pkg/emlearn/.gitignore
vendored
4
tests/pkg/emlearn/.gitignore
vendored
@ -1,2 +1,4 @@
|
||||
model.h
|
||||
tmp/
|
||||
/model_head.h
|
||||
/model_tail.h
|
||||
/tmp.h
|
||||
|
@ -8,6 +8,21 @@ BUILDDEPS += model.h
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
model.h: $(CURDIR)/model
|
||||
model_head.h:
|
||||
$(Q)echo "#ifndef MODEL_H" > model_head.h
|
||||
$(Q)echo "#define MODEL_H" >> model_head.h
|
||||
$(Q)echo "#ifdef __cplusplus" >> model_head.h
|
||||
$(Q)echo "extern \"C\" {" >> model_head.h
|
||||
$(Q)echo "#endif" >> model_head.h
|
||||
|
||||
model_tail.h:
|
||||
$(Q)echo "#ifdef __cplusplus" > model_tail.h
|
||||
$(Q)echo "}" >> model_tail.h
|
||||
$(Q)echo "#endif" >> model_tail.h
|
||||
$(Q)echo "#endif /* MODEL_H */" >> model_tail.h
|
||||
|
||||
model.h: $(CURDIR)/model model_head.h model_tail.h
|
||||
$(Q)$(CURDIR)/generate_model.py
|
||||
$(Q)echo "/* fix for no newline at eof */" >> model.h
|
||||
$(Q)sed -i model.h -e 's/[\t ]*$$//g'
|
||||
$(Q)cat model_head.h model.h model_tail.h > tmp.h
|
||||
$(Q)mv tmp.h model.h
|
||||
|
7794
tests/pkg/emlearn/model.h
Normal file
7794
tests/pkg/emlearn/model.h
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user