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"],
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
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
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
##########################################################
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
##