blob: 4f0c063f7d8965b74ab40eff3cb9ad1334943c7f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
ifeq ($(SRCDIR)x,x)
SRCDIR = $(CURDIR)/..
BUILDDIR = $(SRCDIR)
endif
SUBDIR = test
VPATH = .:$(SRCDIR)/$(SUBDIR)
include $(BUILDDIR)/config.mk
MERGE_OBJECTS =
PROGS = testrandom
OKSTOGENERATE = $(patsubst %.rand-ok, %.ok, $(wildcard *.rand-ok))
all: $(PROGS) $(OKSTOGENERATE)
testrandom.o: testrandom.c
$(CC_FOR_BUILD) -c -o $@ $(CFLAGS_FOR_BUILD) $<
testrandom: testrandom.o
$(LD_FOR_BUILD) -o $@ $(LDFLAGS_FOR_BUILD) $<
RAND_VARIETY ?= $(shell ./testrandom -x)
$(OKSTOGENERATE): %.ok: %.rand-ok testrandom
sed -n "/^$(RAND_VARIETY)|/s/^$(RAND_VARIETY)|//p" $< > $@
OMIT_TEST_RULE = 1
include $(SRCDIR)/common.mk
distclean clean: cleanlocal
.PHONY: cleanlocal
cleanlocal:
rm -f $(PROGS) $(OKSTOGENERATE)
|