Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke#
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# CDDL HEADER START
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke#
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# The contents of this file are subject to the terms of the
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# Common Development and Distribution License (the "License").
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# You may not use this file except in compliance with the License.
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke#
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# or http://www.opensolaris.org/os/licensing.
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# See the License for the specific language governing permissions
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# and limitations under the License.
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke#
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# When distributing Covered Code, include this CDDL HEADER in each
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# If applicable, add the following below this CDDL HEADER, with the
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# fields enclosed by brackets "[]" replaced with your own identifying
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# information: Portions Copyright [yyyy] [name of copyright owner]
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke#
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# CDDL HEADER END
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke#
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke#
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass# Use is subject to license terms.
f6bd166491562196318bf33df84e3d86a31430f1Dav Glass#
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass# This makefile drives the production of the Neterion Xframe
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass# 10G Ethernet (XGE) driver module in x86 systems
f6bd166491562196318bf33df84e3d86a31430f1Dav Glass#
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass#
12928e8d8ffd8a265174db6c3dc588929e4d6087Reid Burke# Paths to the base of the uts directory trees
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass#
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav GlassUTSBASE = ../..
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass#
be0939fe6f057fbd5de928d17c4ab75aea379872Reid Burke# Define the module and object file sets.
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass#
be0939fe6f057fbd5de928d17c4ab75aea379872Reid BurkeMODULE = xge
be0939fe6f057fbd5de928d17c4ab75aea379872Reid BurkeOBJECTS = $(XGE_HAL_OBJS:%=$(OBJS_DIR)/%) $(XGE_OBJS:%=$(OBJS_DIR)/%)
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav GlassLINTS = $(XGE_HAL_OBJS:%.o=$(LINTS_DIR)/%.ln) $(XGE_OBJS:%.o=$(LINTS_DIR)/%.ln)
be0939fe6f057fbd5de928d17c4ab75aea379872Reid BurkeROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass#
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass# Include common rules.
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass#
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glassinclude $(UTSBASE)/intel/Makefile.intel
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass#
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass# Define targets
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass#
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav GlassALL_TARGET = $(BINARY)
708ff7540bdb1fc618580886154664042a9aeed1Luke SmithLINT_TARGET = $(MODULE).lint
708ff7540bdb1fc618580886154664042a9aeed1Luke SmithINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke#
6263d1dafcd2e21b4db703e59b8651bdc04907bcDav Glass# GENERAL PURPOUSE HAL FLAGS: Tuning HAL for Solaris specific modes
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke#
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid BurkeHAL_CFLAGS = -DXGE_HAL_USE_MGMT_AUX
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke#
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke# TRACE SECTION: Possible values for MODULE, TRACE and ERR masks:
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke#
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke# XGE_COMPONENT_HAL_CONFIG 0x1
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke# XGE_COMPONENT_HAL_FIFO 0x2
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke# XGE_COMPONENT_HAL_RING 0x4
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke# XGE_COMPONENT_HAL_CHANNEL 0x8
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke# XGE_COMPONENT_HAL_DEVICE 0x10
439ae5e0cc60411040831b89655c3a4c19fb7779Luke Smith# XGE_COMPONENT_HAL_MM 0x20
a78bde287e583eeb9739959abdf6e0c630c5e36dLuke Smith# XGE_COMPONENT_HAL_QUEUE 0x40
84336e3aa193faf29a9e35bc1be4ba64d181f3b3Luke Smith# XGE_COMPONENT_HAL_STATS 0x100
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass# XGE_COMPONENT_OSDEP 0x1000
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass# XGE_COMPONENT_LL 0x2000
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass# XGE_COMPONENT_TOE 0x4000
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass# XGE_COMPONENT_RDMA 0x8000
7aaf708225cdd190d91f49be9e6e966205320a5cDav Glass# XGE_COMPONENT_ALL 0xffffffff
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke#TRACE_CFLAGS = -DXGE_DEBUG_MODULE_MASK=0xffffffff \
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass# -DXGE_DEBUG_TRACE_MASK=0xffffffff \
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass# -DXGE_DEBUG_ERR_MASK=0xffffffff
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav GlassTRACE_CFLAGS = -DXGE_DEBUG_MODULE_MASK=0x00003010 \
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass -DXGE_DEBUG_TRACE_MASK=0x00000000 \
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass -DXGE_DEBUG_ERR_MASK=0x00003010
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav GlassXGE_CFLAGS = $(HAL_CFLAGS) $(TRACE_CFLAGS) $(CCVERBOSE) \
660335e82415fd6e6595b9b5ba9bb985cd4d948eReid Burke -I$(UTSBASE)/common/io/xge/hal/include \
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass -I$(UTSBASE)/common/io/xge/hal/xgehal \
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke -I$(UTSBASE)/common/io/xge/drv -DSOLARIS
660335e82415fd6e6595b9b5ba9bb985cd4d948eReid Burke
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav GlassCFLAGS += $(XGE_CFLAGS) -xO4 -xcrossfile -xc99=%all
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid BurkeCFLAGS64 += $(XGE_CFLAGS) -xO4 -xcrossfile -xc99=%all
ac7c57f1b197f3c72a2ddc5e637ead97875a279eDav Glass
660335e82415fd6e6595b9b5ba9bb985cd4d948eReid Burke#
660335e82415fd6e6595b9b5ba9bb985cd4d948eReid Burke# Driver depends on MAC & IP
660335e82415fd6e6595b9b5ba9bb985cd4d948eReid Burke#
bd791f169c504b6c9e9168760b747ea79ba7de23Luke SmithLDFLAGS += -dy -N misc/mac -N drv/ip
660335e82415fd6e6595b9b5ba9bb985cd4d948eReid Burke
660335e82415fd6e6595b9b5ba9bb985cd4d948eReid Burke# Lint flag
02c035a807932791fae29dccd0ec40abfa8354efDav Glass#
70f0433cee4c8d50b49775beb1e30ad939c885c0Dav GlassLINTFLAGS += $(XGE_CFLAGS) -Xc99=%all
660335e82415fd6e6595b9b5ba9bb985cd4d948eReid Burke
189277ded0718c94b6977ea564cbff3c182b4947Dav Glass#
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke# For now, disable these lint checks; maintainers should endeavor
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass# to investigate and remove these for maximum lint coverage.
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke# Please do not carry these forward to new Makefiles.
c6e42f10a2fe0393820d08f7e0cda61a8487825fReid Burke#
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav GlassLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav GlassLINTTAGS += -erroff=E_STATIC_UNUSED
503fb4ddbaa9d1109baf807f167b46b68f362699Reid BurkeLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass
d9fc042ef2414f7c2bd246ca8acbe4fc0f98a96bDav GlassCERRWARN += -_gcc=-Wno-parentheses
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav GlassCERRWARN += -_gcc=-Wno-unused-variable
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav GlassCERRWARN += -_gcc=-Wno-unused-label
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav GlassCERRWARN += -_gcc=-Wno-empty-body
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav GlassCERRWARN += -_gcc=-Wno-uninitialized
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass
5404ecbad31f04e0e400d53b0a1190e83dd7832eDav Glass#
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass#
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass# Default build targets.
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass#
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass.KEEP_STATE:
62eedee2637f740e72d4630a7dd6768677aad201Dav Glass
45752e7b60db35ae2e0db7f6840c1da4de384f77Luke Smithdef: $(DEF_DEPS)
21a782d0bea75baa2a4a449fd374d255f768725cDav Glass
ec1585e771a2b9c058c32219a08c8d6b57bad95aDav Glassall: $(ALL_DEPS)
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass
b4c5a830dd29e6cd018bd536132fa6d310b96e01Dav Glassclean: $(CLEAN_DEPS)
8755ca609aff2a6302944fb483c2f7487335ecd2Dav Glass
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glassclobber: $(CLOBBER_DEPS)
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass
930350e5926369e8b048a12fc70183a77b884bf1Dav Glasslint: $(LINT_DEPS)
93a287cdb36f9e41db8145be5d5e54bc0f63da7dMatt Sweeney
930350e5926369e8b048a12fc70183a77b884bf1Dav Glassmodlintlib: $(MODLINTLIB_DEPS)
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glassclean.lint: $(CLEAN_LINT_DEPS)
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass
f0caf0d4e5df331478e84332bc1790f09f31a5c2Ryan Groveinstall: $(INSTALL_DEPS)
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass
9815937ca9c6470d6d02ae6713f151fd21ff8922Dav Glass#
9815937ca9c6470d6d02ae6713f151fd21ff8922Dav Glass# Include common targets.
9815937ca9c6470d6d02ae6713f151fd21ff8922Dav Glass#
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glassinclude $(UTSBASE)/intel/Makefile.targ
6ce3d0e6f54e83435f626ee7f819f09805f2f9a0Dav Glass