aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libfsimage/Rules.mk
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@xensource.com>2006-11-09 14:09:53 +0000
committerTim Deegan <Tim.Deegan@xensource.com>2006-11-09 14:09:53 +0000
commitcddc1d5a09b0ee520e31d9f56dfb4a20f6fb3ba1 (patch)
tree40779970f5ad69d7f5cea225844c430e48812b8c /tools/libfsimage/Rules.mk
parent21b5e9be6acce19ff8aa22e55a0ddc69d7b19750 (diff)
downloadxen-cddc1d5a09b0ee520e31d9f56dfb4a20f6fb3ba1.tar.gz
xen-cddc1d5a09b0ee520e31d9f56dfb4a20f6fb3ba1.tar.bz2
xen-cddc1d5a09b0ee520e31d9f56dfb4a20f6fb3ba1.zip
Add libfsimage, a C library for reading files from filesystem images.
Initial support is provided for Solaris UFS, ext2 (both using libext2fs and not), and reiserfs. Signed-off-by: John Levon <john.levon@sun.com>
Diffstat (limited to 'tools/libfsimage/Rules.mk')
-rw-r--r--tools/libfsimage/Rules.mk32
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/libfsimage/Rules.mk b/tools/libfsimage/Rules.mk
new file mode 100644
index 0000000000..9fd15de4ce
--- /dev/null
+++ b/tools/libfsimage/Rules.mk
@@ -0,0 +1,32 @@
+include $(XEN_ROOT)/tools/Rules.mk
+
+DEPS = .*.d
+
+CFLAGS += -I$(XEN_ROOT)/tools/libfsimage/common/ -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wp,-MD,.$(@F).d
+LDFLAGS += -L../common/
+
+PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
+
+FSDIR-$(CONFIG_Linux) = $(LIBDIR)/fs/$(FS)
+FSDIR-$(CONFIG_SunOS)-x86_64 = lib/fs/$(FS)/64
+FSDIR-$(CONFIG_SunOS)-x86_32 = lib/fs/$(FS)/
+FSDIR-$(CONFIG_SunOS) = $(FSDIR-$(CONFIG_SunOS)-$(XEN_TARGET_ARCH))
+FSDIR = $(FSDIR-y)
+
+FSLIB = fsimage.so
+
+.PHONY: fs-all
+fs-all: $(FSLIB)
+
+.PHONY: fs-install
+fs-install: fs-all
+ $(INSTALL_DIR) $(DESTDIR)/usr/$(FSDIR)
+ $(INSTALL_PROG) $(FSLIB) $(DESTDIR)/usr/$(FSDIR)
+
+$(FSLIB): $(PIC_OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) -o $@ $^ -lfsimage $(FS_LIBDEPS)
+
+clean distclean:
+ rm -f $(PIC_OBJS) $(FSLIB)
+
+-include $(DEPS)