Whamcloud - gitweb
land b_v26 (20040316_1603)
[fs/lustre-release.git] / lustre / obdclass / Makefile.am
1 DEFS=
2 MODULE = obdclass
3
4 if LIBLUSTRE
5
6 noinst_LIBRARIES = liblustreclass.a
7 liblustreclass_a_SOURCES = class_obd.c debug.c genops.c statfs_pack.c uuid.c 
8 liblustreclass_a_SOURCES += lustre_handles.c lustre_peer.c lprocfs_status.c
9 liblustreclass_a_SOURCES += obdo.c obd_config.c llog.c llog_obd.c llog_cat.c
10 liblustreclass_a_SOURCES += llog_lvfs.c #llog_ioctl.c rbtree.c
11 liblustreclass_a_CFLAGS = -fPIC
12
13 class_obd.c: lustre_build_version
14
15 lustre_build_version:
16         echo '#define LUSTRE_VERSION 32' > $(top_builddir)/include/linux/lustre_build_version.h
17         echo '#define BUILD_VERSION "1"' >> $(top_builddir)/include/linux/lustre_build_version.h
18
19 else
20
21 class_obd.o: lustre_build_version
22
23 modulefs_DATA = lustre_build_version obdclass.o llog_test.o
24 EXTRA_PROGRAMS = obdclass llog_test
25
26 obdclass_SOURCES = llog.c llog_cat.c llog_lvfs.c llog_obd.c  class_obd.c debug.c genops.c sysctl.c uuid.c llog_ioctl.c
27 obdclass_SOURCES += lprocfs_status.c lustre_handles.c lustre_peer.c
28 obdclass_SOURCES += statfs_pack.c obdo.c obd_config.c llog_internal.h
29
30 lustre_build_version:
31         perl $(top_srcdir)/scripts/version_tag.pl $(top_srcdir) $(top_builddir) > tmpver
32         echo "#define LUSTRE_RELEASE @RELEASE@" >> tmpver
33         cmp -s $(top_builddir)/include/linux/lustre_build_version.h tmpver \
34                 2> /dev/null &&                                            \
35                 $(RM) tmpver ||                                            \
36                 mv tmpver $(top_builddir)/include/linux/lustre_build_version.h
37 endif
38
39 include $(top_srcdir)/Rules
40
41 if LINUX25
42 # workaround for llog_test
43 llog_test.o: llog_test.c
44         $(COMPILE) -UKBUILD_MODNAME -DKBUILD_MODNAME=llog_test -c -o llog_test_tmp.o $<
45         rm -f llog_test_tmp.c
46         $(LINUX)/scripts/modpost $(LINUX)/vmlinux llog_test_tmp.o
47         $(COMPILE) -UKBUILD_MODNAME -UKBUILD_BASENAME -DKBUILD_BASENAME=llog_test \
48                 -c llog_test_tmp.mod.c
49         $(LD) -m "`$(LD) --help | awk '/supported emulations/ {print $$4}'`" -r \
50                 -o llog_test.o llog_test_tmp.o llog_test_tmp.mod.o
51 endif