-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile_vte
executable file
·181 lines (156 loc) · 4.66 KB
/
Makefile_vte
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# See toplevel INSTALL for build info
CROSS_COMPILE ?=
CC=$(CROSS_COMPILE)gcc
AR=$(CROSS_COMPILE)ar
# RANLIB isn't a standard Make variable, which means that when it's exported
# to leaf callers as an empty value, builds fail.
# testcases/network/lib6/Makefile is a prime example.
RANLIB=$(CROSS_COMPILE)ranlib
HAS_NUMA=$(shell sh tools/scripts/numa_test.sh)
export CFLAGS += -Wall $(CROSS_CFLAGS)
export CC AR RANLIB CPPFLAGS LDFLAGS HAS_NUMA
# SKIP_IDCHECK != 1, defaults to previous behavior, which is to execute
# IDcheck.sh at the end of `make install'.
SKIP_IDCHECK ?= 0
-include config.mk
VPATH += include m4
all: config.h config.mk libltp.a
@$(MAKE) -C pan $@
@$(MAKE) -C testcases $@
@$(MAKE) -C tools $@
@$(MAKE) -C utils $@
@echo
@echo "***********************************************"
@echo "** You now need to do a make install as root **"
@echo "***********************************************"
install: all
@$(MAKE) -C testcases install
@$(MAKE) -C tools install
@$(MAKE) -C lib install
@$(MAKE) -C include install
@$(MAKE) -C pan install
@$(MAKE) -C m4 install
@$(MAKE) -C doc/man1 install
@$(MAKE) -C doc/man3 install
@$(MAKE) -C utils install
ifneq ($(strip $(SKIP_IDCHECK)),1)
@./IDcheck.sh
endif
libltp.a: config.h
@$(MAKE) -C lib $@
uclinux: uclinux_libltp.a
#@$(MAKE) -C pan all
@$(MAKE) -C testcases uclinux
@$(MAKE) -C tools all
@echo
@echo "*******************************************************"
@echo "** You now need to do a make uclinux_install as root **"
@echo "*******************************************************"
uclinux_install: uclinux
@$(MAKE) -C testcases uclinux_install
@$(MAKE) -C tools install
ifneq ($(strip $(SKIP_IDCHECK)),1)
@./IDcheck.sh
endif
uclinux_libltp.a:
@$(MAKE) -C lib UCLINUX=1 libltp.a
menuconfig:
@./ltpmenu
clean: ac-clean
@$(MAKE) -C lib $@
@$(MAKE) -C pan $@
@$(MAKE) -C tools $@
@$(MAKE) -C testcases $@
@$(MAKE) -C utils $@
distclean: clean ac-distclean
@$(MAKE) -C include $@
maintainer-clean: distclean ac-maintainer-clean
@$(MAKE) -C include $@
package:
rpmbuild -ba ltp-devel.spec
#vte related
vte: libltp.a tools
@echo "***********************************************"
@echo "** MAKE ALL - VTE tests suite **"
@echo "***********************************************"
@echo
@$(MAKE) -C testcases/vte_tests_suite all
@$(MAKE) -C testcases/module_test all
@echo
@echo "***********************************************"
@echo "** MAKE INSTALL - VTE tests suite **"
@echo "***********************************************"
@echo
@$(MAKE) -C testcases/vte_tests_suite install
@$(MAKE) -C testcases/module_test install
@$(MAKE) -C pan
@$(MAKE) -C tools
@$(MAKE) -C tools install
@echo
@echo "***********************************************"
@echo "** VTE tests suite is available **"
@echo "***********************************************"
@echo
@echo "***********************************************"
@echo "** build Finished **"
@echo "***********************************************"
#
# Autotools related
#
.PHONY: autotools
autotools: aclocal autoconf autoheader automake
.PHONY: aclocal
aclocal: aclocal.m4
aclocal.m4: $(wildcard m4/*.m4)
aclocal -I m4
.PHONY: autoconf
autoconf: configure
configure: configure.ac aclocal.m4
autoconf
.PHONY: autoheader
autoheader: config.h.in
config.h.in: configure.ac $(wildcard m4/*.m4)
autoheader
touch include/$@
config.h: config.h.default
cp include/config.h.default include/config.h
config.mk:
touch $@
.PHONY: automake
AUTOMAKE_FILES = config.guess config.sub install-sh missing
automake: aclocal $(AUTOMAKE_FILES)
$(AUTOMAKE_FILES): m4/Makefile.in
m4/Makefile.in: m4/Makefile.am
automake -c -a
.PHONY: ac-clean ac-distclean ac-maintainer-clean
ac-clean:
rm -rf autom4te.cache
rm -f config.log config.status
ac-distclean: ac-clean
ac-maintainer-clean: ac-distclean
rm -f aclocal.m4 configure $(AUTOMAKE_FILES) m4/Makefile.in
#
# Help
#
.PHONY: help
help:
@echo
@echo 'About configuration'
@echo '-------------------'
@echo 'If you want to use auto configuration, '
@echo 'be sure autoconf and automake are installed. Then run: '
@echo ' $$ make autotools '
@echo ' $$ ./configure '
@echo ' $$ make all '
@echo
@echo 'If you want to use default configuration, '
@echo 'autoconf is not needed. Just run: '
@echo ' $$ touch include/config.h.default '
@echo ' $$ make config.h '
@echo ' $$ make all '
@echo
@echo 'If make all is failed even if you use the '
@echo 'auto configuration, please, report it to '
@echo 'ltp developers with config.log, generated '
@echo 'by running the configure script. '
@echo