0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-19 01:28:44 +00:00
bird/filter/Makefile
Maria Matejka d1039926f5 Filter: Interpreter merged into the common m4 generator.
The config-time partial evaluation of constant expressions in filters is nearby.
2019-02-20 22:30:55 +01:00

26 lines
812 B
Makefile

src := filter.c data.c f-util.c tree.c trie.c inst-gen.c
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
$(conf-y-targets) $(conf-lex-targets) $(src-o-files): $(o)inst-gen.h
M4FLAGS_FILTERS=$(filter-out -s,$(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 $^ >$@
$(o)filter.o: $(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)