Skip to content

Commit

Permalink
Link tests with static libyara.
Browse files Browse the repository at this point in the history
Some tests use function that are not exported with YR_API and therefore are not found when linking with the dynamic library.
  • Loading branch information
plusvic committed Aug 14, 2018
1 parent 97138a4 commit ce1b355
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,20 @@ if POSIX
if !ADDRESS_SANITIZER
check_PROGRAMS+=test-exception
test_exception_SOURCES = tests/test-exception.c tests/util.c
test_exception_LDADD = -Llibyara/.libs -lyara
test_exception_LDADD = libyara/.libs/libyara.a
endif
endif

if MACHO_MODULE
check_PROGRAMS+=test-macho
test_macho_SOURCES = tests/test-macho.c tests/util.c
test_macho_LDADD = -Llibyara/.libs -lyara
test_macho_LDADD = libyara/.libs/libyara.a
endif

if DEX_MODULE
check_PROGRAMS+=test-dex
test_dex_SOURCES = tests/test-dex.c tests/util.c
test_dex_LDADD = -Llibyara/.libs -lyara
test_dex_LDADD = libyara/.libs/libyara.a
endif

# man pages
Expand Down
3 changes: 0 additions & 3 deletions tests/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <fcntl.h>

#include <yara.h>
#include <yara/atoms.h>
#include <yara/re.h>

#include "util.h"

char compile_error[1024];
Expand Down

0 comments on commit ce1b355

Please sign in to comment.