diff mbox

[ceph-client-standalone,:master-backport] miss Makefile

Message ID 1291799367.1958.33.camel@cephhost (mailing list archive)
State New, archived
Headers show

Commit Message

Jeff Wu Dec. 8, 2010, 9:09 a.m. UTC
None
diff mbox

Patch

==========================================================================

diff --git a/ceph-client-standalone/Makefile
b/ceph-client-standalone/Makefile
new file mode 100644
index 0000000..1b26d4b
--- /dev/null
+++ b/ceph-client-standalone/Makefile
@@ -0,0 +1,47 @@ 
+#
+# Makefile for CEPH filesystem.
+#
+
+ifneq ($(KERNELRELEASE),) 
+
+obj-$(CONFIG_CEPH_FS) += ceph.o
+
+ceph-objs := ceph/super.o ceph/inode.o ceph/dir.o ceph/file.o
ceph/locks.o ceph/addr.o ceph/ioctl.o \
+	ceph/export.o ceph/caps.o ceph/snap.o ceph/xattr.o \
+	ceph/mds_client.o ceph/mdsmap.o ceph/strings.o ceph/ceph_frag.o \
+	ceph/debugfs.o  \
+	libceph/ceph_common.o libceph/messenger.o libceph/msgpool.o
libceph/buffer.o libceph/pagelist.o \
+	libceph/mon_client.o \
+	libceph/osd_client.o libceph/osdmap.o libceph/crush/crush.o
libceph/crush/mapper.o libceph/crush/hash.o \
+	libceph/debugfs.o \
+	libceph/auth.o libceph/auth_none.o \
+	libceph/crypto.o libceph/armor.o \
+	libceph/auth_x.o \
+	libceph/ceph_fs.o libceph/ceph_strings.o libceph/ceph_hash.o \
+	libceph/pagevec.o
+
+clean-files += Modules_symvers
+clean-files += Module_symvers
+
+#EXTRA_CFLAGS += 
+
+else
+# Otherwise we were called directly from the command
+# line; invoke the kernel build system.
+
+KERNELRELEASE ?= $(shell uname -r)
+KERNELDIR ?= /lib/modules/$(KERNELRELEASE)/build
+PWD := $(shell pwd)
+
+
+default: all
+
+all:
+	$(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_CEPH_FS=m modules
+
+modules_install:
+	$(MAKE) -C $(KERNELDIR) M=$(PWD) CONFIG_CEPH_FS=m modules_install
+clean:
+	$(MAKE) -C $(KERNELDIR) M=$(PWD) clean
+
+endif
diff --git a/ceph-std/libceph/ceph_common.c
b/ceph-client-standalone/libceph/ceph_common.c
index fc759f8..58feda5 100644
--- a/ceph-std/libceph/ceph_common.c
+++ b/ceph-client-standalone/libceph/ceph_common.c
@@ -487,6 +487,8 @@  int ceph_open_session(struct ceph_client *client)
 EXPORT_SYMBOL(ceph_open_session);
 
 
+#ifdef CONFIG_CEPH_LIB
+
 static int __init init_ceph_lib(void)
 {
 	int ret = 0;
@@ -522,6 +524,8 @@  static void __exit exit_ceph_lib(void)
 module_init(init_ceph_lib);
 module_exit(exit_ceph_lib);
 
+#endif 
+
 MODULE_AUTHOR("Sage Weil <sage@newdream.net>");
 MODULE_AUTHOR("Yehuda Sadeh <yehuda@hq.newdream.net>");
 MODULE_AUTHOR("Patience Warnick <patience@newdream.net>");