Whamcloud - gitweb
LU-1187 tests: add create remote directory to racer
[fs/lustre-release.git] / libsysio / Makefile.am
1 AUTOMAKE_OPTIONS=1.6
2
3 if WITH_TESTS
4 TESTDIR = tests
5 else
6 TESTDIR =
7 endif
8
9 include $(top_srcdir)/src/module.mk 
10 include $(top_srcdir)/include/module.mk
11 include $(top_srcdir)/tests/module.mk
12 include $(top_srcdir)/dev/stdfd/module.mk 
13 include $(top_srcdir)/drivers/incore/module.mk 
14 include $(top_srcdir)/drivers/native/module.mk 
15 include $(top_srcdir)/drivers/yod/module.mk
16 include $(top_srcdir)/drivers/sockets/module.mk
17
18 lib_LIBRARIES = ${LIBBUILD_DIR}/libsysio.a
19
20 if WITH_STDFD_DEV
21 OPTIONAL_STDFD_SRCS = $(STDFD_SRCS)
22 else
23 OPTIONAL_STDFD_SRCS =
24 endif
25
26 if WITH_INCORE_DRIVER
27 OPTIONAL_INCORE_SRCS = $(INCORE_SRCS)
28 else
29 OPTIONAL_INCORE_SRCS =
30 endif
31
32 if WITH_NATIVE_DRIVER
33 OPTIONAL_NATIVE_SRCS = $(NATIVE_SRCS)
34 else
35 OPTIONAL_NATIVE_SRCS =
36 endif
37
38 if WITH_SOCKETS_DRIVER
39 OPTIONAL_SOCKETS_SRCS = $(SOCKETS_SRCS)
40 else
41 OPTIONAL_SOCKETS_SRCS =
42 endif
43
44 if WITH_CPLANT_YOD
45 OPTIONAL_YOD_SRCS = $(YOD_SRCS)
46 else
47 OPTIONAL_YOD_SRCS =
48 endif
49
50 if WITH_LUSTRE_HACK
51 # it would be better that let configure script check this
52 OPTIONAL_LUSTRE_CFLAGS = -fPIC
53 endif
54
55 AM_CFLAGS = $(OPTIONAL_LUSTRE_CFLAGS)
56
57 __LIBBUILD_DIR__libsysio_a_SOURCES = \
58         $(SRCDIR_SRCS) \
59         $(OPTIONAL_STDFD_SRCS) \
60         $(OPTIONAL_INCORE_SRCS) \
61         $(OPTIONAL_SOCKETS_SRCS) \
62         $(OPTIONAL_NATIVE_SRCS) \
63         $(OPTIONAL_YOD_SRCS)
64
65 include $(top_srcdir)/Rules.make
66
67 EXTRA_DIST = Rules.make misc/init-env.sh $(TESTS_EXTRA) $(SRCDIR_EXTRA) \
68         $(INCLUDE_EXTRA) $(STDFD_EXTRA) $(INCORE_EXTRA) \
69         $(SOCKETS_EXTRA) $(NATIVE_EXTRA) $(YOD_EXTRA)
70
71 AM_CPPFLAGS += ${YOD_DRIVER_FLAGS}
72
73 really-clean: testsclean maintainer-clean
74         -rm -rf autom4te-2.53.cache
75         -rm -rf .deps
76         -rm -f Makefile.in 
77         -rm -f compile depcomp INSTALL install-sh missing mkinstalldirs \
78                 configure aclocal.m4 
79         -rm -f config.guess config.sub
80         -rm -rf $(LIBBUILD_DIR)
81         -rm -f libsysio*.tar.gz
82         cd $(TESTDIR); rm -rf Makefile Makefile.in .deps
83
84 tests: $(lib_LIBRARIES) FORCE
85         cd $(TESTDIR); make
86 testsclean: FORCE
87         cd $(TESTDIR); make clean
88 clean: testsclean clean-am
89 FORCE: