Debian Codegraph @

lib/pthreadpool/wscript_build

raw
1 #!/usr/bin/env python
2
3 if bld.env.WITH_PTHREADPOOL:
4 extra_libs=''
5
6 # Link to librt if needed for clock_gettime()
7 if bld.CONFIG_SET('HAVE_LIBRT'): extra_libs += ' rt'
8
9 bld.SAMBA_SUBSYSTEM('PTHREADPOOL',
10 source='''pthreadpool.c
11 pthreadpool_pipe.c
12 pthreadpool_tevent.c
13 ''',
14 deps='pthread replace tevent-util' + extra_libs)
15 else:
16 bld.SAMBA_SUBSYSTEM('PTHREADPOOL',
17 source='''pthreadpool_sync.c
18 pthreadpool_pipe.c
19 pthreadpool_tevent.c
20 ''',
21 deps='replace tevent-util')
22
23
24 bld.SAMBA_BINARY('pthreadpooltest',
25 source='tests.c',
26 deps='PTHREADPOOL',
27 enabled=bld.env.WITH_PTHREADPOOL,
28 for_selftest=True)
29
30 bld.SAMBA_BINARY('pthreadpooltest_cmocka',
31 source='tests_cmocka.c',
32 deps='PTHREADPOOL cmocka',
33 ldflags='-Wl,--wrap=pthread_create',
34 enabled=bld.env.WITH_PTHREADPOOL and bld.env['HAVE_LDWRAP'],
35 for_selftest=True)
36
37 bld.SAMBA_BINARY('pthreadpool_unit_test_cmocka',
38 source='test_pthreadpool.c',
39 deps='PTHREADPOOL cmocka',
40 enabled=bld.env.WITH_PTHREADPOOL,
41 for_selftest=True)
42
43 bld.SAMBA_BINARY('pthreadpool_tevent_cmocka_unit_test',
44 source='test_pthreadpool_tevent.c',
45 deps='PTHREADPOOL cmocka',
46 enabled=bld.env.WITH_PTHREADPOOL,
47 for_selftest=True)