2011-04-23 16:42:54 +01:00
|
|
|
# Build rules for the OpenAFS cmd test suite.
|
|
|
|
|
|
|
|
srcdir=@srcdir@
|
|
|
|
abs_top_builddir=@abs_top_builddir@
|
|
|
|
include @TOP_OBJDIR@/src/config/Makefile.config
|
|
|
|
include @TOP_OBJDIR@/src/config/Makefile.pthread
|
|
|
|
|
2020-07-03 01:16:40 +01:00
|
|
|
MODULE_CFLAGS = -I$(TOP_OBJDIR) -I$(srcdir)/../common/
|
2011-04-23 16:42:54 +01:00
|
|
|
|
tests: Introduce libafstest_common
Currently, a few tests use the code in tests/common/ by linking
individual object files in there in addition to the test code (e.g.
linking ../common/config.o along with superuser-t.o).
This convention makes it very obnoxious to move code around in
tests/common/, since any users need to update their link lines. It
also makes it difficult for code in tests/common/ to make use of
functions in other tests/common/ files.
To fix this, just build all of the objects in tests/common/ into a
convenience library, called libafstest_common, and link the relevant
tests against that. Link a few requisite libraries (roken, rfc3961) in
libafstest_common, so each individual test doesn't need to link
against them.
Also link the TAP library itself in libafstest_common, so tests don't
have to explicitly link against it separately. To do this, convert it
into a libtool library, libafstest_tap.la.
Change-Id: I9c031c164efee20201336edcbfaff429e1d231b7
Reviewed-on: https://gerrit.openafs.org/14318
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2020-07-02 04:42:37 +01:00
|
|
|
LIBS = $(abs_top_builddir)/tests/common/libafstest_common.la \
|
2012-05-23 21:43:57 +01:00
|
|
|
$(abs_top_builddir)/src/cmd/liboafs_cmd.la \
|
2012-05-22 08:37:08 +01:00
|
|
|
$(abs_top_builddir)/src/comerr/liboafs_comerr.la \
|
2012-05-24 09:14:18 +01:00
|
|
|
$(abs_top_builddir)/src/opr/liboafs_opr.la
|
2011-04-23 16:42:54 +01:00
|
|
|
|
2020-07-01 20:21:35 +01:00
|
|
|
BINS = command-t
|
2011-04-23 16:42:54 +01:00
|
|
|
|
2020-07-01 20:21:35 +01:00
|
|
|
all check test tests: $(BINS)
|
2011-04-23 16:42:54 +01:00
|
|
|
|
|
|
|
command-t: command-t.o $(LIBS)
|
2012-05-21 18:04:32 +01:00
|
|
|
$(LT_LDRULE_static) command-t.o $(LIBS) $(LIB_roken) $(XLIBS)
|
2011-04-23 16:42:54 +01:00
|
|
|
|
|
|
|
install:
|
|
|
|
|
|
|
|
clean distclean:
|
2012-05-21 18:04:32 +01:00
|
|
|
$(LT_CLEAN)
|
2020-07-01 20:21:35 +01:00
|
|
|
$(RM) -f $(BINS) *.o core
|