#******************************************************************************
#*
#*  Copyright 2000
#*  Broadcom Corporation
#*  16215 Alton Parkway
#*  PO Box 57013
#*  Irvine CA 92619-7013
#*
#*****************************************************************************/
# 
# Broadcom Corporation uBSec SDK 
#
#
# Makefile
#
#
# Revision History:
#
# 05/24/00 JJT Created.
# 10/23/01 RLT Added solaris
#

# Try to positively identify the OS. Keep the first match.
MAKE=make

# See if OSTYPE contains "bsd" (case insensitive)
ifndef THIS_OSTYPE
  ifneq ($(shell echo $(OSTYPE) | grep -i bsd),)
    THIS_OSTYPE= bsd
  endif
endif

# See if uname contains "SunOS" (case insensitive)
ifndef THIS_OSTYPE
  ifneq ($(shell uname -a | grep -i SunOS),)
    THIS_OSTYPE= solaris
    MAKE=gmake
  endif
  ifneq ($(shell uname -a | grep -i solaris),)
    THIS_OSTYPE= solaris
    MAKE=gmake
  endif
endif

# See if OSTYPE contains "linux" (case insensitive)
ifndef THIS_OSTYPE
  ifneq ($(shell uname -a | grep -i linux),)
    THIS_OSTYPE= Linux
  endif
endif

# See if OSTYPE contains "vxworks" (case insensitive)
ifndef THIS_OSTYPE
  ifneq ($(shell echo $(OSTYPE) | grep -i vxworks),)
    THIS_OSTYPE= vxworks
  endif
endif

all clean rebuild:
	$(MAKE) -f Makefile.$(THIS_OSTYPE) $@


