-
Notifications
You must be signed in to change notification settings - Fork 57
/
Makefile
91 lines (78 loc) · 3.45 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
python_plotter := python -c 'from pylab import*;X=loadtxt(sys.stdin);scatter(X[0],X[1]);title("Embedding");grid();show()'
plotter := $(python_plotter)
default:
@(git submodule update --init)
@(mkdir -p build; cd build; cmake -DBUILD_EXAMPLES=ON ..; make)
install: default
@(cd build; make install)
test:
@(git submodule update --init)
@(mkdir -p build; cd build; cmake -DBUILD_TESTS=ON ..; make)
@(cd build; ctest -VV)
codeql:
@(mkdir -p build; cd build; cmake -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON ..; make)
minimal: default
@(echo '--- Code ---'; \
cat ./examples/minimal/minimal.cpp;\
echo '--- Description ---'; \
cat ./examples/minimal/minimal.md; \
echo '--- Running ---'; \
echo 'Result is: '; \
./bin/minimal)
rna: default
@(echo '--- Code ---'; \
cat ./examples/rna/rna.cpp; \
echo '--- Description ---'; \
cat ./examples/rna/rna.md; \
echo '--- Plotting ---'; \
./bin/rna examples/rna/rna.dat | $(plotter) \
);
precomputed: default
@(echo '--- Code ---'; \
cat ./examples/precomputed/precomputed.cpp;\
echo '--- Description ---'; \
cat ./examples/precomputed/precomputed.md; \
echo '--- Running ---'; \
echo 'Result is: '; \
./bin/precomputed)
langs:
@(if (python -c 'from modshogun import LocallyLinearEmbedding' > /dev/null 2>&1); \
then \
echo '--- Description ---'; \
cat ./examples/langs/langs.md; \
echo '--- Python example ---'; \
cat examples/langs/lle.py; \
echo '--- Running ---'; \
python examples/langs/lle.py; \
echo '--- Octave example ---'; \
cat examples/langs/ltsa.m; \
echo '--- Running ---'; \
octave examples/langs/ltsa.m; \
else \
echo 'Shogun machine learning toolbox is not installed or compiled without Tapkee (may lack some dependencies)' \
' (https://github.com/shogun-toolbox/shogun)'; \
fi;)
promoters:
@(if (python -c 'from modshogun import LocallyLinearEmbedding' > /dev/null 2>&1); \
then \
echo '--- Description ---'; \
cat ./examples/promoters/promoters.md; \
echo '--- Embedding and plotting (please wait, a window will appear in a minute) ---'; \
python examples/promoters/promoters.py data/mml.txt; \
else \
echo 'Shogun machine learning toolbox is not installed or compiled without Tapkee (may lack some dependencies)' \
' (https://github.com/shogun-toolbox/shogun)'; \
fi;)
mnist: default
@(echo '--- Description ---'; \
cat ./examples/mnist/mnist.md; \
echo '--- Embedding and plotting (please wait, a window will appear in a minute) ---'; \
python examples/mnist/mnist.py data/mnist.json)
faces: default
@(echo '--- Description ---'; \
cat ./examples/faces/faces.md; \
echo '--- Embedding and plotting (please wait, a window will appear in a few seconds) ---'; \
python examples/faces/faces.py data/faces)
format: default
@(find . -iname *.hpp -o -iname *.cpp -iname *.h | xargs clang-format -i)
.PHONY: test minimal rna precomputed promoters mnist faces