Whamcloud - gitweb
949c0297e7b778a67f70c98db47b18b2bf25d9ef
[fs/lustre-release.git] / lustre / liblustre / Makefile.am
1 ## Liblustre excecutables & libraries Makefile
2 SUBDIRS = . tests
3
4 AM_CPPFLAGS = $(HAVE_EFENCE) -I$(SYSIO)/include -D_LARGEFILE64_SOURCE=1 \
5               $(LLCPPFLAGS) -I$(top_srcdir)/portals/unals
6 AM_CFLAGS = $(LLCFLAGS)
7
8 LIBS = $(LIBEFENCE)
9
10 LUSTRE_LIBS = liblutils.a libllite.a \
11               $(top_builddir)/lov/liblov.a \
12               $(top_builddir)/obdecho/libobdecho.a \
13               $(top_builddir)/osc/libosc.a \
14               $(top_builddir)/mdc/libmdc.a \
15               $(top_builddir)/ptlrpc/libptlrpc.a \
16               $(top_builddir)/obdclass/liblustreclass.a \
17               $(top_builddir)/lvfs/liblvfs.a
18
19 if !CRAY_PORTALS
20 PTL_LIBS =    $(top_builddir)/portals/utils/libuptlctl.a \
21               $(top_builddir)/portals/unals/libtcpnal.a \
22               $(top_builddir)/portals/portals/libportals.a
23 else
24 PTL_LIBS =    $(top_builddir)/portals/utils/libuptlctl.a \
25               $(CRAY_PORTALS_PATH)/lib_TV/snos64/libportals.a
26 endif
27
28 SYSIO_LIBS =  $(SYSIO)/lib/libsysio.a
29
30 if LIBLUSTRE
31 lib_LIBRARIES = liblustre.a
32 noinst_LIBRARIES = liblutils.a libllite.a
33
34 install-exec-hook: liblustre.so
35         @$(NORMAL_INSTALL)
36         $(mkinstalldirs) $(DESTDIR)$(libdir)
37         @list=$< ; for p in $$list; do \
38           if test -f $$p; then \
39             f="`echo $$p | sed -e 's|^.*/||'`"; \
40             echo " $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f"; \
41             $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f; \
42           else :; fi; \
43         done
44 else
45 install-exec-hook:
46 endif
47
48 liblutils_a_SOURCES = lutil.c lutil.h
49
50 libllite_a_SOURCES = llite_lib.c super.c namei.c rw.c file.c dir.c \
51                      llite_lib.h
52
53 # for make rpms -- need cleanup
54 liblustre_a_SOURCES = llite_lib.c super.c namei.c rw.c file.c dir.c
55
56 liblustre.a : $(LUSTRE_LIBS) $(PTL_LIBS) $(SYSIO_LIBS)
57         sh $(srcdir)/genlib.sh $(SYSIO) $(CRAY_PORTALS_PATH)
58
59 EXTRA_DIST = genlib.sh
60
61 CLEANFILES := liblsupport.a liblustre.so