chiark / gitweb /
legal: Add missing notice to many files
[secnet.git] / stest / Dir.sd.mk
1 # This file is part of secnet.
2 # See LICENCE and this file CREDITS for full list of copyright holders.
3 # SPDX-License-Identifier: GPL-3.0-or-later
4 # There is NO WARRANTY.
5
6 &TARGETS += & udp-preload.so
7
8 &DEPS += & udp-preload.so
9 &DEPS += &^ common.tcl
10 &DEPS += secnet
11 &DEPS += base91s/base91s
12 &DEPS += test-example/sites.conf
13 &DEPS += test-example/sites-nonego.conf
14 &DEPS += $(test-example_PRIVKEYS)
15
16 &:include test-common.sd.mk
17
18 &OBJECTS += & udp-preload.o
19
20 $(&OBJECTS) : ALL_CFLAGS += -D_REENTRANT -fPIC -Wno-unused-result
21
22 &udp-preload.so: $(&OBJECTS)
23         $(CC) -shared -Wl,-soname,$@.1 $^ -o $@ -ldl
24
25 # These test scripts use little cpu but contain sleeps etc.  So when
26 # there are several, we are going to want to run *loads* in parallel.
27 #
28 # Ideally we would do something like "every one of these counts for a
29 # tenth of a job" but make can't do that.  So bodge it: we treat all the
30 # tests as a single job, and disconnect the parent's jobserver.
31 #
32 # make.info says $(MAKE) causes special handling of the rule but only
33 # if it's written literally like that in the rule, hence this
34 # indirection.  We need no squash MAKEFLAGS and MFLAGS too.
35 # MAKELEVEL seems like it will be fine to pass on.
36
37 MAKE_NOTSPECIAL:=$(MAKE)
38
39 &check:: $(&DEPS)
40         env -u MAKEFLAGS -u MFLAGS \
41         $(MAKE_NOTSPECIAL) -f main.mk -j$(shell nproc || echo 1)0 &check-real
42
43 &:include subdirmk/cdeps.sd.mk