lib:replace: Add getprogname()
[samba.git] / lib / pthreadpool / wscript_build
1 #!/usr/bin/env python
2
3 if bld.env.WITH_PTHREADPOOL:
4     bld.SAMBA_SUBSYSTEM('PTHREADPOOL',
5                          source='''pthreadpool.c
6                                    pthreadpool_pipe.c
7                                    pthreadpool_tevent.c
8                                 ''',
9                          deps='pthread rt replace tevent-util')
10 else:
11     bld.SAMBA_SUBSYSTEM('PTHREADPOOL',
12                          source='''pthreadpool_sync.c
13                                    pthreadpool_pipe.c
14                                    pthreadpool_tevent.c
15                                 ''',
16                          deps='replace tevent-util')
17
18
19 bld.SAMBA_BINARY('pthreadpooltest',
20                   source='tests.c',
21                   deps='PTHREADPOOL',
22                   enabled=bld.env.WITH_PTHREADPOOL,
23                   install=False)
24
25 bld.SAMBA_BINARY('pthreadpooltest_cmocka',
26                   source='tests_cmocka.c',
27                   deps='PTHREADPOOL cmocka',
28                   ldflags='-Wl,--wrap=pthread_create',
29                   enabled=bld.env.WITH_PTHREADPOOL and bld.env['HAVE_LDWRAP'],
30                   install=False)