diff --git a/Reducibility_Multiplex/Makefile b/Reducibility_Multiplex/Makefile index 40293cb..01e71fa 100644 --- a/Reducibility_Multiplex/Makefile +++ b/Reducibility_Multiplex/Makefile @@ -2,25 +2,30 @@ CC=gcc CFLAGS=-O2 LDFLAGS=-lm -lgmp -lz -IS_CC_GCC=$(shell $(CC) --version | grep -Eic 'gcc') -IS_CC_CLANG=$(shell $(CC) --version | grep -Eic '(llvm|clang)') -IS_CC_ICC=$(shell $(CC) --version | grep -Eic 'Intel') +HAVE_CC=$(shell $(CC) --version ; echo \$?) + +IS_CC_GCC=$(shell $(CC) --version | grep -Eic 'gcc' || echo "0") +IS_CC_CLANG=$(shell $(CC) --version | grep -Eic '(llvm|clang)' || echo "0") +IS_CC_ICC=$(shell $(CC) --version | grep -Eic 'Intel' || echo "0") + ifeq ($(IS_CC_GCC), 1) +# compiler is GCC CFLAGS+=-fopenmp else - ifneq ($(IS_CC_CGLANG), 0) + ifeq ($(IS_CC_CGLANG), 1) +# compiler is CLANG LDFLAGS+=-lomp + else + ifeq ($(IS_CC_ICC), 1) +# compiler is Intel icc + CFLAGS+=-qopenmp + endif endif -#else -# ifeq ($(IS_CC_ICC), 1) -# -# endif - endif -all: reducibility +all: reducibility_complexity clean: rm -f reducibility_complexity