
#
# Copyright 2003-2018 Intel Corporation.
# 
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to you (License). Unless the License provides otherwise, you may
# not use, modify, copy, publish, distribute, disclose or transmit this
# software or the related documents without Intel's prior written permission.
# 
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in the
# License.
#
INCLUDES =
LDFLAGS  =
CFLAGS   = -O2
CXX      = mpiicpc
CC       = mpiicc

examples = thread_split thread_split_omp_for thread_split_omp_task thread_split_pthreads async_progress

CC_COMPILE = $(CC) $(CFLAGS) $(INCLUDES)
CXX_COMPILE = $(CXX) $(CFLAGS) $(INCLUDES)

all: $(examples)

thread_split:
	$(CXX_COMPILE) -o thread_split thread_split.cpp $(LDFLAGS) -qopenmp

thread_split_omp_for:
	$(CC_COMPILE) -o thread_split_omp_for thread_split_omp_for.c $(LDFLAGS) -qopenmp

thread_split_omp_task:
	$(CC_COMPILE) -o thread_split_omp_task thread_split_omp_task.c $(LDFLAGS) -qopenmp

thread_split_pthreads:
	$(CC_COMPILE) -o thread_split_pthreads thread_split_pthreads.c $(LDFLAGS)

async_progress:
	$(CC_COMPILE) -o async_progress async_progress.c $(LDFLAGS)

clean:
	-rm -f $(examples).o $(examples)
