From: VMware, Inc <> Date: Wed, 20 Jan 2010 21:32:05 +0000 (-0800) Subject: open-vm-tools: build vmmemctl, vmxnet and vmxnet3 for OpenSolaris. X-Git-Tag: 2010.01.19-226760~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a6a4e8acdb7fae76fcc28528971ea59974bec307;p=thirdparty%2Fopen-vm-tools.git open-vm-tools: build vmmemctl, vmxnet and vmxnet3 for OpenSolaris. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac index 0efd5504d..fabd65930 100644 --- a/open-vm-tools/configure.ac +++ b/open-vm-tools/configure.ac @@ -1052,18 +1052,15 @@ if test "$os" = "solaris"; then CPPFLAGS="$CPPFLAGS -DSOL11" fi - # Choose which modules to compile + MODULES="$MODULES vmxnet vmmemctl" + + # HGFS and vmblock need Solaris 10 at least. if test "$osVersion" -ge 510000; then MODULES="$MODULES vmhgfs vmblock" fi - # We build vmxnet and vmballoon on Solaris 9 and 10 - if test "$osVersion" -lt 511000 -a "$osVersion" -ge 509000; then - MODULES="$MODULES vmxnet vmmemctl" - fi - - # Vmxnet3 is built on Solaris 10 only and only if GLDv3 is installed - if test "$osVersion" -eq 510000; then + # vmxnet3 is built on Solaris 10 / 11 only if GLDv3 is installed. + if test "$osVersion" -gt 510000; then AC_CHECK_HEADER( [sys/mac.h], [MODULES="$MODULES vmxnet3"], diff --git a/open-vm-tools/modules/solaris/vmmemctl/Makefile b/open-vm-tools/modules/solaris/vmmemctl/Makefile index 651aa9884..980cfb150 100644 --- a/open-vm-tools/modules/solaris/vmmemctl/Makefile +++ b/open-vm-tools/modules/solaris/vmmemctl/Makefile @@ -59,18 +59,21 @@ VMMCTLD_32_OBJS := $(addprefix i386/, $(VMMCTLD_OBJS)) VMMCTLD_64_OBJS := $(addprefix amd64/, $(VMMCTLD_OBJS)) -ifeq ($(shell echo "$(VM_UNAME)" | cut -c-4),5.9) # { +ifeq ($(shell echo "$(VM_UNAME)" | cut -c-4),5.9) # Solaris 9 +SUPPORTED := 1 MODULES := $(MODULE_32) PROGS := $(PROG_32) INSTALL := install32 CFLAGS += -D__STDC__=0 -DSOL9 -else # } { -ifeq ($(shell echo "$(VM_UNAME)" | cut -c-4),5.10) # { +endif + +ifeq ($(shell echo "$(VM_UNAME)" | cut -c-4),5.10) # Solaris 10 +SUPPORTED := 1 MODULES := $(MODULE_32) $(MODULE_64) PROGS := $(PROG_32) $(PROG_64) INSTALL := install32 install64 @@ -78,12 +81,23 @@ CFLAGS += -DSOL10 KFLAGS += -ffreestanding KFLAGS += -nodefaultlibs -else # } { +endif + +ifeq ($(shell echo "$(VM_UNAME)" | cut -c-4),5.11) + +# Solaris 11 +SUPPORTED := 1 +MODULES := $(MODULE_32) $(MODULE_64) +PROGS := $(PROG_32) $(PROG_64) +INSTALL := install32 install64 +CFLAGS += -DSOL11 +KFLAGS += -ffreestanding +KFLAGS += -nodefaultlibs + +endif -$(error "This makefile is only used for Solaris 9 and 10") +$(if $(SUPPORTED),,$(error "Unsupported Solaris version: $(VM_UNAME)")) -endif # } -endif # } ifdef OVT_SOURCE_DIR CFLAGS += -I$(OVT_SOURCE_DIR)/lib/include diff --git a/open-vm-tools/modules/solaris/vmxnet/Makefile b/open-vm-tools/modules/solaris/vmxnet/Makefile index 6f76ddbb2..3e102e639 100644 --- a/open-vm-tools/modules/solaris/vmxnet/Makefile +++ b/open-vm-tools/modules/solaris/vmxnet/Makefile @@ -46,18 +46,12 @@ ifeq ($(shell echo "$(VM_UNAME)" | cut -c-4),5.9) # { MODULES := $(MODULE_32) else # } { -ifeq ($(shell echo "$(VM_UNAME)" | cut -c-4),5.10) # { -# Solaris 10 +# Assume Solaris 10 or 11. MODULES := $(MODULE_32) $(MODULE_64) CFLAGS += -ffreestanding CFLAGS += -nodefaultlibs -else # } { - -$(error "This makefile is only used for Solaris 9 and 10") - -endif # } endif # } ifdef OVT_SOURCE_DIR diff --git a/open-vm-tools/modules/solaris/vmxnet3/Makefile b/open-vm-tools/modules/solaris/vmxnet3/Makefile index 7c3a76967..6859448b9 100644 --- a/open-vm-tools/modules/solaris/vmxnet3/Makefile +++ b/open-vm-tools/modules/solaris/vmxnet3/Makefile @@ -16,9 +16,15 @@ ########################################################## ifneq ($(shell echo "$(VM_UNAME)" | cut -c-4),5.10) -$(error "This makefile is only used for Solaris 10") +SUPPORTED := 1 endif +ifneq ($(shell echo "$(VM_UNAME)" | cut -c-4),5.11) +SUPPORTED := 1 +endif + +$(if $(SUPPORTED),,$(error "Unsupported Solaris version: $(VM_UNAME)")) + ## ## General build locations and variables ##