forked from ArashPartow/exprtk-extras
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (57 loc) · 2.27 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#
# **************************************************************
# * C++ Mathematical Expression Toolkit Library *
# * *
# * Extra Examples *
# * Author: Arash Partow (1999-2017) *
# * 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 MIT License. *
# * http://www.opensource.org/licenses/MIT *
# * *
# **************************************************************
#
COMPILER = -c++
#COMPILER = -clang
OPTIMIZATION_OPT = -O2
BASE_OPTIONS = -pedantic-errors -Wall -Wextra -Werror -Wno-long-long
OPTIONS = $(BASE_OPTIONS) $(OPTIMIZATION_OPT)
LINKER_OPT = -L/usr/lib -lstdc++ -lm
BUILD_LIST+=exprtk_bsm_benchmark
BUILD_LIST+=exprtk_binomial_coefficient
BUILD_LIST+=exprtk_calc
BUILD_LIST+=exprtk_collatz
BUILD_LIST+=exprtk_fizzbuzz
BUILD_LIST+=exprtk_funcall_benchmark
BUILD_LIST+=exprtk_gcd
BUILD_LIST+=exprtk_gnuplot
BUILD_LIST+=exprtk_gnuplot_multi
BUILD_LIST+=exprtk_mandelbrot
BUILD_LIST+=exprtk_max_subarray_sum
BUILD_LIST+=exprtk_montecarlo_pi
BUILD_LIST+=exprtk_nthroot_bisection
BUILD_LIST+=exprtk_prime_sieve
BUILD_LIST+=exprtk_repl
BUILD_LIST+=exprtk_sumofprimes
BUILD_LIST+=exprtk_testgen
BUILD_LIST+=exprtk_truthtable_gen
BUILD_LIST+=exprtk_vectornorm
BUILD_LIST+=exprtk_vector_benchmark
BUILD_LIST+=exprtk_wiener_process_pi
all: $(BUILD_LIST)
$(BUILD_LIST) : %: %.cpp exprtk.hpp
$(COMPILER) $(OPTIONS) -o $@ [email protected] $(LINKER_OPT)
strip_bin :
@for f in $(BUILD_LIST); do if [ -f $$f ]; then strip -s $$f; echo $$f; fi done;
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;
clean:
rm -f core.* *~ *.o *.bak *stackdump gmon.out *.gcda *.gcno *.gcnor *.gch