Compare commits
6 Commits
master
...
enzo-makef
Author | SHA1 | Date |
---|---|---|
|
c049343260 | 5 years ago |
|
68e1ef45cc | 5 years ago |
|
74f2ff7d47 | 5 years ago |
|
f5fab30540 | 5 years ago |
|
ce8a330797 | 5 years ago |
|
130ca65156 | 5 years ago |
@ -1,12 +1,40 @@ |
||||
CC=gcc
|
||||
CFLAGS=-Iinclude -g -O3
|
||||
CFLAGS=-O2
|
||||
LDLIBS=-lm -lgmp -lz
|
||||
|
||||
|
||||
all: reducibility |
||||
CC_RUNS=$(shell \$($(CC) --version >/dev/null ))
|
||||
|
||||
##$(info $$CC_RUNS is [${CC_RUNS}])
|
||||
|
||||
#ifeq ($(CC_RUNS), "")
|
||||
ifdef CC_RUNS |
||||
IS_CC_GCC=$(shell $(CC) --version 2>/dev/null | grep -Eic '(GCC)')
|
||||
##$(info $$IS_CC_GCC is [${IS_CC_GCC}])
|
||||
ifneq ($(IS_CC_GCC), 0) |
||||
# compiler is GCC
|
||||
CFLAGS+=-fopenmp
|
||||
else |
||||
IS_CC_ICC=$(shell $(CC) --version 2>/dev/null | grep -Eic 'Intel')
|
||||
##$(info $$IS_CC_ICC is [${IS_CC_ICC}])
|
||||
ifneq ($(IS_CC_ICC), 0) |
||||
# compiler is Intel icc
|
||||
CFLAGS+=-qopenmp
|
||||
else |
||||
IS_CC_CLANG=$(shell $(CC) --version 2>/dev/null | grep -Eic '(llvm|clang)')
|
||||
##$(info $$IS_CC_CLANG is [${IS_CC_CLANG}])
|
||||
ifeq ($(IS_CC_CLANG), 1) |
||||
# compiler is CLANG
|
||||
LDLIBS+=-lomp
|
||||
endif |
||||
endif |
||||
endif |
||||
endif |
||||
all: reducibility_complexity |
||||
|
||||
clean: |
||||
rm -f reducibility_complexity
|
||||
|
||||
reducibility: reducibility_complexity.c |
||||
$(CC) $(CFLAGS) reducibility_complexity.c -fopenmp -lm -lgmp -lz -o reducibility_complexity
|
||||
$(CC) $(CFLAGS) reducibility_complexity.c -o reducibility_complexity
|
||||
|
||||
|
Binary file not shown.
Loading…
Reference in new issue