71fa391003d7c5c611f194164c5b940bd03783d7
[ira/wip.git] / source4 / torture / config.mk
1 [SUBSYSTEM::TORTURE_UTIL]
2 PRIVATE_DEPENDENCIES = LIBCLI_RAW
3 PUBLIC_DEPENDENCIES = torture POPT_CREDENTIALS
4
5 TORTURE_UTIL_OBJ_FILES = $(addprefix $(torturesrcdir)/, util_smb.o)
6
7 #################################
8 # Start SUBSYSTEM TORTURE_BASIC
9 [MODULE::TORTURE_BASIC]
10 SUBSYSTEM = smbtorture
11 INIT_FUNCTION = torture_base_init
12 PRIVATE_DEPENDENCIES = \
13                 LIBCLI_SMB POPT_CREDENTIALS \
14                 TORTURE_UTIL LIBCLI_RAW \
15                 TORTURE_RAW
16 # End SUBSYSTEM TORTURE_BASIC
17 #################################
18
19 TORTURE_BASIC_OBJ_FILES = $(addprefix $(torturesrcdir)/basic/,  \
20                 base.o \
21                 misc.o \
22                 scanner.o \
23                 utable.o \
24                 charset.o \
25                 mangle_test.o \
26                 denytest.o \
27                 aliases.o \
28                 locking.o \
29                 secleak.o \
30                 rename.o \
31                 dir.o \
32                 delete.o \
33                 unlink.o \
34                 disconnect.o \
35                 delaywrite.o \
36                 attr.o \
37                 properties.o)
38
39 $(eval $(call proto_header_template,$(torturesrcdir)/basic/proto.h,$(TORTURE_BASIC_OBJ_FILES:.o=.c)))
40
41 #################################
42 # Start SUBSYSTEM TORTURE_RAW
43 [MODULE::TORTURE_RAW]
44 SUBSYSTEM = smbtorture
45 INIT_FUNCTION = torture_raw_init
46 PRIVATE_DEPENDENCIES = \
47                 LIBCLI_SMB LIBCLI_LSA LIBCLI_SMB_COMPOSITE \
48                 POPT_CREDENTIALS TORTURE_UTIL
49 # End SUBSYSTEM TORTURE_RAW
50 #################################
51
52 TORTURE_RAW_OBJ_FILES = $(addprefix $(torturesrcdir)/raw/, \
53                 qfsinfo.o \
54                 qfileinfo.o \
55                 setfileinfo.o \
56                 search.o \
57                 close.o \
58                 open.o \
59                 mkdir.o \
60                 oplock.o \
61                 notify.o \
62                 mux.o \
63                 ioctl.o \
64                 chkpath.o \
65                 unlink.o \
66                 read.o \
67                 context.o \
68                 write.o \
69                 lock.o \
70                 pingpong.o \
71                 lockbench.o \
72                 lookuprate.o \
73                 tconrate.o \
74                 openbench.o \
75                 rename.o \
76                 eas.o \
77                 streams.o \
78                 acls.o \
79                 seek.o \
80                 samba3hide.o \
81                 samba3misc.o \
82                 composite.o \
83                 raw.o \
84                 offline.o)
85
86 $(eval $(call proto_header_template,$(torturesrcdir)/raw/proto.h,$(TORTURE_RAW_OBJ_FILES:.o=.c)))
87
88 mkinclude smb2/config.mk
89 mkinclude winbind/config.mk
90
91 [SUBSYSTEM::TORTURE_NDR]
92 PRIVATE_DEPENDENCIES = torture
93
94 TORTURE_NDR_OBJ_FILES = $(addprefix $(torturesrcdir)/ndr/, ndr.o winreg.o atsvc.o lsa.o epmap.o dfs.o netlogon.o drsuapi.o spoolss.o samr.o)
95
96 $(eval $(call proto_header_template,$(torturesrcdir)/ndr/proto.h,$(TORTURE_NDR_OBJ_FILES:.o=.c)))
97
98 [MODULE::torture_rpc]
99 # TORTURE_NET and TORTURE_NBT use functions from torture_rpc...
100 #OUTPUT_TYPE = MERGED_OBJ
101 SUBSYSTEM = smbtorture
102 INIT_FUNCTION = torture_rpc_init
103 PRIVATE_DEPENDENCIES = \
104                 NDR_TABLE RPC_NDR_UNIXINFO dcerpc_samr RPC_NDR_WINREG RPC_NDR_INITSHUTDOWN \
105                 RPC_NDR_OXIDRESOLVER RPC_NDR_EVENTLOG RPC_NDR_ECHO RPC_NDR_SVCCTL \
106                 RPC_NDR_NETLOGON dcerpc_atsvc dcerpc_mgmt RPC_NDR_DRSUAPI \
107                 RPC_NDR_LSA RPC_NDR_EPMAPPER RPC_NDR_DFS RPC_NDR_FRSAPI RPC_NDR_SPOOLSS \
108                 RPC_NDR_SRVSVC RPC_NDR_WKSSVC RPC_NDR_ROT RPC_NDR_DSSETUP \
109                 RPC_NDR_REMACT RPC_NDR_OXIDRESOLVER RPC_NDR_NTSVCS WB_HELPER LIBSAMBA-NET \
110                 LIBCLI_AUTH POPT_CREDENTIALS TORTURE_LDAP TORTURE_LDB TORTURE_UTIL TORTURE_RAP \
111                 dcerpc_server service process_model ntvfs SERVICE_SMB RPC_NDR_BROWSER
112
113 torture_rpc_OBJ_FILES = $(addprefix $(torturesrcdir)/rpc/, \
114                 join.o lsa.o lsa_lookup.o session_key.o echo.o dfs.o drsuapi.o \
115                 drsuapi_cracknames.o dssync.o spoolss.o spoolss_notify.o spoolss_win.o \
116                 unixinfo.o samr.o samr_accessmask.o wkssvc.o srvsvc.o svcctl.o atsvc.o \
117                 eventlog.o epmapper.o winreg.o initshutdown.o oxidresolve.o remact.o mgmt.o \
118                 scanner.o autoidl.o countcalls.o testjoin.o schannel.o netlogon.o remote_pac.o samlogon.o \
119                 samsync.o bind.o dssetup.o alter_context.o bench.o samba3rpc.o rpc.o async_bind.o \
120                 handles.o frsapi.o object_uuid.o ntsvcs.o browser.o)
121
122 $(eval $(call proto_header_template,$(torturesrcdir)/rpc/proto.h,$(torture_rpc_OBJ_FILES:.o=.c)))
123
124 #################################
125 # Start SUBSYSTEM TORTURE_RAP
126 [MODULE::TORTURE_RAP]
127 SUBSYSTEM = smbtorture
128 INIT_FUNCTION = torture_rap_init
129 PRIVATE_DEPENDENCIES = TORTURE_UTIL LIBCLI_SMB
130 # End SUBSYSTEM TORTURE_RAP
131 #################################
132
133 TORTURE_RAP_OBJ_FILES = $(torturesrcdir)/rap/rap.o
134
135 $(eval $(call proto_header_template,$(torturesrcdir)/rap/proto.h,$(TORTURE_RAP_OBJ_FILES:.o=.c)))
136
137 #################################
138 # Start SUBSYSTEM TORTURE_AUTH
139 [MODULE::TORTURE_AUTH]
140 SUBSYSTEM = smbtorture
141 PRIVATE_DEPENDENCIES = \
142                 LIBCLI_SMB gensec auth KERBEROS \
143                 POPT_CREDENTIALS SMBPASSWD torture
144 # End SUBSYSTEM TORTURE_AUTH
145 #################################
146
147 TORTURE_AUTH_OBJ_FILES = $(addprefix $(torturesrcdir)/auth/, ntlmssp.o pac.o)
148
149 $(eval $(call proto_header_template,$(torturesrcdir)/auth/proto.h,$(TORTURE_AUTH_OBJ_FILES:.o=.c)))
150
151 mkinclude local/config.mk
152
153 #################################
154 # Start MODULE TORTURE_NBENCH
155 [MODULE::TORTURE_NBENCH]
156 SUBSYSTEM = smbtorture
157 INIT_FUNCTION = torture_nbench_init
158 PRIVATE_DEPENDENCIES = TORTURE_UTIL 
159 # End MODULE TORTURE_NBENCH
160 #################################
161
162 TORTURE_NBENCH_OBJ_FILES = $(addprefix $(torturesrcdir)/nbench/, nbio.o nbench.o)
163
164 $(eval $(call proto_header_template,$(torturesrcdir)/nbench/proto.h,$(TORTURE_NBENCH_OBJ_FILES:.o=.c)))
165
166 #################################
167 # Start MODULE TORTURE_UNIX
168 [MODULE::TORTURE_UNIX]
169 SUBSYSTEM = smbtorture
170 INIT_FUNCTION = torture_unix_init
171 PRIVATE_DEPENDENCIES = TORTURE_UTIL 
172 # End MODULE TORTURE_UNIX
173 #################################
174
175 TORTURE_UNIX_OBJ_FILES = $(addprefix $(torturesrcdir)/unix/, unix.o whoami.o unix_info2.o)
176
177 $(eval $(call proto_header_template,$(torturesrcdir)/unix/proto.h,$(TORTURE_UNIX_OBJ_FILES:.o=.c)))
178
179 #################################
180 # Start SUBSYSTEM TORTURE_LDAP
181 [MODULE::TORTURE_LDAP]
182 SUBSYSTEM = smbtorture
183 INIT_FUNCTION = torture_ldap_init
184 PRIVATE_DEPENDENCIES = \
185                 LIBCLI_LDAP LIBCLI_CLDAP SAMDB POPT_CREDENTIALS torture
186 # End SUBSYSTEM TORTURE_LDAP
187 #################################
188
189 TORTURE_LDAP_OBJ_FILES = $(addprefix $(torturesrcdir)/ldap/, common.o basic.o schema.o uptodatevector.o cldap.o cldapbench.o)
190
191 $(eval $(call proto_header_template,$(torturesrcdir)/ldap/proto.h,$(TORTURE_LDAP_OBJ_FILES:.o=.c)))
192
193 #################################
194 # Start SUBSYSTEM TORTURE_LDB
195 [MODULE::TORTURE_LDB]
196 SUBSYSTEM = smbtorture
197 INIT_FUNCTION = torture_ldb_init
198 PRIVATE_DEPENDENCIES = \
199                 LDB_WRAP
200 # End SUBSYSTEM TORTURE_LDB
201 #################################
202
203 TORTURE_LDB_OBJ_FILES = $(addprefix $(torturesrcdir)/ldb/, ldb.o)
204
205 $(eval $(call proto_header_template,$(torturesrcdir)/ldb/proto.h,$(TORTURE_LDB_OBJ_FILES:.o=.c)))
206
207 #################################
208 # Start SUBSYSTEM TORTURE_NBT
209 [MODULE::TORTURE_NBT]
210 SUBSYSTEM = smbtorture
211 INIT_FUNCTION = torture_nbt_init
212 PRIVATE_DEPENDENCIES = \
213                 LIBCLI_SMB LIBCLI_NBT LIBCLI_DGRAM LIBCLI_WREPL torture_rpc
214 # End SUBSYSTEM TORTURE_NBT
215 #################################
216
217 TORTURE_NBT_OBJ_FILES = $(addprefix $(torturesrcdir)/nbt/, query.o register.o \
218         wins.o winsbench.o winsreplication.o dgram.o nbt.o)
219
220 $(eval $(call proto_header_template,$(torturesrcdir)/nbt/proto.h,$(TORTURE_NBT_OBJ_FILES:.o=.c)))
221
222 #################################
223 # Start SUBSYSTEM TORTURE_NET
224 [MODULE::TORTURE_NET]
225 SUBSYSTEM = smbtorture
226 INIT_FUNCTION = torture_net_init
227 PRIVATE_DEPENDENCIES = \
228                 LIBSAMBA-NET \
229                 POPT_CREDENTIALS \
230                 torture_rpc \
231                 PROVISION
232 # End SUBSYSTEM TORTURE_NET
233 #################################
234
235 TORTURE_NET_OBJ_FILES = $(addprefix $(torturesrcdir)/libnet/, libnet.o \
236                                            utils.o userinfo.o userman.o groupinfo.o groupman.o \
237                                            domain.o libnet_lookup.o libnet_user.o libnet_group.o \
238                                            libnet_share.o libnet_rpc.o libnet_domain.o libnet_BecomeDC.o)
239
240 $(eval $(call proto_header_template,$(torturesrcdir)/libnet/proto.h,$(TORTURE_NET_OBJ_FILES:.o=.c)))
241
242 #################################
243 # Start BINARY smbtorture
244 [BINARY::smbtorture]
245 INSTALLDIR = BINDIR
246 PRIVATE_DEPENDENCIES = \
247                 torture \
248                 LIBPOPT \
249                 POPT_SAMBA \
250                 POPT_CREDENTIALS \
251                 dcerpc \
252                 LIBCLI_SMB \
253                 SMBREADLINE
254 # End BINARY smbtorture
255 #################################
256
257 smbtorture_OBJ_FILES = $(torturesrcdir)/smbtorture.o $(torturesrcdir)/torture.o 
258
259 PUBLIC_HEADERS += $(torturesrcdir)/smbtorture.h
260 MANPAGES += $(torturesrcdir)/man/smbtorture.1
261
262 #################################
263 # Start BINARY gentest
264 [BINARY::gentest]
265 INSTALLDIR = BINDIR
266 PRIVATE_DEPENDENCIES = \
267                 LIBSAMBA-HOSTCONFIG \
268                 LIBSAMBA-UTIL \
269                 LIBPOPT \
270                 POPT_SAMBA \
271                 POPT_CREDENTIALS \
272                 LIBCLI_SMB \
273                 LIBCLI_RAW
274 # End BINARY gentest
275 #################################
276
277 gentest_OBJ_FILES = $(torturesrcdir)/gentest.o
278
279 MANPAGES += $(torturesrcdir)/man/gentest.1
280
281 #################################
282 # Start BINARY masktest
283 [BINARY::masktest]
284 INSTALLDIR = BINDIR
285 PRIVATE_DEPENDENCIES = \
286                 LIBSAMBA-HOSTCONFIG \
287                 LIBSAMBA-UTIL \
288                 LIBPOPT \
289                 POPT_SAMBA \
290                 POPT_CREDENTIALS \
291                 LIBCLI_SMB
292 # End BINARY masktest
293 #################################
294
295 masktest_OBJ_FILES = $(torturesrcdir)/masktest.o
296
297 MANPAGES += $(torturesrcdir)/man/masktest.1
298
299 #################################
300 # Start BINARY locktest
301 [BINARY::locktest]
302 INSTALLDIR = BINDIR
303 PRIVATE_DEPENDENCIES = \
304                 LIBPOPT \
305                 POPT_SAMBA \
306                 POPT_CREDENTIALS \
307                 LIBSAMBA-UTIL \
308                 LIBCLI_SMB \
309                 LIBSAMBA-HOSTCONFIG
310 # End BINARY locktest
311 #################################
312
313 locktest_OBJ_FILES = $(torturesrcdir)/locktest.o
314
315 MANPAGES += $(torturesrcdir)/man/locktest.1
316
317 GCOV=0
318
319 ifeq ($(MAKECMDGOALS),gcov)
320 GCOV=1
321 endif
322
323 ifeq ($(MAKECMDGOALS),lcov)
324 GCOV=1
325 endif
326
327 ifeq ($(MAKECMDGOALS),testcov-html)
328 GCOV=1
329 endif
330
331 ifeq ($(GCOV),1)
332 CFLAGS += --coverage
333 LDFLAGS += --coverage
334 endif
335
336 COV_TARGET = test
337
338 gcov: test
339         for I in $(sort $(dir $(ALL_OBJS))); \
340                 do $(GCOV) -p -o $$I $$I/*.c; \
341         done
342
343 samba.info: test
344         -rm heimdal/lib/*/{lex,parse}.{gcda,gcno}
345         lcov --base-directory `pwd` --directory . --capture --output-file samba.info
346
347 lcov: samba.info
348         genhtml -o coverage $<
349
350 testcov-html:: lcov
351
352 clean::
353         @rm -f samba.info