forked from edrosten/TooN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
98 lines (71 loc) · 2.24 KB
/
Makefile.in
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
92
93
94
95
96
97
98
#Standard boilerplate
prefix = @prefix@
exec_prefix = @exec_prefix@
mandir = @mandir@
includedir = @includedir@
datarootdir = @datarootdir@
pkgconfig = @PKGCONFIG_LIBDIR@
ifneq "$(DESTDIR)" ""
DESTDIR+=/
endif
CXX=@CXX@
CXXFLAGS=@CXXFLAGS@
LDFLAGS=@LDFLAGS@ @LIBS@
hdr = $(DESTDIR)$(includedir)
.PHONY: all clean testclean
all:
@echo There is nothing to be compiled in TooN.
@echo It is now ready to be installed.
install:
mkdir -p $(hdr)/
cp -r TooN $(hdr)/
[ "$(pkgconfig)" = "" ] || mkdir -p $(DESTDIR)$(pkgconfig)
[ "$(pkgconfig)" = "" ] || cp TooN.pc $(DESTDIR)$(pkgconfig)/
internal/data_functions.hh: make_data_functions.awk
awk -f make_data_functions.awk > $@
internal/make_vector.hh: make_make_vector.awk
awk -f make_make_vector.awk > $@
internal/builtin_typeof.h:make_typeof.awk
awk -f make_typeof.awk > $@
clean: testclean
rm -rf html
docs:
doxygen
LAPACK_TESTS=eigen-sqrt chol_lapack sym_eigen qr lu determinant
BUILTIN_TESTS=slice vector_resize gauss_jordan chol_toon fill so3 complex gr_svd diagonal_matrix gaussian_elimination zeros swap initializer_list initializer_list_fail_1 initializer_list_fail_2 sim3
ifeq (@use_lapack@,yes)
TESTS=$(BUILTIN_TESTS) $(LAPACK_TESTS)
MISSING_TESTS=
else
TESTS=$(BUILTIN_TESTS)
MISSING_TESTS=$(LAPACK_TESTS)
endif
TEST_RESULT=$(TESTS:%=tests/%.result)
TEST_FILES=$(TESTS:%=tests/%.testout) $(TESTS:%=tests/%.test) $(TEST_RESULT)
testclean:
rm -f $(TEST_FILES)
foo:
echo $(MAKEFLAGS)
.PHONY: test
test:tests/results
@echo -------------- Test Results ---------------
@cat tests/results
@echo $(MISSING_TESTS) | awk '{for(i=1; i <= NF; i++) print $$i, "Missing."}'
tests/results:$(TEST_RESULT)
cat $(TEST_RESULT) > tests/results
.PRECIOUS: tests/%.testout tests/%.test
TooN:
ln -s "$$PWD" TooN
.INTERMEDIATE: TooN
#Build a test executable from a test program. On compile error,
#create an execuaable which decalres the error.
tests/%.test: tests/%.cc TooN
$(CXX) $(CXXFLAGS) $< -o $@ -DTOON_CHECK_BOUNDS -DTOON_INITIALIZE_SNAN -I . $(LDFLAGS) ||\
{ \
echo "echo 'Compile error!'" > $@ ; \
chmod +x $@; \
}
tests/%.testout: tests/%.test
$< > $@ || ( echo Crash!!! > $@ )
tests/%.result: tests/%.testout tests/%.txt
awk -vname=$* -f tests/numdiff.awk -vf1=$< -vf2=tests/$*.txt > $@