regress: link on Linux with -lrt

This commit is contained in:
me 2016-12-26 14:16:56 +08:00
parent cc45f99bec
commit 87e8532e67
3 changed files with 12 additions and 1 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh
set -ex
mkdir cmocka
mkdir -p cmocka
#wget https://cmocka.org/files/1.1/cmocka-1.1.0.tar.xz -O /tmp/cmocka-1.1.0.tar.xz
wget --no-check-certificate http://cmocka.org/files/1.1/cmocka-1.1.0.tar.xz -O /tmp/cmocka-1.1.0.tar.xz
tar -xf /tmp/cmocka-1.1.0.tar.xz -C /tmp

View file

@ -1,6 +1,11 @@
CFLAGS += -Wall -Werror -I../../include
LDLIBS += -L../../ -lpthread -lm -lunicorn
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S), Linux)
LDLIBS += -lrt
endif
EXECUTE_VARS = LD_LIBRARY_PATH=../../cmocka/src:../../ DYLD_LIBRARY_PATH=../../
TESTS_SOURCE = $(wildcard *.c)

View file

@ -3,6 +3,12 @@ CFLAGS += -L ../../ -I ../../include
CFLAGS += -L ../../cmocka/src -I ../../cmocka/include
LDLIBS += -lcmocka -lunicorn
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S), Linux)
LDLIBS += -lrt
endif
EXECUTE_VARS = LD_LIBRARY_PATH=../../cmocka/src:../../ DYLD_LIBRARY_PATH=../../
ifeq ($(UNICORN_ASAN),yes)