Commit 5483e03b authored by Keir Fraser's avatar Keir Fraser

Make stubdom/Makefile override XEN_OS to MiniOS, and add

config/MiniOS.mk. Add PTHREAD_LIBS to configs (usually holding
-lpthread).
Signed-off-by: default avatarSamuel Thibault <samuel.thibault@eu.citrix.com>
parent 6b537483
......@@ -28,14 +28,6 @@ DESTDIR ?= /
include $(XEN_ROOT)/config/$(XEN_OS).mk
include $(XEN_ROOT)/config/$(XEN_TARGET_ARCH).mk
ifeq ($(stubdom),y)
include $(XEN_ROOT)/extras/mini-os/Config.mk
CFLAGS += $(DEF_CFLAGS) $(ARCH_CFLAGS)
CPPFLAGS += $(DEF_CPPFLAGS) $(ARCH_CPPFLAGS) $(extra_incl)
ASFLAGS += $(DEF_ASFLAGS) $(ARCH_ASFLAGS)
LDFLAGS += $(DEF_LDFLAGS) $(ARCH_LDFLAGS)
endif
ifneq ($(EXTRA_PREFIX),)
EXTRA_INCLUDES += $(EXTRA_PREFIX)/include
EXTRA_LIB += $(EXTRA_PREFIX)/$(LIBLEAFDIR)
......
include $(XEN_ROOT)/config/StdGNU.mk
include $(XEN_ROOT)/extras/mini-os/Config.mk
CFLAGS += $(DEF_CFLAGS) $(ARCH_CFLAGS)
CPPFLAGS += $(DEF_CPPFLAGS) $(ARCH_CPPFLAGS) $(extra_incl)
ASFLAGS += $(DEF_ASFLAGS) $(ARCH_ASFLAGS)
LDFLAGS += $(DEF_LDFLAGS) $(ARCH_LDFLAGS)
# Override settings for this OS
PTHREAD_LIBS =
......@@ -35,6 +35,7 @@ PRIVATE_BINDIR = $(PRIVATE_PREFIX)/bin
SOCKET_LIBS =
CURSES_LIBS = -lncurses
PTHREAD_LIBS = -lpthread
UTIL_LIBS = -lutil
SONAME_LDFLAG = -soname
SHLIB_CFLAGS = -shared
......
......@@ -39,6 +39,7 @@ SunOS_LIBDIR_x86_64 = /usr/sfw/lib/amd64
SOCKET_LIBS = -lsocket
CURSES_LIBS = -lcurses
PTHREAD_LIBS = -lpthread
UTIL_LIBS =
SONAME_LDFLAG = -h
SHLIB_CFLAGS = -R $(SunOS_LIBDIR) -shared
......
XEN_ROOT = ..
export XEN_OS=MiniOS
include $(XEN_ROOT)/Config.mk
export stubdom=y
export debug=y
......
......@@ -25,13 +25,11 @@ ifneq ($(stubdom),y)
CTRL_SRCS-y += xc_resume.c
endif
CTRL_SRCS-$(CONFIG_X86) += xc_pagetab.c
ifneq ($(stubdom),y)
CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
CTRL_SRCS-$(CONFIG_SunOS) += xc_solaris.c
CTRL_SRCS-$(CONFIG_X86_Linux) += xc_ptrace.c xc_ptrace_core.c
CTRL_SRCS-$(CONFIG_NetBSD) += xc_netbsd.c
endif
CTRL_SRCS-$(stubdom) += xc_minios.c
CTRL_SRCS-$(CONFIG_MiniOS) += xc_minios.c
GUEST_SRCS-y :=
GUEST_SRCS-y += xg_private.c
......@@ -75,10 +73,6 @@ CFLAGS += -Wp,-MD,.$(@F).d
LDFLAGS += -L.
DEPS = .*.d
ifneq ($(stubdom),y)
LDLIBS = -lpthread
endif
CTRL_LIB_OBJS := $(patsubst %.c,%.o,$(CTRL_SRCS-y))
CTRL_PIC_OBJS := $(patsubst %.c,%.opic,$(CTRL_SRCS-y))
......@@ -152,7 +146,7 @@ libxenctrl.so.$(MAJOR): libxenctrl.so.$(MAJOR).$(MINOR)
ln -sf $< $@
libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ $(LDLIBS)
$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ $(PTHREAD_LIBS)
# libxenguest
......@@ -165,7 +159,7 @@ libxenguest.so.$(MAJOR): libxenguest.so.$(MAJOR).$(MINOR)
ln -sf $< $@
libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so
$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(LDLIBS)
$(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl $(PTHREAD_LIBS)
-include $(DEPS)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment