You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
640 B
33 lines
640 B
CC=gcc
|
|
CFLAGS=-O2
|
|
LDFLAGS=-lm -lgmp -lz
|
|
|
|
|
|
IS_CC_GCC=$(shell $(CC) --version 2>/dev/null | grep -Eic 'gcc')
|
|
IS_CC_CLANG=$(shell $(CC) --version | grep -Eic '(llvm|clang)')
|
|
IS_CC_ICC=$(shell $(CC) --version | grep -Eic 'Intel')
|
|
|
|
|
|
ifneq ($(IS_CC_GCC), 0)
|
|
# compiler is GCC
|
|
CFLAGS+=-fopenmp
|
|
else
|
|
ifneq ($(IS_CC_CLANG), 0)
|
|
# compiler is CLANG
|
|
LDFLAGS+=-lomp
|
|
else
|
|
ifneq($(IS_CC_ICC), 0)
|
|
# compiler is Intel icc
|
|
CFLAGS+=-qopenmp
|
|
endif
|
|
endif
|
|
|
|
|
|
all: reducibility_complexity
|
|
|
|
clean:
|
|
rm -f reducibility_complexity
|
|
|
|
reducibility: reducibility_complexity.c
|
|
$(CC) $(CFLAGS) $(LDFLAGS) reducibility_complexity.c -o reducibility_complexity
|
|
|
|
|