0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-03-26 16:27:04 +00:00
Maria Matejka 9fa4cd148a Filter types: enum, name and element_type getters generated by a new generator
First try on generating C code from a declarative YAML by Python.
2023-06-12 09:02:51 +02:00

27 lines
805 B
Makefile

src := filter.c data.c f-util.c tree.c trie.c inst-gen.c types-pygen.c
obj := $(src-o-files)
$(info $(pygen))
$(pygen)
$(all-daemon)
$(cf-local)
#M4FLAGS_FILTERS=$(filter-out -s,$(M4FLAGS))
M4FLAGS_FILTERS=$(M4FLAGS)
$(o)inst-gen.h: $(s)decl.m4 $(s)f-inst.c $(objdir)/.dir-stamp
$(M4) $(M4FLAGS_FILTERS) -DTARGET=H -P $^ >$@
$(o)inst-gen.c: $(s)decl.m4 $(s)f-inst.c $(objdir)/.dir-stamp
$(M4) $(M4FLAGS_FILTERS) -DTARGET=C -P $^ >$@
$(o)inst-interpret.c: $(s)decl.m4 $(s)f-inst.c $(objdir)/.dir-stamp
$(M4) $(M4FLAGS_FILTERS) -DTARGET=I -P $^ >$@
prepare: $(o)inst-interpret.c $(o)inst-gen.h
tests_src := tree_test.c filter_test.c trie_test.c
tests_targets := $(tests_targets) $(tests-target-files)
tests_objs := $(tests_objs) $(src-o-files)
$(call clean,inst-gen.h inst-gen.c inst-interpret.c)