-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.john
144 lines (125 loc) · 2.7 KB
/
Makefile.john
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
SHELL = /bin/sh
PROGS = caret \
caret_command \
caret_edit
LIBS = \
caret_statistics \
caret_common \
caret_files \
caret_brain_set \
caret_command_operations \
caret_uniformize \
caret_widgets \
caret_vtk4_classes
DIRS = $(LIBS) $(PROGS)
all:
@echo ""
@echo ""
@echo "Use \"make qmake-static\" to create the makefiles with static libraries."
@echo "Use \"make qmake-dynamic\" to create the makefiles with dynamic libraries."
@echo "Use \"make build\" to build the libraries and executables."
@echo "Use \"make clean\" to remove executables, libraries, and objects."
@echo ""
@echo "Use \"make doc\" to build the Doxygen generated documentation."
@echo ""
doc:
doxygen Doxyfile
build:
@for i in ${DIRS} ; do \
echo "making " $$i ; \
cd $$i ; \
make ; \
cd .. ; \
done
build8:
@for i in ${DIRS} ; do \
echo "making " $$i ; \
cd $$i ; \
make -j 8; \
cd .. ; \
done
build4:
@for i in ${DIRS} ; do \
echo "making " $$i ; \
cd $$i ; \
make -j 4; \
cd .. ; \
done
build2:
@for i in ${DIRS} ; do \
echo "making " $$i ; \
cd $$i ; \
make -j 2; \
cd .. ; \
done
clean:
@for i in ${DIRS} ; do \
echo "cleaning " $$i ; \
cd $$i ; \
make clean ; \
cd .. ; \
done
qmake-static:
@for i in ${LIBS} ; do \
echo "creating makefile for static libs with qmake for " $$i ; \
cd $$i ; \
qmake ; \
cd .. ; \
done
@for i in ${PROGS} ; do \
echo "creating makefile with qmake for " $$i ; \
cd $$i ; \
qmake ; \
cd .. ; \
done
qmake-dynamic:
@for i in ${LIBS} ; do \
echo "creating makefile for dynamic libs with qmake for " $$i ; \
cd $$i ; \
qmake "CONFIG+=dll"; \
cd .. ; \
done
@for i in ${PROGS} ; do \
echo "creating makefile with qmake for " $$i ; \
cd $$i ; \
qmake ; \
cd .. ; \
done
rebuild:
make qmake-static
make build
rebuild8:
make qmake-static
make build8
rebuild4:
make qmake-static
make build4
rebuild2:
make qmake-static
make build2
check_env:
@cnt=""
@if [ "${VTK_INC_DIR}" == "" ]; then \
echo "Environment variable VTK_INC_DIR not set" ; \
cnt="1" ; \
fi ;
@if [ "${VTK_LIB_DIR}" == "" ]; then \
echo "Environment variable VTK_LIB_DIR not set" ; \
cnt="1" ; \
fi ;
@if [ "${NETCDF_INC_DIR}" == "" ]; then \
echo "Environment variable NETCDF_INC_DIR not set" ; \
cnt="1" ; \
fi ;
@if [ "${NETCDF_LIB_DIR}" == "" ]; then \
echo "Environment variable NETCDF_LIB_DIR not set" ; \
cnt="1" ; \
fi ;
# @if [ "$cnt" != "" ]; then \
# echo "Required environment variables are not set" ; \
# fi ;
test:
echo "Testing" ; \
cd testing ; \
./run_test.sh ; \
cd .. ;