recognise also icc

enzo-makefile
KatolaZ 5 years ago
parent 130ca65156
commit ce8a330797
  1. 25
      Reducibility_Multiplex/Makefile

@ -2,25 +2,30 @@ CC=gcc
CFLAGS=-O2 CFLAGS=-O2
LDFLAGS=-lm -lgmp -lz LDFLAGS=-lm -lgmp -lz
IS_CC_GCC=$(shell $(CC) --version | grep -Eic 'gcc') HAVE_CC=$(shell $(CC) --version ; echo \$?)
IS_CC_CLANG=$(shell $(CC) --version | grep -Eic '(llvm|clang)')
IS_CC_ICC=$(shell $(CC) --version | grep -Eic 'Intel') 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) ifeq ($(IS_CC_GCC), 1)
# compiler is GCC
CFLAGS+=-fopenmp CFLAGS+=-fopenmp
else else
ifneq ($(IS_CC_CGLANG), 0) ifeq ($(IS_CC_CGLANG), 1)
# compiler is CLANG
LDFLAGS+=-lomp LDFLAGS+=-lomp
else
ifeq ($(IS_CC_ICC), 1)
# compiler is Intel icc
CFLAGS+=-qopenmp
endif
endif endif
#else
# ifeq ($(IS_CC_ICC), 1)
#
# endif
endif endif
all: reducibility all: reducibility_complexity
clean: clean:
rm -f reducibility_complexity rm -f reducibility_complexity

Loading…
Cancel
Save