Build util tests properly with make check
[openafs.git] / tests / Makefile.in
1 # Build rules for the OpenAFS test suite.
2
3 srcdir=@srcdir@
4 abs_top_srcdir=@abs_top_srcdir@
5 abs_top_builddir=@abs_top_builddir@
6 include @TOP_OBJDIR@/src/config/Makefile.config
7
8 RUNTESTS_CPPFLAGS = -DSOURCE='"$(abs_top_srcdir)/tests"' \
9         -DBUILD='"$(abs_top_builddir)/tests"'
10
11 all: runtests
12         cd tap && $(MAKE) $@
13         cd util && $(MAKE) $@
14
15 runtests.o: $(srcdir)/runtests.c
16         $(CCOBJ) $(CFLAGS) $(RUNTESTS_CPPFLAGS) -c $(srcdir)/runtests.c
17
18 runtests: runtests.o
19         $(CC) $(LDFLAGS) -o runtests runtests.o
20
21 check test tests: runtests
22         cd tap && $(MAKE) $@
23         cd util && $(MAKE) $@
24         ./runtests $(abs_top_srcdir)/tests/TESTS
25
26 install:
27
28 clean distclean:
29         cd tap && $(MAKE) $@
30         cd util && $(MAKE) $@
31         $(RM) -f *.o core runtests