2023-05-05 10:09:15 +02:00
|
|
|
include ../Makefile.pkg_common
|
2020-01-07 11:04:57 +01:00
|
|
|
|
|
|
|
USEPKG += emlearn
|
|
|
|
|
|
|
|
BLOBS += digit
|
|
|
|
|
|
|
|
include $(RIOTBASE)/Makefile.include
|
|
|
|
|
2024-08-28 16:13:50 +02:00
|
|
|
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
|
2020-01-07 11:04:57 +01:00
|
|
|
$(Q)$(CURDIR)/generate_model.py
|
2024-08-28 16:13:50 +02:00
|
|
|
$(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
|