2012-01-28 05:25:39 +00:00
|
|
|
#
|
|
|
|
# **************************************************************
|
|
|
|
# * C++ Mathematical Expression Toolkit Library *
|
|
|
|
# * *
|
2013-12-30 10:09:57 +00:00
|
|
|
# * Author: Arash Partow (1999-2014) *
|
2012-01-28 05:25:39 +00:00
|
|
|
# * URL: http://www.partow.net/programming/exprtk/index.html *
|
|
|
|
# * *
|
|
|
|
# * Copyright notice: *
|
|
|
|
# * Free use of the Mathematical Expression Toolkit Library is *
|
|
|
|
# * permitted under the guidelines and in accordance with the *
|
|
|
|
# * most current version of the Common Public License. *
|
|
|
|
# * http://www.opensource.org/licenses/cpl1.0.php *
|
|
|
|
# * *
|
|
|
|
# **************************************************************
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
COMPILER = -c++
|
|
|
|
#COMPILER = -clang
|
|
|
|
OPTIMIZATION_OPT = -O1
|
2014-01-03 10:42:54 +00:00
|
|
|
BASE_OPTIONS = -pedantic-errors -Wall -Wextra -Werror -Wno-long-long
|
2012-01-28 05:25:39 +00:00
|
|
|
OPTIONS = $(BASE_OPTIONS) $(OPTIMIZATION_OPT) -o
|
2013-12-08 22:30:01 +00:00
|
|
|
LINKER_OPT = -L/usr/lib -lstdc++ -lm
|
2012-01-28 05:25:39 +00:00
|
|
|
|
|
|
|
BUILD_LIST+=exprtk_test
|
2012-03-13 20:12:58 +00:00
|
|
|
BUILD_LIST+=exprtk_benchmark
|
2013-04-14 07:01:14 +00:00
|
|
|
BUILD_LIST+=exprtk_simple_example_01
|
|
|
|
BUILD_LIST+=exprtk_simple_example_02
|
|
|
|
BUILD_LIST+=exprtk_simple_example_03
|
|
|
|
BUILD_LIST+=exprtk_simple_example_04
|
|
|
|
BUILD_LIST+=exprtk_simple_example_05
|
|
|
|
BUILD_LIST+=exprtk_simple_example_06
|
|
|
|
BUILD_LIST+=exprtk_simple_example_07
|
|
|
|
BUILD_LIST+=exprtk_simple_example_08
|
|
|
|
BUILD_LIST+=exprtk_simple_example_09
|
2013-04-23 11:30:49 +00:00
|
|
|
BUILD_LIST+=exprtk_simple_example_10
|
2014-04-19 11:10:15 +00:00
|
|
|
BUILD_LIST+=exprtk_simple_example_11
|
2014-04-21 10:08:53 +00:00
|
|
|
BUILD_LIST+=exprtk_simple_example_12
|
2014-05-30 21:38:57 +00:00
|
|
|
BUILD_LIST+=exprtk_simple_example_13
|
2012-01-28 05:25:39 +00:00
|
|
|
|
|
|
|
all: $(BUILD_LIST)
|
|
|
|
|
|
|
|
exprtk_test: exprtk_test.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) exprtk_test exprtk_test.cpp $(LINKER_OPT)
|
|
|
|
|
2012-03-13 20:12:58 +00:00
|
|
|
exprtk_benchmark: exprtk_benchmark.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) exprtk_benchmark exprtk_benchmark.cpp $(LINKER_OPT)
|
2012-01-28 05:25:39 +00:00
|
|
|
|
2013-04-14 07:01:14 +00:00
|
|
|
exprtk_simple_example_01: exprtk_simple_example_01.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) exprtk_simple_example_01 exprtk_simple_example_01.cpp $(LINKER_OPT)
|
|
|
|
|
|
|
|
exprtk_simple_example_02: exprtk_simple_example_02.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) exprtk_simple_example_02 exprtk_simple_example_02.cpp $(LINKER_OPT)
|
|
|
|
|
|
|
|
exprtk_simple_example_03: exprtk_simple_example_03.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) exprtk_simple_example_03 exprtk_simple_example_03.cpp $(LINKER_OPT)
|
|
|
|
|
|
|
|
exprtk_simple_example_04: exprtk_simple_example_04.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) exprtk_simple_example_04 exprtk_simple_example_04.cpp $(LINKER_OPT)
|
|
|
|
|
|
|
|
exprtk_simple_example_05: exprtk_simple_example_05.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) exprtk_simple_example_05 exprtk_simple_example_05.cpp $(LINKER_OPT)
|
|
|
|
|
|
|
|
exprtk_simple_example_06: exprtk_simple_example_06.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) exprtk_simple_example_06 exprtk_simple_example_06.cpp $(LINKER_OPT)
|
|
|
|
|
|
|
|
exprtk_simple_example_07: exprtk_simple_example_07.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) exprtk_simple_example_07 exprtk_simple_example_07.cpp $(LINKER_OPT)
|
|
|
|
|
|
|
|
exprtk_simple_example_08: exprtk_simple_example_08.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) exprtk_simple_example_08 exprtk_simple_example_08.cpp $(LINKER_OPT)
|
|
|
|
|
|
|
|
exprtk_simple_example_09: exprtk_simple_example_09.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) exprtk_simple_example_09 exprtk_simple_example_09.cpp $(LINKER_OPT)
|
|
|
|
|
2013-04-23 11:30:49 +00:00
|
|
|
exprtk_simple_example_10: exprtk_simple_example_10.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) exprtk_simple_example_10 exprtk_simple_example_10.cpp $(LINKER_OPT)
|
|
|
|
|
2014-04-19 11:10:15 +00:00
|
|
|
exprtk_simple_example_11: exprtk_simple_example_11.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) exprtk_simple_example_11 exprtk_simple_example_11.cpp $(LINKER_OPT)
|
|
|
|
|
2014-04-21 10:08:53 +00:00
|
|
|
exprtk_simple_example_12: exprtk_simple_example_12.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) exprtk_simple_example_12 exprtk_simple_example_12.cpp $(LINKER_OPT)
|
|
|
|
|
2014-05-30 21:38:57 +00:00
|
|
|
exprtk_simple_example_13: exprtk_simple_example_13.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) exprtk_simple_example_13 exprtk_simple_example_13.cpp $(LINKER_OPT)
|
|
|
|
|
2012-03-13 20:12:58 +00:00
|
|
|
pgo: exprtk_test.cpp exprtk_benchmark.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(BASE_OPTIONS) -O3 -march=native -fprofile-generate -o exprtk_benchmark exprtk_benchmark.cpp $(LINKER_OPT)
|
|
|
|
./exprtk_benchmark
|
|
|
|
$(COMPILER) $(BASE_OPTIONS) -O3 -march=native -fprofile-use -o exprtk_benchmark exprtk_benchmark.cpp $(LINKER_OPT)
|
2012-01-28 05:25:39 +00:00
|
|
|
|
|
|
|
strip_bin:
|
|
|
|
strip -s exprtk_test
|
2012-05-03 11:23:37 +00:00
|
|
|
strip -s exprtk_benchmark
|
2013-04-14 07:01:14 +00:00
|
|
|
strip -s exprtk_simple_example_01
|
|
|
|
strip -s exprtk_simple_example_02
|
|
|
|
strip -s exprtk_simple_example_03
|
|
|
|
strip -s exprtk_simple_example_04
|
|
|
|
strip -s exprtk_simple_example_05
|
|
|
|
strip -s exprtk_simple_example_06
|
|
|
|
strip -s exprtk_simple_example_07
|
|
|
|
strip -s exprtk_simple_example_08
|
|
|
|
strip -s exprtk_simple_example_09
|
2013-04-23 11:30:49 +00:00
|
|
|
strip -s exprtk_simple_example_10
|
2014-04-19 11:10:15 +00:00
|
|
|
strip -s exprtk_simple_example_11
|
2014-04-21 10:08:53 +00:00
|
|
|
strip -s exprtk_simple_example_12
|
2014-05-30 21:38:57 +00:00
|
|
|
strip -s exprtk_simple_example_13
|
2012-01-28 05:25:39 +00:00
|
|
|
|
|
|
|
valgrind_check:
|
2014-05-27 21:10:40 +00:00
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=exprtk_test_valgrind.log -v ./exprtk_test
|
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=exprtk_benchmark_valgrind.log -v ./exprtk_benchmark
|
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=exprtk_simple_example_01_valgrind.log -v ./exprtk_simple_example_01
|
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=exprtk_simple_example_02_valgrind.log -v ./exprtk_simple_example_02
|
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=exprtk_simple_example_03_valgrind.log -v ./exprtk_simple_example_03
|
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=exprtk_simple_example_04_valgrind.log -v ./exprtk_simple_example_04
|
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=exprtk_simple_example_05_valgrind.log -v ./exprtk_simple_example_05
|
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=exprtk_simple_example_06_valgrind.log -v ./exprtk_simple_example_06
|
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=exprtk_simple_example_07_valgrind.log -v ./exprtk_simple_example_07
|
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=exprtk_simple_example_08_valgrind.log -v ./exprtk_simple_example_08
|
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=exprtk_simple_example_09_valgrind.log -v ./exprtk_simple_example_09
|
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=exprtk_simple_example_10_valgrind.log -v ./exprtk_simple_example_10
|
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=exprtk_simple_example_11_valgrind.log -v ./exprtk_simple_example_11
|
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=exprtk_simple_example_12_valgrind.log -v ./exprtk_simple_example_12
|
2014-05-30 21:38:57 +00:00
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=exprtk_simple_example_13_valgrind.log -v ./exprtk_simple_example_13
|
2012-01-28 05:25:39 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f core.* *~ *.o *.bak *stackdump gmon.out *.gcda *.gcno *.gcnor *.gch
|