From f111d7d1caab8500845c607ab7b1798f00743501 Mon Sep 17 00:00:00 2001 From: xorstream Date: Wed, 16 Dec 2015 12:59:30 +1100 Subject: [PATCH] Added support for building tests from MinGW. --- .gitignore | 1 + tests/regress/Makefile | 8 +++++++- tests/regress/mips_delay_slot_code_hook.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 86d5d104..05a649f5 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ *.dSYM *.so *.so.* +*.exe qemu/config-all-devices.mak diff --git a/tests/regress/Makefile b/tests/regress/Makefile index 3221f939..dd20749b 100644 --- a/tests/regress/Makefile +++ b/tests/regress/Makefile @@ -1,5 +1,11 @@ -CFLAGS += -I../include + +CFLAGS += -I../../include + +ifeq (MING,$(findstring MING,$(shell uname -s))) +LDFLAGS += ../../unicorn.lib $(shell pkg-config --libs glib-2.0) -lpthread -lm +else LDFLAGS += ../../libunicorn.a $(shell pkg-config --libs glib-2.0) -lpthread -lm +endif TESTS = map_crash map_write TESTS += sigill sigill2 diff --git a/tests/regress/mips_delay_slot_code_hook.c b/tests/regress/mips_delay_slot_code_hook.c index d3bc0e23..905cad8d 100644 --- a/tests/regress/mips_delay_slot_code_hook.c +++ b/tests/regress/mips_delay_slot_code_hook.c @@ -15,7 +15,7 @@ but that the code hook is just not occurring. #include #define PRIx64 "llX" #ifdef DYNLOAD -#include +#include #else // DYNLOAD #include #ifdef _WIN64