2012-01-28 05:25:39 +00:00
|
|
|
#
|
|
|
|
# **************************************************************
|
|
|
|
# * C++ Mathematical Expression Toolkit Library *
|
|
|
|
# * *
|
2018-01-01 01:37:50 +00:00
|
|
|
# * Author: Arash Partow (1999-2018) *
|
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 *
|
2017-02-21 21:44:24 +00:00
|
|
|
# * most current version of the MIT License. *
|
|
|
|
# * http://www.opensource.org/licenses/MIT *
|
2012-01-28 05:25:39 +00:00
|
|
|
# * *
|
|
|
|
# **************************************************************
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
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
|
2014-10-27 10:57:30 +00:00
|
|
|
OPTIONS = $(BASE_OPTIONS) $(OPTIMIZATION_OPT)
|
2013-12-08 22:30:01 +00:00
|
|
|
LINKER_OPT = -L/usr/lib -lstdc++ -lm
|
2016-12-18 04:34:51 +00:00
|
|
|
ASAN_OPT = -g -fsanitize=address -fno-omit-frame-pointer
|
|
|
|
MSAN_OPT = -g -fsanitize=memory -fno-omit-frame-pointer
|
|
|
|
LSAN_OPT = -g -fsanitize=leak -fno-omit-frame-pointer
|
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
|
2014-06-08 09:24:53 +00:00
|
|
|
BUILD_LIST+=exprtk_simple_example_14
|
2014-06-09 07:36:58 +00:00
|
|
|
BUILD_LIST+=exprtk_simple_example_15
|
2014-07-15 13:09:08 +00:00
|
|
|
BUILD_LIST+=exprtk_simple_example_16
|
2016-08-31 23:21:23 +00:00
|
|
|
BUILD_LIST+=exprtk_simple_example_17
|
2016-10-02 09:23:18 +00:00
|
|
|
BUILD_LIST+=exprtk_simple_example_18
|
2016-10-19 09:07:59 +00:00
|
|
|
BUILD_LIST+=exprtk_simple_example_19
|
2012-01-28 05:25:39 +00:00
|
|
|
|
2013-04-14 07:01:14 +00:00
|
|
|
|
2014-10-27 10:57:30 +00:00
|
|
|
all: $(BUILD_LIST)
|
2014-05-30 21:38:57 +00:00
|
|
|
|
2014-10-27 10:57:30 +00:00
|
|
|
$(BUILD_LIST) : %: %.cpp exprtk.hpp
|
|
|
|
$(COMPILER) $(OPTIONS) -o $@ $@.cpp $(LINKER_OPT)
|
2014-06-08 09:24:53 +00:00
|
|
|
|
2014-10-27 10:57:30 +00:00
|
|
|
strip_bin :
|
|
|
|
@for f in $(BUILD_LIST); do if [ -f $$f ]; then strip -s $$f; echo $$f; fi done;
|
2014-06-09 07:36:58 +00:00
|
|
|
|
2014-10-27 10:57:30 +00:00
|
|
|
valgrind :
|
|
|
|
@for f in $(BUILD_LIST); do \
|
|
|
|
if [ -f $$f ]; then \
|
|
|
|
cmd="valgrind --leak-check=full --show-reachable=yes --track-origins=yes --log-file=$$f.log -v ./$$f"; \
|
|
|
|
echo $$cmd; \
|
|
|
|
$$cmd; \
|
|
|
|
fi done;
|
2014-07-15 13:09:08 +00:00
|
|
|
|
|
|
|
pgo: exprtk_benchmark.cpp exprtk.hpp
|
2012-03-13 20:12:58 +00:00
|
|
|
$(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
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f core.* *~ *.o *.bak *stackdump gmon.out *.gcda *.gcno *.gcnor *.gch
|