1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/pkg/emlearn/Makefile
Marian Buschsieweke 59738ba32d
tests/pkg/emlearn: drop model.h from builddep
Now that model.h is in the repo, it no longer is a build dependency.
This allows compilation of the test without having emlearn installed,
which is useful e.g. for build testing.
2024-10-14 11:20:41 +02:00

27 lines
703 B
Makefile

include ../Makefile.pkg_common
USEPKG += emlearn
BLOBS += digit
include $(RIOTBASE)/Makefile.include
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)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