[Ocfs2-tools-devel] [PATCH 1/7] Ocfs2-tools: Add Makefile and .gitignore to o2info.

Tristan Ye tristan.ye at oracle.com
Fri Nov 27 00:53:26 PST 2009


Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
---
 Makefile          |    2 +-
 o2info/.gitignore |    4 ++++
 o2info/Makefile   |   40 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 1 deletions(-)
 create mode 100644 o2info/.gitignore
 create mode 100644 o2info/Makefile

diff --git a/Makefile b/Makefile
index 88106fb..8c42ae6 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ CHKCONFIG_DEP = chkconfig
 COMPILE_PY = 1
 endif
 
-SUBDIRS = include libtools-internal libo2dlm libo2cb libocfs2 fsck.ocfs2 mkfs.ocfs2 mounted.ocfs2 tunefs.ocfs2 debugfs.ocfs2 o2cb_ctl ocfs2_hb_ctl mount.ocfs2 ocfs2_controld o2image listuuid sizetest extras fswreck patches
+SUBDIRS = include libtools-internal libo2dlm libo2cb libocfs2 fsck.ocfs2 mkfs.ocfs2 mounted.ocfs2 tunefs.ocfs2 debugfs.ocfs2 o2cb_ctl ocfs2_hb_ctl mount.ocfs2 ocfs2_controld o2image listuuid sizetest extras fswreck patches o2info
 
 ifdef BUILD_OCFS2CONSOLE
 SUBDIRS += ocfs2console
diff --git a/o2info/.gitignore b/o2info/.gitignore
new file mode 100644
index 0000000..4436af4
--- /dev/null
+++ b/o2info/.gitignore
@@ -0,0 +1,4 @@
+.*.sw?
+*.d
+o2info
+o2info.8
diff --git a/o2info/Makefile b/o2info/Makefile
new file mode 100644
index 0000000..141d7e2
--- /dev/null
+++ b/o2info/Makefile
@@ -0,0 +1,40 @@
+TOPDIR = ..
+
+include $(TOPDIR)/Preamble.make
+
+WARNINGS = -Wall -Wstrict-prototypes -Wno-format -Wmissing-prototypes \
+           -Wmissing-declarations
+
+CFLAGS = $(OPTS) $(WARNINGS) -ggdb
+
+LIBTOOLS_INTERNAL_LIBS = -L$(TOPDIR)/libtools-internal -ltools-internal
+LIBTOOLS_INTERNAL_DEPS = $(TOPDIR)/libtools-internal/libtools-internal.a
+
+LIBOCFS2_LIBS = -L$(TOPDIR)/libocfs2 -locfs2
+LIBOCFS2_DEPS = $(TOPDIR)/libocfs2/libocfs2.a
+
+sbindir = $(root_sbindir)
+BIN_PROGRAMS = o2info
+
+INCLUDES = -I$(TOPDIR)/include -I.
+INCLUDES += $(GLIB_CFLAGS)
+DEFINES = -DVERSION=\"$(VERSION)\"
+
+MANS = o2info.8
+
+HFILES = o2info.h		\
+	 o2info_utils.h
+
+CFILES =			\
+	main.c		\
+	o2info_operations.c	\
+	o2info_utils.c
+
+OBJS = $(subst .c,.o,$(CFILES))
+
+DIST_FILES = $(CFILES) $(HFILES) o2info.8.in
+
+o2info: $(OBJS) $(LIBOCFS2_DEPS)
+	$(LINK) $(GLIB_LIBS) $(LIBOCFS2_LIBS) $(LIBTOOLS_INTERNAL_LIBS) $(COM_ERR_LIBS)
+
+include $(TOPDIR)/Postamble.make
-- 
1.5.5




More information about the Ocfs2-tools-devel mailing list