1#
2# AIDE (Advanced Intrusion Detection Environment)
3#
4# This program is free software; you can redistribute it and/or
5# modify it under the terms of the GNU General Public License as
6# published by the Free Software Foundation; either version 2 of the
7# License, or (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12# General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License along
15# with this program; if not, write to the Free Software Foundation, Inc.,
16# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17#
18
19BUILT_SOURCES = src/conf_yacc.h
20AM_YFLAGS= -d
21
22LEX_OUTPUT_ROOT = lex.yy
23
24bin_PROGRAMS = aide
25aide_SOURCES = src/aide.c include/aide.h \
26	include/base64.h src/base64.c \
27	include/be.h src/be.c \
28	include/commandconf.h src/commandconf.c \
29	include/attributes.h src/attributes.c \
30	include/report.h src/report.c \
31	include/conf_ast.h src/conf_ast.c \
32	include/conf_eval.h src/conf_eval.c \
33	include/conf_lex.h src/conf_lex.l  \
34	src/conf_yacc.h src/conf_yacc.y \
35	include/db.h src/db.c \
36	include/db_config.h \
37	include/db_disk.h src/db_disk.c \
38	include/db_file.h src/db_file.c \
39	include/db_lex.h src/db_lex.l \
40	include/db_list.h src/db_list.c \
41	include/do_md.h src/do_md.c \
42	include/errorcodes.h \
43	include/gen_list.h src/gen_list.c \
44	src/getopt1.c \
45	include/getopt.h src/getopt.c \
46	include/hashsum.h src/hashsum.c \
47	include/rx_rule.h src/rx_rule.c \
48	include/list.h src/list.c \
49	include/log.h src/log.c \
50	include/locale-aide.h \
51	include/md.h src/md.c \
52	include/seltree_struct.h \
53	include/seltree.h src/seltree.c \
54	include/symboltable.h src/symboltable.c \
55	include/types.h \
56	include/url.h src/url.c\
57	include/util.h src/util.c
58if USE_CURL
59aide_SOURCES += include/fopen.h src/fopen.c
60endif
61
62aide_LDADD = -lm @PCRELIB@ @CRYPTLIB@ @ACLLIB@ @SELINUXLIB@ @AUDITLIB@ @ATTRLIB@ @E2FSATTRSLIB@ @ELFLIB@ @CAPLIB@ ${CURL_LIBS}
63
64if HAVE_CHECK
65TESTS				= check_aide
66check_PROGRAMS		= check_aide
67check_aide_SOURCES	= tests/check_aide.c tests/check_aide.h \
68					  tests/check_attributes.c src/attributes.c \
69					  src/log.c src/util.c
70check_aide_CFLAGS	= -I$(top_srcdir)/include $(CHECK_CFLAGS)
71check_aide_LDADD	= -lm @PCRELIB@ @CRYPTLIB@ $(CHECK_LIBS)
72endif # HAVE_CHECK
73
74AM_CFLAGS = @AIDE_DEFS@ -W -Wall -g
75AM_CPPFLAGS = -I$(top_srcdir) \
76			  -I$(top_srcdir)/include \
77			  -I$(top_srcdir)/src \
78			  -I$(top_builddir)/src
79
80CLEANFILES = src/conf_yacc.h src/conf_yacc.c src/conf_lex.c src/db_lex.c
81
82man_MANS = doc/aide.1 doc/aide.conf.5
83
84EXTRA_DIST = $(man_MANS) Todo \
85	contrib/bzip2.sh contrib/gpg2_check.sh contrib/gpg2_update.sh \
86	contrib/gpg_check.sh contrib/gpg_update.sh contrib/sshaide.sh
87
88src/conf_yacc.c: src/conf_yacc.y
89	$(YACC) $(AM_YFLAGS) -Wno-yacc -Wall -Werror -o $@ -p conf $<
90
91src/conf_lex.c: src/conf_lex.l src/conf_yacc.c
92	$(LEX) $(AM_LFLAGS) -o$@ -Pconf $<
93
94src/db_lex.c: src/db_lex.l src/conf_yacc.h
95	$(LEX) $(AM_LFLAGS) -o$@ -Pdb $<
96
97autoreconf-clean: maintainer-clean
98	-rm -f INSTALL Makefile.in aclocal.m4 compile config.guess \
99	 config.h.in config.h.in~ config.sub configure depcomp \
100	 install-sh missing version.m4 ylwrap
101