-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
155 lines (117 loc) · 2.72 KB
/
Copy pathmakefile
File metadata and controls
155 lines (117 loc) · 2.72 KB
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
145
146
147
148
149
150
151
152
153
include rules.$(shell uname)
PATH := $(PATH):.
export PATH
#
# To use this makefile:
#
# "make" with no arguments builds the tools
# "make tests" runs all the tests (1 minute at least)
# "sudo root make install" installs the tools
# "make install_tests" tests the installed tools
#
INSTALLABLES= covtool.exe \
covmerge.exe \
covannotate.exe \
covtoolhelper.o \
covtoolhelper_debug.o \
covtoolhelper.c \
README \
cov++ \
cov++.cfg \
COPYRIGHT \
covtool_version \
gen_html
install:
@mkdir -p $(INSTALL_DIR)
if [ -w $(INSTALL_DIR)/. ] ; \
then \
for f in $(INSTALLABLES) ;\
do \
echo "installing $$f" ;\
cp $$f $(INSTALL_DIR) ;\
done ;\
cp -r man $(INSTALL_DIR) ;\
else \
echo "Error: can't create $(INSTALL_DIR)" ; \
exit 1; \
fi
@echo ""
@echo ""
@echo ""
@echo "Installation complete"
@echo "Add $(INSTALL_DIR) to your path"
@echo ""
@echo "Then run make install_tests (but not as ROOT!)"
@echo ""
@echo ""
@echo "Also, add $(INSTALL_DIR) to your MANPATH."
@echo ""
install_tests:
cd install_test ; $(MAKE) all ; $(MAKE) tests
@if grep '^[-+]' install_test/covmerge.ann >/dev/null ; \
then \
echo "Installation test succeded" ;\
else \
echo "Installation test failed" ;\
exit 1 ;\
fi
@echo ""
@echo ""
@echo ""
@echo "You are all set. See README for an overview of how to use the tools"
@echo ""
@echo ""
@echo ""
all:: covtool.exe
all:: covtoolhelper.o
all:: covtoolhelper_debug.o
covtoolhelper_debug.o: covtoolhelper.c
rm -f covtoolhelper.o
$(MAKE) DEBUGGING=1 covtoolhelper.o
mv covtoolhelper.o covtoolhelper_debug.o
$(MAKE) covtoolhelper.o
covtool.exe: covtool.o covlib.a
$(LN) -o $@ $+
covlib.a: covstream.o bomb.o read_database.o
rm -f $@
ar cvq $@ $+
backup::
-zip -ru ../covtool.zip *
clean::
cd example; $(MAKE) clean
cd install_test; $(MAKE) clean
cd tests; $(MAKE) clean
depend::
makedepend -I. -I/usr/include/g++ *.c
all:: covmerge.exe
covmerge.exe: covmerge.o read_database.o
$(LN) -g -o $@ covmerge.o read_database.o
all:: covannotate.exe covlib.a
covannotate.exe: covannotate.o covlib.a
$(LN) -o $@ covannotate.o covlib.a
tests clean ::
cd tests; $(MAKE) $@
tests::
cd tests; $(MAKE) icov_test
tests clean ::
cd cov++_test; $(MAKE) $@
clean::
find * -name 'core' -print | xargs rm -f
rm -f log log.make
all:: # must be next to last
@echo ""
@echo ""
@echo ""
@echo "Now run $(MAKE) tests"
@echo ""
@echo ""
@echo ""
tests:: # must be last
@echo ""
@echo ""
@echo ""
@echo "Now run '$(MAKE) install' as root"
@echo ""
@echo ""
@echo ""
# DO NOT DELETE