diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/.gitignore | 1 | ||||
-rw-r--r-- | src/Makefile.am | 24 | ||||
-rw-r--r-- | src/parser_bison.y | 4 |
3 files changed, 20 insertions, 9 deletions
diff --git a/src/.gitignore b/src/.gitignore index 23e6ae03..36d6acd1 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,3 +1,4 @@ +libnftables.la parser.c parser.h scanner.c diff --git a/src/Makefile.am b/src/Makefile.am index 4d613a73..9f7a4bfb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,7 +27,9 @@ parser_bison.o scanner.o: AM_CFLAGS += -Wno-missing-prototypes -Wno-missing-decl BUILT_SOURCES = parser_bison.h -nft_SOURCES = main.c \ +lib_LTLIBRARIES = libnftables.la + +libnftables_la_SOURCES = \ rule.c \ statement.c \ datatype.c \ @@ -59,19 +61,23 @@ nft_SOURCES = main.c \ parser_bison.y \ libnftables.c -if BUILD_CLI -nft_SOURCES += cli.c -endif - if BUILD_MINIGMP mini-gmp.o: AM_CFLAGS += -Wno-sign-compare -nft_SOURCES += mini-gmp.c +libnftables_la_SOURCES += mini-gmp.c endif -nft_LDADD = ${LIBMNL_LIBS} ${LIBNFTNL_LIBS} +libnftables_la_LIBADD = ${LIBMNL_LIBS} ${LIBNFTNL_LIBS} if BUILD_XTABLES -nft_SOURCES += xt.c -nft_LDADD += ${XTABLES_LIBS} +libnftables_la_SOURCES += xt.c +libnftables_la_LIBADD += ${XTABLES_LIBS} endif + +nft_SOURCES = main.c + +if BUILD_CLI +nft_SOURCES += cli.c +endif + +nft_LDADD = libnftables.la diff --git a/src/parser_bison.y b/src/parser_bison.y index 2c59fa78..c64c3979 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -105,6 +105,10 @@ static void location_update(struct location *loc, struct location *rhs, int n) #define symbol_value(loc, str) \ symbol_expr_alloc(loc, SYMBOL_VALUE, current_scope(state), str) + +/* Declare those here to avoid compiler warnings */ +void nft_set_debug(int, void *); +int nft_lex(void *, void *, void *); %} /* Declaration section */ |