dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# CDDL HEADER START
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# The contents of this file are subject to the terms of the
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# Common Development and Distribution License (the "License").
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# You may not use this file except in compliance with the License.
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# or http://www.opensolaris.org/os/licensing.
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# See the License for the specific language governing permissions
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# and limitations under the License.
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# When distributing Covered Code, include this CDDL HEADER in each
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# If applicable, add the following below this CDDL HEADER, with the
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# fields enclosed by brackets "[]" replaced with your own identifying
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# information: Portions Copyright [yyyy] [name of copyright owner]
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# CDDL HEADER END
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# Use is subject to license terms.
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# Path to the base of the uts directory tree (usually /usr/src/uts).
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh MisraUTSBASE = ../..
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# Define the module and object file sets.
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh MisraMODULE = bfe
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh MisraOBJECTS = $(BFE_OBJS:%=$(OBJS_DIR)/%)
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh MisraLINTS = $(BFE_OBJS:%.o=$(LINTS_DIR)/%.ln)
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh MisraROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# Include common rules.
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misrainclude $(UTSBASE)/intel/Makefile.intel
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# Define targets
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh MisraALL_TARGET = $(BINARY)
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh MisraLINT_TARGET = $(MODULE).lint
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh MisraINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# GENERAL PURPOUSE GEM FLAGS: Tuning GEM for Solaris specific modes
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh MisraVFLAGS = -DVERSION='"2.6.1"'
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh MisraAFLAGS = -Di86pc
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh MisraDFLAGS = -D"__INLINE__="
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh MisraCFGFLAGS = -DGEM_CONFIG_POLLING -DGEM_CONFIG_GLDv3 -DGEM_CONFIG_VLAN \
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra -DGEM_CONFIG_CKSUM_OFFLOAD -DGEM_CONFIG_ND \
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra -DCONFIG_DP83815 -DCONFIG_SIS900 -DCONFIG_SIS7016 \
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra -DCONFIG_MAC_ADDR_SIS630E -DCONFIG_OPT_IO -UCONFIG_OO \
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra -DCONFIG_PATTERN_MATCH_DP83815
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# FAST PATH SECTION: Will activate usage of inlines as a regular functions
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# on fast data path
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh MisraCPPFLAGS += $(VFLAGS) $(AFLAGS) $(DFLAGS) $(CFGFLAGS) $(CCVERBOSE) \
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra -I$(UTSBASE)/common/io/bfe
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh MisraCFLAGS += $(CPPFLAGS) -xc99=%all
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-switch
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-uninitialized
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# Driver depends on MAC & IP
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh MisraLDFLAGS += -dy -N misc/mac -N drv/ip
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# Default build targets.
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra.KEEP_STATE:
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misradef: $(DEF_DEPS)
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misraall: $(ALL_DEPS)
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misraclean: $(CLEAN_DEPS)
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misraclobber: $(CLOBBER_DEPS)
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misralint: $(LINT_DEPS)
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misramodlintlib: $(MODLINTLIB_DEPS)
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misraclean.lint: $(CLEAN_LINT_DEPS)
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misrainstall: $(INSTALL_DEPS)
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra# Include common targets.
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misra#
dd52495f0d9ba8ff6d84921ec0500be837896554Saurabh Misrainclude $(UTSBASE)/intel/Makefile.targ