[Ocfs2-test-devel] [PATCH 1/4] Ocfs2-test: Add Makefile for libocfs2test.

Tristan Ye tristan.ye at oracle.com
Tue Mar 24 05:24:05 PDT 2009


Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
---
 programs/Makefile              |    1 +
 programs/libocfs2test/Makefile |   31 +++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 0 deletions(-)
 create mode 100644 programs/libocfs2test/Makefile

diff --git a/programs/Makefile b/programs/Makefile
index 56b1e08..eca5a84 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -4,6 +4,7 @@ include $(TOPDIR)/Preamble.make
 
 
 SUBDIRS =			\
+	libocfs2test		\
 	aio-stress		\
 	aio_direct		\
 	atime_quantum		\
diff --git a/programs/libocfs2test/Makefile b/programs/libocfs2test/Makefile
new file mode 100644
index 0000000..27b05af
--- /dev/null
+++ b/programs/libocfs2test/Makefile
@@ -0,0 +1,31 @@
+TOPDIR = ../..
+
+include $(TOPDIR)/Preamble.make
+
+LIBRARIES = libocfs2test.a
+
+CFLAGS += -fPIC
+
+CFILES =		\
+	file_ops.c	\
+	dir_ops.c	
+
+HFILES =		\
+	file_ops.h	\
+	dir_ops.h	
+
+mpi_ops.o: mpi_ops.c mpi_ops.h
+	$(MPICC) -c -o mpi_ops.o mpi_ops.c $(CFLAGS)
+
+OBJS = $(subst .c,.o,$(CFILES))	\
+	mpi_ops.o
+
+$(LIBRARIES): $(OBJS)
+	rm -f $@
+	$(AR) r $@ $^
+	$(RANLIB) $@
+
+DIST_FILES = $(CFILES) $(HFILES)
+
+include $(TOPDIR)/Postamble.make
+
-- 
1.5.5




More information about the Ocfs2-test-devel mailing list