Files
xen/tools/libfsimage/common/Makefile
T
Ian Jackson 1a81471188 tools/libfsimage: Add `xen' to .h names and principal .so name
`fsimage' is rather general.  And we do not expect this library to be
very useful out of tree because of its unstable ABI.

So add the word `xen'.  This will avoid naming conflicts with anyone
else's fsimage library.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2018-10-15 14:49:33 +01:00

56 lines
1.7 KiB
Makefile

XEN_ROOT = $(CURDIR)/../../..
include $(XEN_ROOT)/tools/libfsimage/Rules.mk
MAJOR = 0
MINOR = 4.12
LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU
LDFLAGS += $(LDFLAGS-y)
CFLAGS += $(PTHREAD_CFLAGS)
LDFLAGS += $(PTHREAD_LDFLAGS)
LIB_SRCS-y = fsimage.c fsimage_plugin.c fsimage_grub.c
PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
LIB = libxenfsimage.so libxenfsimage.so.$(MAJOR) libxenfsimage.so.$(MAJOR).$(MINOR)
.PHONY: all
all: $(LIB)
.PHONY: install
install: all
$(INSTALL_DIR) $(DESTDIR)$(libdir)
$(INSTALL_DIR) $(DESTDIR)$(includedir)
$(INSTALL_PROG) libxenfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
ln -sf libxenfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenfsimage.so.$(MAJOR)
ln -sf libxenfsimage.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenfsimage.so
$(INSTALL_DATA) xenfsimage.h $(DESTDIR)$(includedir)
$(INSTALL_DATA) xenfsimage_plugin.h $(DESTDIR)$(includedir)
$(INSTALL_DATA) xenfsimage_grub.h $(DESTDIR)$(includedir)
.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)$(includedir)/xenfsimage_grub.h
rm -f $(DESTDIR)$(includedir)/xenfsimage_plugin.h
rm -f $(DESTDIR)$(includedir)/xenfsimage.h
rm -f $(DESTDIR)$(libdir)/libxenfsimage.so
rm -f $(DESTDIR)$(libdir)/libxenfsimage.so.$(MAJOR)
rm -f $(DESTDIR)$(libdir)/libxenfsimage.so.$(MAJOR).$(MINOR)
clean distclean::
rm -f $(LIB)
libxenfsimage.so: libxenfsimage.so.$(MAJOR)
ln -sf $< $@
libxenfsimage.so.$(MAJOR): libxenfsimage.so.$(MAJOR).$(MINOR)
ln -sf $< $@
libxenfsimage.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenfsimage.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(PTHREAD_LIBS) $(APPEND_LDFLAGS)
-include $(DEPS_INCLUDE)