48 lines
948 B
Makefile
48 lines
948 B
Makefile
#
|
|
# use GNU-Compiler tools
|
|
COMPILER=GCC_
|
|
# alternatively from the shell
|
|
# export COMPILER=GCC_
|
|
# or, alternatively from the shell
|
|
# make COMPILER=GCC_
|
|
|
|
# use Intel compilers
|
|
#COMPILER=ICC_
|
|
|
|
# use PGI compilers
|
|
# COMPILER=PGI_
|
|
|
|
# use CLANG compilers
|
|
# COMPILER=CLANG_
|
|
|
|
|
|
#SOURCES = main.cpp
|
|
SOURCES = gh_main.cpp
|
|
OBJECTS = $(SOURCES:.cpp=.o)
|
|
|
|
PROGRAM = main.${COMPILER}
|
|
|
|
# uncomment the next to lines for debugging and detailed performance analysis
|
|
CXXFLAGS += -g
|
|
LINKFLAGS += -g
|
|
# needed for parallel threads in C++-17
|
|
LINKFLAGS += -ltbb
|
|
|
|
#https://stackoverflow.com/questions/67923287/how-to-resolve-no-member-named-task-in-namespace-tbb-error-when-using-oned
|
|
#dpcpp my_app.cpp -DPSTL_USE_PARALLEL_POLICIES=0 # for libstdc++ 9
|
|
#dpcpp my_app.cpp -D_GLIBCXX_USE_TBB_PAR_BACKEND=0 # for libstdc++ 10
|
|
|
|
|
|
# do not use -pg with PGI compilers
|
|
|
|
ifndef COMPILER
|
|
COMPILER=GCC_
|
|
endif
|
|
|
|
include ../${COMPILER}default.mk
|
|
|
|
|
|
task:
|
|
@pdflatex task
|
|
@pdflatex task
|
|
|