1include $(XEN_ROOT)/tools/Rules.mk 2 3CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ -DFSIMAGE_FSDIR=\"$(FSDIR)\" 4CFLAGS += -Werror -D_GNU_SOURCE 5LDFLAGS += -L../common/ 6 7PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y)) 8 9FSDIR = $(libdir)/xenfsimage 10 11FSLIB = fsimage.so 12 13.PHONY: fs-all 14fs-all: $(FSLIB) 15 16.PHONY: fs-install 17fs-install: fs-all 18 $(INSTALL_DIR) $(DESTDIR)$(FSDIR)/$(FS) 19 $(INSTALL_PROG) $(FSLIB) $(DESTDIR)$(FSDIR)/$(FS) 20 21.PHONY: fs-uninstall 22fs-uninstall: 23 rm -f $(addprefix $(DESTDIR)$(FSDIR)/$(FS)/, $(FSLIB)) 24 if [ -d $(DESTDIR)$(FSDIR)/$(FS) ]; then \ 25 rmdir $(DESTDIR)$(FSDIR)/$(FS); \ 26 fi 27 28$(FSLIB): $(PIC_OBJS) 29 $(CC) $(LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $^ -lxenfsimage $(FS_LIBDEPS) $(APPEND_LDFLAGS) 30 31clean distclean:: 32 rm -f $(PIC_OBJS) $(FSLIB) $(DEPS_RM) 33 34-include $(DEPS_INCLUDE) 35