3 # Author: Daniel Borkmann
6 include ..
/definitions.mk
13 lib-objs
= xmalloc.o \
18 flex-obj
= ..
/bpf_lexer.l
19 bison-obj
= ..
/bpf_parser.y
23 all: clean gen-version build doc
28 @cd ..
&& cat ..
/VERSION | xargs .
/gen_build_info.pl
33 @mv bpf_parser.tab.c ..
/
34 @mv bpf_parser.tab.h ..
/
37 build
: $(lib-objs
) $(core-objs
)
38 @
$(LD
) $(target
) $(core-objs
) $(lib-objs
) $(LIBS
)
44 # @cd ../../Documentation && make clean
45 # @cd ../../Documentation && make ifpps
46 # @cp ../../Documentation/man/* .
47 # @cp ../../Documentation/pdf/* .
48 # @cp ../../Documentation/html/* .
50 ..
/bpf_parser.tab.c
: gen-flex-bison
51 ..
/lex.yy.c
: gen-flex-bison
54 @
$(CC
) -g
$(CFLAGS
) $(INCLUDE
) $<
57 @
rm *.o
*~
$(target
) ..
/version.h
*.gz
*.pdf
*.html
*.8 *.css \
58 ..
/bpf_parser.tab.c ..
/bpf_parser.tab.h ..
/lex.yy.c
> /dev
/null
2>&1 || true
61 @
install -D
$(target
) $(DESTDIR
)/$(BINDIR
)/$(target
)
62 @
install -D
$(target
).8.gz
$(DESTDIR
)/usr
/share
/man
/man8
/$(target
).8.gz
65 @
rm $(DESTDIR
)/$(BINDIR
)/$(target
) || true
66 @
rm $(DESTDIR
)/usr
/share
/man
/man8
/$(target
).8.gz || true
69 @echo
'Cleaning targets:'
70 @echo
' clean - Remove generated files'
71 @echo
'Building targets:'
72 @echo
' all - Build bpfc (default)'
73 @echo
' debug - Build bpfc for debugging _only_'
74 @echo
' deploy - Build bpfc for productive use'
75 @echo
'Setup targets:'
76 @echo
' install - Install bpfc'
77 @echo
' uninstall - Uninstall bpfc'
78 @echo
'Other targets:'
79 @echo
' help - Print this help'