File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,8 +70,10 @@ ifeq (${USE_SYSTEMD},yes)
7070 DEFINES+=-DHAVE_SYSTEMD
7171 OSSEC_LDFLAGS+=-lsystemd
7272endif
73- # DEFINES+=-DUSE_MAGIC
74- # OSSEC_LDFLAGS+=-lmagic
73+ ifneq (${USE_MAGIC},no)
74+ DEFINES+=-DUSE_MAGIC
75+ OSSEC_LDFLAGS+=-lmagic
76+ endif
7577else
7678ifeq (${uname_S},AIX)
7779 DEFINES+=-DAIX
@@ -1288,6 +1290,9 @@ ifdef TEST
12881290endif # TEST
12891291
12901292test_programs = test_os_zlib test_os_xml test_os_regex test_os_crypto test_shared
1293+ ifneq ($(filter -DUSE_MAGIC,$(DEFINES ) ) ,)
1294+ test_programs += test_seechanges
1295+ endif
12911296
12921297.PHONY : test run_tests build_tests test_valgrind test_coverage
12931298
@@ -1324,6 +1329,9 @@ test_os_crypto: tests/test_os_crypto.c os_crypto.a shared.a os_xml.a os_net.a os
13241329test_shared : tests/test_shared.c shared.a os_xml.a os_net.a os_regex.a ${JSON_LIB}
13251330 ${OSSEC_CCBIN} ${OSSEC_CFLAGS} $^ ${OSSEC_LDFLAGS} -o $@
13261331
1332+ test_seechanges : tests/test_seechanges.o syscheckd/seechanges.o config.a shared.a os_xml.a os_net.a os_regex.a os_crypto.a ${ZLIB_LIB} ${JSON_LIB}
1333+ ${OSSEC_CCBIN} ${OSSEC_CFLAGS} $^ ${OSSEC_LDFLAGS} -o $@
1334+
13271335test_valgrind : build_tests
13281336 valgrind --leak-check=full --track-origins=yes --trace-children=yes --vgdb=no --error-exitcode=0 --gen-suppressions=all --suppressions=tests/valgrind.supp ${MAKE} run_tests
13291337
You can’t perform that action at this time.
0 commit comments