2012-01-28 05:25:39 +00:00
|
|
|
#
|
|
|
|
# **************************************************************
|
|
|
|
# * C++ Mathematical Expression Toolkit Library *
|
|
|
|
# * *
|
|
|
|
# * Author: Arash Partow (1999-2012) *
|
|
|
|
# * 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
|
|
|
|
BASE_OPTIONS = -ansi -pedantic-errors -Wall -Wextra -Werror -Wno-long-long
|
|
|
|
OPTIONS = $(BASE_OPTIONS) $(OPTIMIZATION_OPT) -o
|
|
|
|
LINKER_OPT = -L/usr/lib -lstdc++
|
|
|
|
|
|
|
|
BUILD_LIST+=exprtk_test
|
2012-03-13 20:12:58 +00:00
|
|
|
BUILD_LIST+=exprtk_benchmark
|
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
|
|
|
|
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
|
2012-01-28 05:25:39 +00:00
|
|
|
|
|
|
|
valgrind_check:
|
2013-01-30 13:28:22 +00:00
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes -v ./exprtk_test
|
|
|
|
valgrind --leak-check=full --show-reachable=yes --track-origins=yes -v ./exprtk_benchmark
|
2012-01-28 05:25:39 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f core.* *~ *.o *.bak *stackdump gmon.out *.gcda *.gcno *.gcnor *.gch
|