b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# CDDL HEADER START
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# The contents of this file are subject to the terms of the
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# Common Development and Distribution License (the "License").
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# You may not use this file except in compliance with the License.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# or http://www.opensolaris.org/os/licensing.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# See the License for the specific language governing permissions
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# and limitations under the License.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# When distributing Covered Code, include this CDDL HEADER in each
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# If applicable, add the following below this CDDL HEADER, with the
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# fields enclosed by brackets "[]" replaced with your own identifying
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# information: Portions Copyright [yyyy] [name of copyright owner]
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# CDDL HEADER END
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# Use is subject to license terms.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek# This makefile drives the production of the Broadcom BCM5704
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek# Gigabit Ethernet (BGE) driver module in sun4v systems
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# Path to the base of the uts directory tree (usually /usr/src/uts).
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranUTSBASE = ../..
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# Define the module and object file sets.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranMODULE = bge
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranOBJECTS = $(BGE_OBJS:%=$(OBJS_DIR)/%)
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranLINTS = $(LINTS_DIR)/bge_lint.ln
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE)
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranCONF_SRCDIR = $(UTSBASE)/common/io/bge
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# Include common rules.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoraninclude $(UTSBASE)/sun4v/Makefile.sun4v
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# Define targets
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranALL_TARGET = $(BINARY)
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranLINT_TARGET = $(MODULE).lint
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# lint pass one enforcement
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranCFLAGS += $(CCVERBOSE)
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# Turn on doubleword alignment for 64 bit registers
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCFLAGS += -dalign
7b1019a6d29ccb7999dc76cba3dde1c627e8e609Jerry Jelinek
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe#
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe# Driver depends on MAC & IP
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranLDFLAGS += -dy -N misc/mac -N drv/ip
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# For now, disable these lint checks; maintainers should endeavor
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# to investigate and remove these for maximum lint coverage.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# Please do not carry these forward to new Makefiles.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranCERRWARN += -_gcc=-Wno-uninitialized
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranCERRWARN += -_gcc=-Wno-switch
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranCERRWARN += -_gcc=-Wno-parentheses
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranCERRWARN += -_gcc=-Wno-unused-variable
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael CorcoranCERRWARN += -_gcc=-Wno-unused-function
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran# Default build targets.
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran#
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran.KEEP_STATE:
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcorandef: $(DEF_DEPS)
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoranall: $(ALL_DEPS)
b72d5b75fd6f5bb08d29f65652d60058fc3a2608Michael Corcoran
clean: $(CLEAN_DEPS)
clobber: $(CLOBBER_DEPS)
lint: $(LINT_DEPS)
modlintlib: $(MODLINTLIB_DEPS)
clean.lint: $(CLEAN_LINT_DEPS)
install: $(INSTALL_DEPS)
#
# Include common targets.
#
include $(UTSBASE)/sun4v/Makefile.targ