diff options
Diffstat (limited to 'src/Makefile.include')
-rw-r--r-- | src/Makefile.include | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Makefile.include b/src/Makefile.include index be7da2d35c..d002e8ed6f 100644 --- a/src/Makefile.include +++ b/src/Makefile.include @@ -49,3 +49,19 @@ moc_%.cpp: %.h %.pb.cc %.pb.h: %.proto test -f $(PROTOC) && $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<) || \ echo error: could not build $@ + +%.json.h: %.json + @$(MKDIR_P) $(@D) + @echo "namespace json_tests{" > $@ + @echo "static unsigned const char $(*F)[] = {" >> $@ + @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@ + @echo "};};" >> $@ + @echo "Generated $@" + +%.raw.h: %.raw + @$(MKDIR_P) $(@D) + @echo "namespace alert_tests{" > $@ + @echo "static unsigned const char $(*F)[] = {" >> $@ + @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@ + @echo "};};" >> $@ + @echo "Generated $@" |