unicorn/tests/unit/Makefile

59 lines
1.4 KiB
Makefile
Raw Normal View History

2015-09-04 03:52:41 +02:00
2015-09-07 22:07:48 +02:00
CFLAGS += -Wall -Werror -Wno-unused-function -g
2015-09-07 21:05:55 +02:00
CFLAGS += -L ../../
CFLAGS += -I ../../include
2015-09-04 03:52:41 +02:00
2016-08-21 03:47:45 +02:00
LIBS += -lcmocka -lunicorn
ifeq ($(UNICORN_ASAN),yes)
CC = clang -fsanitize=address -fno-omit-frame-pointer
CXX = clang++ -fsanitize=address -fno-omit-frame-pointer
AR = llvm-ar
LDFLAGS := -fsanitize=address ${LDFLAGS}
endif
ALL_TESTS = test_sanity test_x86 test_mem_map test_mem_high test_mem_map_ptr \
test_tb_x86 test_multihook test_pc_change test_x86_soft_paging \
2016-08-21 03:47:45 +02:00
test_hookcounts test_hang test_x86_shl_enter_leave test_x86_rip_bug
2015-09-04 03:52:41 +02:00
2015-09-07 21:05:55 +02:00
.PHONY: all
2015-09-04 03:52:41 +02:00
all: ${ALL_TESTS}
2015-09-07 21:05:55 +02:00
.PHONY: clean
2015-09-04 03:52:41 +02:00
clean:
rm -rf ${ALL_TESTS}
2015-09-04 03:52:41 +02:00
2015-09-07 21:05:55 +02:00
.PHONY: test
test: export LD_LIBRARY_PATH=../../
test: ${ALL_TESTS}
./test_sanity
2015-09-07 22:07:48 +02:00
./test_x86
./test_mem_map
./test_mem_map_ptr
./test_mem_high
./test_tb_x86
./test_multihook
./test_pc_change
./test_x86_soft_paging
./test_hookcounts
2016-06-15 19:18:51 +02:00
./test_hang
2016-07-31 03:19:52 +02:00
./test_x86_shl_enter_leave
2016-08-21 03:47:45 +02:00
./test_x86_rip_bug
2015-09-07 21:05:55 +02:00
test_sanity: test_sanity.c
2015-09-04 03:52:41 +02:00
test_x86: test_x86.c
2015-09-07 21:05:55 +02:00
test_mem_map: test_mem_map.c
test_mem_map_ptr: test_mem_map_ptr.c
2015-12-08 18:23:06 +01:00
test_mem_high: test_mem_high.c
test_tb_x86: test_tb_x86.c
test_multihook: test_multihook.c
test_pc_change: test_pc_change.c
test_x86_soft_paging: test_x86_soft_paging.c
test_hookcounts: test_hookcounts.c
2016-06-15 19:18:51 +02:00
test_hang: test_hang.c
2016-07-31 03:19:52 +02:00
test_x86_shl_enter_leave: test_x86_shl_enter_leave.c
2016-08-21 03:47:45 +02:00
test_x86_rip_bug: test_x86_rip_bug.c
2015-09-07 21:05:55 +02:00
${ALL_TESTS}:
2016-08-21 03:47:45 +02:00
${CC} ${CFLAGS} -o $@ $^ ${LIBS}