summaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
blob: d53c347d6c1011e7d0b9202fcb4df85c04165f0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
sbin_PROGRAMS = nft

CLEANFILES = scanner.c parser_bison.c

AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CPPFLAGS += -DDEFAULT_INCLUDE_PATH="\"${sysconfdir}\"" -DDEBUG \
		${LIBMNL_CFLAGS} ${LIBNFTNL_CFLAGS}

AM_CFLAGS = -Wall								\
	    -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations	\
	    -Wdeclaration-after-statement -Wsign-compare -Winit-self		\
	    -Wformat-nonliteral -Wformat-security -Wmissing-format-attribute	\
	    -Wcast-align -Wundef -Wbad-function-cast
	    -Waggregate-return -Wunused -Wwrite-strings


AM_YFLAGS = -d

# yacc and lex generate dirty code
parser_bison.o scanner.o: AM_CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations -Wno-implicit-function-declaration -Wno-nested-externs -Wno-undef -Wno-redundant-decls

BUILT_SOURCES = parser_bison.h

nft_SOURCES =	main.c				\
		rule.c				\
		statement.c			\
		datatype.c			\
		expression.c			\
		evaluate.c			\
		proto.c				\
		payload.c			\
		exthdr.c			\
		meta.c				\
		ct.c				\
		netlink.c			\
		netlink_linearize.c		\
		netlink_delinearize.c		\
		segtree.c			\
		rbtree.c			\
		gmputil.c			\
		utils.c				\
		erec.c				\
		mnl.c				\
		scanner.l			\
		parser_bison.y

if BUILD_CLI
nft_SOURCES +=	cli.c
endif

nft_LDADD	= ${LIBMNL_LIBS} ${LIBNFTNL_LIBS}