Skip to content

Commit

Permalink
fixed makefile to work correctly with travis
Browse files Browse the repository at this point in the history
  • Loading branch information
jtramm committed Jul 31, 2019
1 parent 7ca254b commit 15fd18e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions openmp-threading/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
# User Options
#===============================================================================

# Compiler options are "gnu", "llvm", and "intel".
# This can be set below, or with the "COMPILER" environment variable.
# Default is gnu.
ifeq ($(COMPILER),)
COMPILER = gnu
# Compiler can be set below, or via environment variable
ifeq ($(CC),)
CC = gcc
endif
OPTIMIZE = yes
DEBUG = no
Expand All @@ -32,24 +30,26 @@ obj = $(source:.c=.o)
# Sets Flags
#===============================================================================

# Make sure we didn't pick up lower case cc
ifeq (cc,$(CC))
CC = gcc
endif

# Standard Flags
CFLAGS := -std=gnu99 -Wall

# gcc Compiler
ifeq ($(COMPILER),gnu)
CC = gcc
ifneq (,$(findstring gcc,$(CC)))
CFLAGS += -fopenmp -flto
endif

# LLVM Compiler
ifeq ($(COMPILER),llvm)
CC = clang
ifneq (,$(findstring clang,$(CC)))
CFLAGS += -fopenmp -flto
endif

# intel compiler
ifeq ($(COMPILER),intel)
CC = icc
# Intel Compiler
ifneq (,$(findstring intel,$(CC)))
CFLAGS += -qopenmp -ipo
endif

Expand Down

0 comments on commit 15fd18e

Please sign in to comment.