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