forked from Seagate/cortx-motr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Kbuild.in
202 lines (159 loc) · 5.44 KB
/
Kbuild.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
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
## -*- makefile -*-
#
# global vars ----------------------------------------- {{{1
#
KBUILD_EXTRA_SYMBOLS := @LUSTRE_SYMVERS@
ccflags-y := -DHAVE_CONFIG_H -iquote . @M0_KCPPFLAGS@ @M0_KCFLAGS@ @KCFLAGS@
enable_test_modules := @ENABLE_KERNEL_UNIT_TESTS@
#
# kernel modules we build ----------------------------- {{{1
#
ifdef M0_BUILD_KERNEL_M0TR_ONLY
obj-m := m0tr.o
else ifdef M0_BUILD_KERNEL_UT_ONLY
obj-m := m0ut.o
else ifdef M0_BUILD_ST
obj-m := m0tr.o
obj-m += motr_st_kmod.o
else ifdef M0_BUILD_ST_ALLINONE
obj-m := m0tr.o
else
# these modules are installed system wide and included into rpm package, they
# should be built in motr/ directory, so they could be installed into
# "kernel/fs/motr" under base kernel modules dir, where "kernel/fs" part is
# provided by INSTALL_MOD_DIR Kbuild variable and "motr" is taken from module's
# build directory
obj-m := m0tr.o
# these modules are built unless '--disable-unit-tests' option of ./configure
# script is used
obj-$(enable_test_modules) += m0ut.o
obj-$(enable_test_modules) += m0lnetping.o
obj-$(enable_test_modules) += m0rpcping.o
obj-$(enable_test_modules) += m0nettestd.o
obj-$(enable_test_modules) += motr_st_kmod.o
endif
#
# m0tr.ko ------------------------------------------- {{{1
#
m0tr-y = motr/linux_kernel/m0tr_main.o \
$(m0tr_objects)
m0tr_objects :=
include $(src)/motr/Kbuild.sub
include $(src)/m0t1fs/Kbuild.sub
include $(src)/addb2/Kbuild.sub
include $(src)/balloc/Kbuild.sub
include $(src)/be/Kbuild.sub
include $(src)/cas/Kbuild.sub
include $(src)/motr/Kbuild.sub
include $(src)/conf/Kbuild.sub
include $(src)/cob/Kbuild.sub
include $(src)/console/Kbuild.sub
include $(src)/cm/Kbuild.sub
include $(src)/cm/repreb/Kbuild.sub
include $(src)/dix/Kbuild.sub
include $(src)/dix/cm/Kbuild.sub
include $(src)/dtm/Kbuild.sub
include $(src)/dtm0/Kbuild.sub
include $(src)/fd/Kbuild.sub
include $(src)/fdmi/Kbuild.sub
include $(src)/fid/Kbuild.sub
include $(src)/file/Kbuild.sub
include $(src)/fis/Kbuild.sub
include $(src)/fol/Kbuild.sub
include $(src)/fop/Kbuild.sub
include $(src)/format/Kbuild.sub
include $(src)/graph/Kbuild.sub
include $(src)/ha/Kbuild.sub
include $(src)/ioservice/Kbuild.sub
include $(src)/iscservice/Kbuild.sub
include $(src)/layout/Kbuild.sub
include $(src)/lib/Kbuild.sub
include $(src)/mdservice/Kbuild.sub
include $(src)/module/Kbuild.sub
include $(src)/net/Kbuild.sub
include $(src)/net/bulk_emulation/Kbuild.sub
include $(src)/net/lnet/Kbuild.sub
include $(src)/net/sock/Kbuild.sub
include $(src)/pool/Kbuild.sub
include $(src)/reqh/Kbuild.sub
include $(src)/rm/Kbuild.sub
include $(src)/rpc/Kbuild.sub
include $(src)/sm/Kbuild.sub
include $(src)/sns/Kbuild.sub
include $(src)/sns/cm/Kbuild.sub
include $(src)/spiel/Kbuild.sub
include $(src)/sss/Kbuild.sub
include $(src)/stats/Kbuild.sub
include $(src)/stob/Kbuild.sub
include $(src)/xcode/Kbuild.sub
include $(src)/helpers/Kbuild.sub
#
# m0ut.ko --------------------------------------------- {{{1
#
# m0ut module comprised of UT object files plus the same object files, which
# constitute m0tr module; but because some UT files use ugly technique of
# including .c files to access their static functions, we need to filter out the
# original objects to avoid link time errors because of duplicate symbols
m0ut-y = ut/linux_kernel/m0ut_main.o \
$(m0ut_objects) \
$(filter-out \
file/di.o \
m0t1fs/linux_kernel/file.o \
net/bulk_emulation/mem_xprt_xo.o \
net/lnet/lnet_main.o \
rm/rm_fops.o \
rm/rm_foms.o \
, $(m0tr_objects))
m0ut_objects :=
include $(src)/addb2/ut/Kbuild.sub
include $(src)/conf/ut/Kbuild.sub
include $(src)/fop/ut/Kbuild.sub
include $(src)/file/ut/Kbuild.sub
include $(src)/fd/ut/Kbuild.sub
include $(src)/dtm/ut/Kbuild.sub
include $(src)/ioservice/ut/Kbuild.sub
include $(src)/iscservice/ut/Kbuild.sub
include $(src)/layout/ut/Kbuild.sub
include $(src)/lib/ut/Kbuild.sub
include $(src)/m0t1fs/linux_kernel/ut/Kbuild.sub
include $(src)/net/ut/Kbuild.sub
include $(src)/net/bulk_emulation/ut/Kbuild.sub
include $(src)/net/lnet/ut/Kbuild.sub
include $(src)/net/test/ut/Kbuild.sub # TODO: factor out net-test into a separate module
include $(src)/reqh/ut/Kbuild.sub
include $(src)/rm/ut/Kbuild.sub
include $(src)/rpc/ut/Kbuild.sub
include $(src)/sm/ut/Kbuild.sub
include $(src)/stob/ut/Kbuild.sub
include $(src)/ut/Kbuild.sub
include $(src)/xcode/ut/Kbuild.sub
include $(src)/be/ut/Kbuild.sub
include $(src)/ha/ut/Kbuild.sub
#
#
include $(src)/utils/Kbuild.sub
#
# m0lnetping.ko --------------------------------------- {{{1
#
m0lnetping-y = $(m0lnetping_objects)
m0lnetping_objects :=
include $(src)/net/lnet/st/Kbuild.sub
#
# m0rpcping.ko ---------------------------------------- {{{1
#
m0rpcping-y = $(m0rpcping_objects)
m0rpcping_objects :=
include $(src)/rpc/it/Kbuild.sub
#
# m0nettestd.ko --------------------------------------- {{{1
#
m0nettestd-y = $(m0nettestd_objects)
m0nettestd_objects :=
include $(src)/net/test/Kbuild.sub # TODO: factor out net-test files from
# m0tr.ko into a separate module
# st_kmod --------------------------------------- {{{1
#
motr_st_kmod-y = $(motr_st_objects)
motr_st_objects :=
include $(src)/motr/st/Kbuild.sub
# vim: filetype=make textwidth=80 nowrap foldmethod=marker