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
@@ -1272,6 +1274,9 @@ ifdef TEST
12721274endif # TEST
12731275
12741276test_programs = test_os_zlib test_os_xml test_os_regex test_os_crypto test_shared
1277+ ifneq ($(filter -DUSE_MAGIC,$(DEFINES ) ) ,)
1278+ test_programs += test_seechanges
1279+ endif
12751280
12761281.PHONY : test run_tests build_tests test_valgrind test_coverage
12771282
@@ -1308,6 +1313,9 @@ test_os_crypto: tests/test_os_crypto.c os_crypto.a shared.a os_xml.a os_net.a os
13081313test_shared : tests/test_shared.c shared.a os_xml.a os_net.a os_regex.a ${JSON_LIB}
13091314 ${OSSEC_CCBIN} ${OSSEC_CFLAGS} $^ ${OSSEC_LDFLAGS} -o $@
13101315
1316+ 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}
1317+ ${OSSEC_CCBIN} ${OSSEC_CFLAGS} $^ ${OSSEC_LDFLAGS} -o $@
1318+
13111319test_valgrind : build_tests
13121320 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
13131321
You can’t perform that action at this time.
0 commit comments