1 # Copyright (C) 2001 Cluster File Systems, Inc.
3 # This code is issued under the GNU General Public License.
4 # See the file COPYING in this distribution
6 AUTOMAKE_OPTIONS = foreign
8 ALWAYS_SUBDIRS := include fid lvfs obdclass ldlm ptlrpc osc lov obdecho \
9 mgc doc utils tests conf scripts autoconf
11 SERVER_SUBDIRS := ldiskfs obdfilter ost mds mgs mdt cmm mdd osd
13 CLIENT_SUBDIRS := mdc llite fld
15 QUOTA_SUBDIRS := quota
17 LIBLUSTRE_SUBDIRS := liblustre
19 SUBDIRS := $(ALWAYS_SUBDIRS)
22 SUBDIRS += $(SERVER_SUBDIRS)
26 SUBDIRS += $(CLIENT_SUBDIRS)
30 SUBDIRS += $(QUOTA_SUBDIRS)
33 # this needs to be after the client subdirs
36 SUBDIRS += $(CLIENT_SUBDIRS)
38 SUBDIRS += $(LIBLUSTRE_SUBDIRS)
41 DIST_SUBDIRS := $(ALWAYS_SUBDIRS) $(SERVER_SUBDIRS) $(CLIENT_SUBDIRS) \
42 $(LIBLUSTRE_SUBDIRS) $(QUOTA_SUBDIRS)
44 EXTRA_DIST = BUGS FDL kernel_patches
47 LDISKFS = ldiskfs-sources
49 $(MAKE) sources -C ldiskfs
53 $(MAKE) sources -C lvfs
55 sources: $(LDISKFS) lvfs-sources lustre_build_version
57 all-recursive: lustre_build_version
60 perl $(top_builddir)/lustre/scripts/version_tag.pl $(top_srcdir) $(top_builddir) > tmpver
61 echo "#define LUSTRE_RELEASE @RELEASE@" >> tmpver
62 cmp -s $(top_builddir)/lustre/include/linux/lustre_build_version.h tmpver \
65 mv tmpver $(top_builddir)/lustre/include/linux/lustre_build_version.h
68 CSTKO=/tmp/checkstack.orig
71 [ -f ${CSTK} -a ! -s ${CSTKO} ] && mv ${CSTK} ${CSTKO} || true
72 for i in ${SUBDIRS} lnet/klnds/*; do \
73 MOD=$$i/`basename $$i`.o; \
74 [ -f $$MOD ] && objdump -d $$MOD | perl tests/checkstack.pl; \
75 done | sort -nr > ${CSTK}
76 [ -f ${CSTKO} ] && ! diff -u ${CSTKO} ${CSTK} || head -30 ${CSTK}
79 [ -f ${CSTK} ] && mv ${CSTK} ${CSTKO}
82 rm -f ${CSTK} ${CSTKO}