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.
6 &TARGETS += & udp-preload.so
8 &DEPS += & udp-preload.so
11 &DEPS += base91s/base91s
12 &DEPS += test-example/sites.conf
13 &DEPS += test-example/sites-nonego.conf
14 &DEPS += $(test-example_PRIVKEYS)
16 &:include test-common.sd.mk
18 &OBJECTS += & udp-preload.o
20 $(&OBJECTS) : ALL_CFLAGS += -D_REENTRANT -fPIC -Wno-unused-result
22 &udp-preload.so: $(&OBJECTS)
23 $(CC) -shared -Wl,-soname,$@.1 $^ -o $@ -ldl
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.
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.
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.
37 MAKE_NOTSPECIAL:=$(MAKE)
40 env -u MAKEFLAGS -u MFLAGS \
41 $(MAKE_NOTSPECIAL) -f main.mk -j$(shell nproc || echo 1)0 &check-real
43 &:include subdirmk/cdeps.sd.mk