d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# CDDL HEADER START
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# The contents of this file are subject to the terms of the
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Common Development and Distribution License (the "License").
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# You may not use this file except in compliance with the License.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# or http://www.opensolaris.org/os/licensing.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# See the License for the specific language governing permissions
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# and limitations under the License.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# When distributing Covered Code, include this CDDL HEADER in each
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# If applicable, add the following below this CDDL HEADER, with the
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# fields enclosed by brackets "[]" replaced with your own identifying
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# information: Portions Copyright [yyyy] [name of copyright owner]
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# CDDL HEADER END
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Use is subject to license terms.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# This makefile drives the production of the Chelsio N110
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# 10G Ethernet (CH) driver module in x86 systems
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Path to the base of the uts directory tree (usually /usr/src/uts).
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwUTSBASE = ../..
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Define the module and object file sets.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwMODULE = chxge
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwOBJECTS = $(CH_OBJS:%=$(OBJS_DIR)/%) $(CH_COM_OBJS:%=$(OBJS_DIR)/%)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwLINTS = $(CH_OBJS:%.o=$(LINTS_DIR)/%.ln) $(CH_COM_OBJS:%.o=$(LINTS_DIR)/%.ln)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Include common rules.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwinclude $(UTSBASE)/sparc/Makefile.sparc
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Define targets
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwALL_TARGET = $(BINARY)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwLINT_TARGET = $(MODULE).lint
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwCFLAGS += -DC99_NOT_SUPPORTED -DCONFIG_CHELSIO_T1_1G \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw -I$(UTSBASE)/common/io/chxge/ \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw -I$(UTSBASE)/common/io/chxge/com
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwCFLAGS += -DCONFIG_SMP
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwCFLAGS += -DRX_MAX_COUNT=256
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwCFLAGS += -DCONFIG_CHELSIO_T1_OFFLOAD
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwCFLAGS += -DSUN_KSTATS -DHOST_PAUSE -DTX_CKSUM_FIX -DTX_THREAD_RECLAIM
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwCFLAGS += -xc99=%all
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Debug flags
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# CFLAGS += -DCH_DEBUG=1 -DPE_DBGOUT_ENABLED=1
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Driver depends on GLD & IP
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwLDFLAGS += -dy -N misc/gld -N drv/ip
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Lint flag
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwLINTFLAGS += -DC99_NOT_SUPPORTED -DCONFIG_CHELSIO_T1_1G \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw -I$(UTSBASE)/common/io/chxge/ \
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw -I$(UTSBASE)/common/io/chxge/com
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwLINTFLAGS += -DCONFIG_SMP
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwLINTFLAGS += -DRX_MAX_COUNT=256
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwLINTFLAGS += -DCONFIG_CHELSIO_T1_OFFLOAD
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwLINTFLAGS += -DSUN_KSTATS -DHOST_PAUSE -DTX_CKSUM_FIX -DTX_THREAD_RECLAIM
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwLINTFLAGS += -Xc99=%all
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# For now, disable these lint checks; maintainers should endeavor
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# to investigate and remove these for maximum lint coverage.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Please do not carry these forward to new Makefiles.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwLINTTAGS += -erroff=E_STATIC_UNUSED
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-unused-label
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-unused-function
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-unused-variable
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-parentheses
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Default build targets.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw.KEEP_STATE:
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwdef: $(DEF_DEPS)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwall: $(ALL_DEPS)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwclean: $(CLEAN_DEPS)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwclobber: $(CLOBBER_DEPS)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwlint: $(LINT_DEPS)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwmodlintlib: $(MODLINTLIB_DEPS)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwclean.lint: $(CLEAN_LINT_DEPS)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwinstall: $(INSTALL_DEPS)
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw# Include common targets.
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xw#
d39a76e7b087a3d0927cbe6898dc0a6770fa6c68xwinclude $(UTSBASE)/sparc/Makefile.targ