1 #
   2 # This file and its contents are supplied under the terms of the
   3 # Common Development and Distribution License ("CDDL"), version 1.0.
   4 # You may only use this file in accordance with the terms of version
   5 # 1.0 of the CDDL.
   6 #
   7 # A full copy of the text of the CDDL should have accompanied this
   8 # source.  A copy of the CDDL is also available via the Internet at
   9 # http://www.illumos.org/license/CDDL.
  10 #
  11 
  12 #
  13 # Copyright (c) 2014, Joyent, Inc.  All rights reserved.
  14 #
  15 
  16 #
  17 # uts/sparc/bnxe/Makefile
  18 #
  19 #       This makefile drives the production of the bnxe
  20 #       driver kernel module.
  21 #
  22 #       sparc architecture dependent
  23 #
  24 
  25 #
  26 #       Paths to the base of the uts directory trees
  27 #
  28 UTSBASE = ../..
  29 
  30 #
  31 #       Define the module and object file sets.
  32 #
  33 MODULE          = bnxe
  34 OBJECTS         = $(BNXE_OBJS:%=$(OBJS_DIR)/%)
  35 LINTS           = $(LINTS_DIR)/bnxe_lint.ln
  36 ROOTMODULE      = $(ROOT_DRV_DIR)/$(MODULE)
  37 SRCDIR          = $(UTSBASE)/common/io/bnxe
  38 CONF_SRCDIR     = $(SRCDIR)
  39 
  40 #
  41 #       Include common rules.
  42 #
  43 include $(UTSBASE)/sparc/Makefile.sparc
  44 
  45 #
  46 #       Define targets
  47 #
  48 ALL_TARGET      = $(BINARY) $(CONFMOD)
  49 LINT_TARGET     = $(MODULE).lint
  50 INSTALL_TARGET  = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
  51 
  52 C99LMODE=       -Xc99=%all
  53 
  54 #
  55 #       Driver-specific flags
  56 #       XXX inline bits were originally set to inline
  57 #
  58 CPPFLAGS        += -DLM_RXPKT_NON_CONTIGUOUS \
  59                    -DELINK_ENHANCEMENTS \
  60                    -DELINK_57711E_SUPPORT \
  61                    -DELINK_DEBUG \
  62                    -D__inline= \
  63                    -D_inline= \
  64                    -D__BASENAME__=\"bnxe\" \
  65                    -D__SunOS \
  66                    -D__S11 \
  67                    -DILLUMOS \
  68                    -DBIG_ENDIAN \
  69                    -DBIG_ENDIAN_HOST \
  70                    -D__BIG_ENDIAN \
  71                    -I$(SRCDIR)/577xx/include \
  72                    -I$(SRCDIR)/577xx/drivers/common/ecore \
  73                    -I$(SRCDIR)/577xx/drivers/common/include \
  74                    -I$(SRCDIR)/577xx/drivers/common/include/l4 \
  75                    -I$(SRCDIR)/577xx/drivers/common/include/l5 \
  76                    -I$(SRCDIR)/577xx/drivers/common/lm/device \
  77                    -I$(SRCDIR)/577xx/drivers/common/lm/fw \
  78                    -I$(SRCDIR)/577xx/drivers/common/lm/include \
  79                    -I$(SRCDIR)/577xx/drivers/common/lm/l4 \
  80                    -I$(SRCDIR)/577xx/drivers/common/lm/l4/include \
  81                    -I$(SRCDIR)/577xx/drivers/common/lm/l5 \
  82                    -I$(SRCDIR)/577xx/drivers/common/lm/l5/include \
  83                    -I$(SRCDIR)/577xx/hsi/hw/include \
  84                    -I$(SRCDIR)/577xx/hsi/mcp \
  85                    -I$(SRCDIR)
  86 
  87 LDFLAGS         += -dy -r -Ndrv/ip -Nmisc/mac
  88 #CERRWARN       += -_gcc=-Wno-old-style-declaration
  89 CERRWARN        += -_gcc=-Wno-switch
  90 CERRWARN        += -_gcc=-Wno-uninitialized
  91 CERRWARN        += -_gcc=-Wno-parentheses
  92 CERRWARN        += -_gcc=-Wno-unused-function
  93 CERRWARN        += -_gcc=-Wno-unused-value
  94 CERRWARN        += -_gcc=-Wno-unused-variable
  95 CERRWARN        += -_cc=-erroff=E_STATEMENT_NOT_REACHED
  96 CERRWARN        += -_cc=-erroff=E_ARGUEMENT_MISMATCH
  97 CERRWARN        += -_cc=-erroff=E_INTEGER_OVERFLOW_DETECTED
  98 CERRWARN        += -_cc=-erroff=E_CONST_PROMOTED_UNSIGNED_LL
  99 CERRWARN        += -_cc=-erroff=E_ENUM_VAL_OVERFLOWS_INT_MAX
 100 
 101 LINTTAGS        += -erroff=E_FUNC_RET_ALWAYS_IGNOR2
 102 LINTTAGS        += -erroff=E_FUNC_RET_MAYBE_IGNORED2
 103 LINTTAGS        += -erroff=E_STATIC_UNUSED
 104 LINTTAGS        += -erroff=E_FUNC_SET_NOT_USED
 105 LINTTAGS        += -erroff=E_BAD_PTR_CAST_ALIGN
 106 LINTTAGS        += -erroff=E_CONSTANT_CONDITION
 107 LINTTAGS        += -erroff=E_NOP_ELSE_STMT
 108 LINTTAGS        += -erroff=E_NOP_IF_STMT
 109 LINTTAGS        += -erroff=E_FUNC_ARG_UNUSED
 110 LINTTAGS        += -erroff=E_FUNC_VAR_UNUSED
 111 LINTTAGS        += -erroff=E_EXPR_NULL_EFFECT
 112 LINTTAGS        += -erroff=E_STMT_NOT_REACHED
 113 LINTTAGS        += -erroff=E_ASSIGN_NARROW_CONV
 114 LINTTAGS        += -erroff=E_PTRDIFF_OVERFLOW
 115 LINTTAGS        += -erroff=E_CASE_FALLTHRU
 116 LINTTAGS        += -erroff=E_CONST_EXPR
 117 
 118 #
 119 #       Default build targets.
 120 #
 121 .KEEP_STATE:
 122 
 123 def:            $(DEF_DEPS)
 124 
 125 all:            $(ALL_DEPS)
 126 
 127 clean:          $(CLEAN_DEPS)
 128 
 129 clobber:        $(CLOBBER_DEPS)
 130 
 131 lint:           $(LINT_DEPS)
 132 
 133 modlintlib:     $(MODLINTLIB_DEPS)
 134 
 135 clean.lint:     $(CLEAN_LINT_DEPS)
 136 
 137 install:        $(INSTALL_DEPS)
 138 
 139 #
 140 #       Include common targets.
 141 #
 142 include $(UTSBASE)/sparc/Makefile.targ