aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2022-12-31 19:27:00 +0200
committerIgor Pashev <pashev.igor@gmail.com>2022-12-31 19:42:29 +0200
commitde56e79dcb93c501add0c31ac9679eeb2ef80642 (patch)
treef177866f228be1c42973ed90245b06db95c4d616 /Makefile
parent4c61d8648252c0d52c26ba9d3b5df65e524ff6e4 (diff)
downloadmendeleev-de56e79dcb93c501add0c31ac9679eeb2ef80642.tar.gz
Add C++ (17)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d5399b9..732fdf6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
BINARIES := \
mendeleev-c \
mendeleev-c-cpp \
+ mendeleev-cpp \
mendeleev-f \
mendeleev-hs \
mendeleev-py \
@@ -76,10 +77,20 @@ prof-%-c.txt: prof-%-c.gmon
# C++
CXX = g++
-CXXFLAGS = -std=c++98 -Wall -Wextra -O2
+CXXFLAGS = -std=c++17 -Wall -Wextra -O2
%-c-cpp: %.c
$(CXX) $(CXXFLAGS) $< -o $@
+%-cpp: %.cpp
+ $(CXX) $(CXXFLAGS) $< -o $@
+
+CXXFLAGS_PROF = -O0 -g -pg
+prof-%-cpp: %.cpp
+ $(CXX) $(CXXFLAGS_PROF) $< -o $@
+
+prof-mendeleev-cpp.txt: prof-mendeleev-cpp.gmon
+ gprof --brief prof-mendeleev-cpp $< > $@
+
# Fortran
FC = gfortran