]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
open-vm-tools: build vmmemctl, vmxnet and vmxnet3 for OpenSolaris.
authorVMware, Inc <>
Wed, 20 Jan 2010 21:32:05 +0000 (13:32 -0800)
committerMarcelo Vanzin <mvanzin@vmware.com>
Wed, 20 Jan 2010 21:32:05 +0000 (13:32 -0800)
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/configure.ac
open-vm-tools/modules/solaris/vmmemctl/Makefile
open-vm-tools/modules/solaris/vmxnet/Makefile
open-vm-tools/modules/solaris/vmxnet3/Makefile

index 0efd5504d3a6fe2af77938f9c574a17d17c198ff..fabd6593070b6526f39c97d3746a7127b0242e8c 100644 (file)
@@ -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"],
index 651aa9884371d0245be021290a606387b1723385..980cfb15053ba39fa5e803160d74c2d2771b1e76 100644 (file)
@@ -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
index 6f76ddbb293f8413ef4c08d87f497db7e29dd344..3e102e63948d994d4534a960f5b4858d6c06e1fb 100644 (file)
@@ -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
index 7c3a7696726efadc9b13944931bedb40eeb6957b..6859448b91e6adb418692e6ee782fea6eed13cc1 100644 (file)
 ##########################################################
 
 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
 ##