Whamcloud - gitweb
- merge 0.7rc1 from b_devel to HEAD (20030612 merge point)
[fs/lustre-release.git] / lustre / obdclass / Makefile.am
1 # FIXME: we need to make it clear that obdclass.o depends on
2 # lustre_build_version, or 'make -j2' breaks!
3 DEFS=
4 MODULE = obdclass
5
6 if EXTN
7 FSMOD = fsfilt_extN
8 else
9 FSMOD = fsfilt_ext3
10 endif
11
12 if LIBLUSTRE
13 lib_LIBRARIES = liblustreclass.a
14 liblustreclass_a_SOURCES = uuid.c statfs_pack.c genops.c debug.c class_obd.c lustre_handles.c lustre_peer.c lprocfs_status.c simple.c
15
16 class_obd.o: lustre_version
17
18 lustre_version:
19         echo '#define LUSTRE_VERSION 12' > $(top_builddir)/include/linux/lustre_build_version.h
20         echo '#define BUILD_VERSION "1"' >> $(top_builddir)/include/linux/lustre_build_version.h
21
22 else
23 modulefs_DATA = lustre_build_version obdclass.o $(FSMOD).o fsfilt_reiserfs.o
24 EXTRA_PROGRAMS = obdclass $(FSMOD) fsfilt_reiserfs
25
26 obdclass_SOURCES = class_obd.c debug.c genops.c sysctl.c uuid.c simple.c
27 obdclass_SOURCES += lprocfs_status.c lustre_handles.c lustre_peer.c
28 obdclass_SOURCES += fsfilt.c statfs_pack.c
29 endif
30
31 include $(top_srcdir)/Rules
32
33 # XXX I'm sure there's some automake mv-if-different helper for this.
34 lustre_build_version:
35         perl $(top_srcdir)/scripts/version_tag.pl $(top_srcdir) $(top_builddir) > tmpver
36         cmp -s $(top_builddir)/include/linux/lustre_build_version.h tmpver \
37                 2> /dev/null &&                                            \
38                 $(RM) tmpver ||                                            \
39                 mv tmpver $(top_builddir)/include/linux/lustre_build_version.h