Introduce a new build variable "nosharedlibs".
In tools/libxc use it instead of $(stubdom).
In tools/xenstore honour it, and build static clients.
If shared libs are disabled, do not try to install or symlink them.
Set nosharedlibs when building for MiniOS or NetBSDRump.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
---
v2: Clarify deliberate INSTALL_SHLIB and SYMLINK_SHLIB breakage.
# Override settings for this OS
PTHREAD_LIBS =
+nosharedlibs=y
WGET = ftp
XENSTORE_XENSTORED=n
+nosharedlibs=y
XENSTORE_XENSTORED ?= y
+ifneq ($(nosharedlibs),y)
INSTALL_SHLIB = $(INSTALL_PROG)
SYMLINK_SHLIB = ln -sf
libextension = .so
+else
+libextension = .a
+XENSTORE_STATIC_CLIENTS=y
+# If something tries to use these it is a mistake. Provide references
+# to nonexistent programs to produce a sane error message.
+INSTALL_SHLIB = : install-shlib-unsupported-fail
+SYMLINK_SHLIB = : symlink-shlib-unsupported-fail
+endif
CFLAGS_libxenctrl = -I$(XEN_LIBXC) $(CFLAGS_xeninclude)
LDLIBS_libxenctrl = $(XEN_LIBXC)/libxenctrl$(libextension)
$(CTRL_PIC_OBJS) $(GUEST_PIC_OBJS) $(OSDEP_PIC_OBJS) : CFLAGS += -include $(XEN_ROOT)/tools/config.h
LIB := libxenctrl.a
-ifneq ($(stubdom),y)
+ifneq ($(nosharedlibs),y)
LIB += libxenctrl.so libxenctrl.so.$(MAJOR) libxenctrl.so.$(MAJOR).$(MINOR)
endif
LIB += libxenguest.a
-ifneq ($(stubdom),y)
+ifneq ($(nosharedlibs),y)
LIB += libxenguest.so libxenguest.so.$(MAJOR) libxenguest.so.$(MAJOR).$(MINOR)
endif
-ifneq ($(stubdom),y)
+ifneq ($(nosharedlibs),y)
LIB += xenctrl_osdep_ENOSYS.so
endif
xenstore xenstore-control: CFLAGS += -static
endif
-ALL_TARGETS = libxenstore.so libxenstore.a clients
+ALL_TARGETS = libxenstore.a clients
+ifneq ($(nosharedlibs),y)
+ALL_TARGETS += libxenstore.so
+endif
ifeq ($(XENSTORE_XENSTORED),y)
ALL_TARGETS += xs_tdb_dump xenstored
endif