diff --git a/tests/Makefile b/tests/Makefile index 4eb33a61..22d818ec 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -6,7 +6,13 @@ LIBDIR = .. CC = $(CROSS)gcc +COMPILER = $(shell $(CC) -v 2>&1 ) +ifeq ($(findstring clang,$(COMPILER)),clang) +# clang doesnt like -L option +CFLAGS += -fPIC -O3 -Wall -I$(INCDIR) +else CFLAGS += -fPIC -O3 -Wall -I$(INCDIR) -L$(LIBDIR) +endif LIBNAME = capstone