]> git.ipfire.org Git - thirdparty/bird.git/blame - conf/Makefile
Doc: BFD update
[thirdparty/bird.git] / conf / Makefile
CommitLineData
7152e5ef
JMM
1src := cf-parse.tab.c cf-lex.c conf.c
2obj := $(src-o-files)
49e7e5ee 3
7152e5ef 4$(all-daemon)
70591fa0 5
9b0a0ba9
OZ
6tests_objs := $(tests_objs) $(src-o-files)
7
70591fa0
MM
8ifdef DEBUG
9BISON_DEBUG=-t
10#FLEX_DEBUG=-d
11endif
12
75206f26
MM
13$(o)cf-parse.y: $(s)gen_parser.m4
14$(o)keywords.h: $(s)gen_keywords.m4
15$(o)commands.h: $(s)gen_commands.m4
70591fa0 16
75206f26
MM
17$(conf-y-targets): $(s)confbase.Y $(s)flowspec.Y
18 $(M4) $(M4FLAGS) -P $(if $(word 2,$(filter %.m4,$^)),$(error "Too many M4 scripts for one target"),$(filter %.m4,$^)) $(filter %.Y,$^) >$@
70591fa0 19
286e2011
OZ
20$(o)cf-parse.tab.h: $(o)cf-parse.tab.c
21
22$(o)cf-parse.tab.c: $(o)cf-parse.y
7ffc0a65 23 $(BISON) $(BISON_DEBUG) $(BISONFLAGS) -dv -pcf_ -b $(@:.tab.c=) $<
286e2011
OZ
24
25$(o)cf-lex.c: $(s)cf-lex.l
412614c7 26 $(FLEX) $(FLEX_DEBUG) -f -s -B -8 -Pcf_ -o$@ $<
286e2011 27
8860e991 28$(o)cf-lex.o: CFLAGS+=-Wno-sign-compare -Wno-unused-function
f50b9e48 29
5d511948
MM
30prepare: $(o)keywords.h $(o)commands.h $(o)cf-parse.tab.h
31
286e2011 32$(addprefix $(o), cf-parse.y keywords.h commands.h cf-parse.tab.h cf-parse.tab.c cf-lex.c): $(objdir)/.dir-stamp
70591fa0 33
7152e5ef 34$(call clean,cf-parse.tab.h cf-parse.tab.c cf-parse.y keywords.h commands.h cf-lex.c cf-parse.output)