Makefile revision 4496171313bed39e96f21bc2f9faf2868e267ae3
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# CDDL HEADER START
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# The contents of this file are subject to the terms of the
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Common Development and Distribution License (the "License").
4496171313bed39e96f21bc2f9faf2868e267ae3girish# You may not use this file except in compliance with the License.
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4496171313bed39e96f21bc2f9faf2868e267ae3girish# or http://www.opensolaris.org/os/licensing.
4496171313bed39e96f21bc2f9faf2868e267ae3girish# See the License for the specific language governing permissions
4496171313bed39e96f21bc2f9faf2868e267ae3girish# and limitations under the License.
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# When distributing Covered Code, include this CDDL HEADER in each
4496171313bed39e96f21bc2f9faf2868e267ae3girish# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4496171313bed39e96f21bc2f9faf2868e267ae3girish# If applicable, add the following below this CDDL HEADER, with the
4496171313bed39e96f21bc2f9faf2868e267ae3girish# fields enclosed by brackets "[]" replaced with your own identifying
4496171313bed39e96f21bc2f9faf2868e267ae3girish# information: Portions Copyright [yyyy] [name of copyright owner]
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# CDDL HEADER END
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# uts/sun4v/nxge/Makefile
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Use is subject to license terms.
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# ident "%Z%%M% %I% %E% SMI"
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# This makefile drives the production of the N2 NIU
4496171313bed39e96f21bc2f9faf2868e267ae3girish# 10G Ethernet leaf driver kernel module.
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# sun4v implementation architecture dependent
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Path to the base of the uts directory tree (usually /usr/src/uts).
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girishUTSBASE = ../..
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Define the module and object file sets.
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girishMODULE = nxge
4496171313bed39e96f21bc2f9faf2868e267ae3girishOBJECTS = $(NXGE_OBJS:%=$(OBJS_DIR)/%) $(NXGE_NPI_OBJS:%=$(OBJS_DIR)/%)
4496171313bed39e96f21bc2f9faf2868e267ae3girishLINTS = $(NXGE_OBJS:%.o=$(LINTS_DIR)/%.ln) \
4496171313bed39e96f21bc2f9faf2868e267ae3girish $(NXGE_NPI_OBJS:%.o=$(LINTS_DIR)/%.ln)
4496171313bed39e96f21bc2f9faf2868e267ae3girishROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE)
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Include common rules.
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girishinclude $(UTSBASE)/sun4v/Makefile.sun4v
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Override defaults to build a unique, local modstubs.o.
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girishMODSTUBS_DIR = $(OBJS_DIR)
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girishCLEANFILES += $(MODSTUBS_O)
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Define targets
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girishALL_TARGET = $(BINARY)
4496171313bed39e96f21bc2f9faf2868e267ae3girishLINT_TARGET = $(MODULE).lint
4496171313bed39e96f21bc2f9faf2868e267ae3girishINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Turn on doubleword alignment for 64 bit registers
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girishCFLAGS += -dalign
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Include nxge specific header files
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girishINC_PATH += -I$(UTSBASE)/sun4v/io/nxge/npi
4496171313bed39e96f21bc2f9faf2868e267ae3girishINC_PATH += -I$(UTSBASE)/sun4v/sys/nxge
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# lint pass one enforcement
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girishCFLAGS += -DSOLARIS
4496171313bed39e96f21bc2f9faf2868e267ae3girish# NEMO
4496171313bed39e96f21bc2f9faf2868e267ae3girish#CFLAGS += -DNEMO
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Enable the following flags to run mac internal loopback under legion
4496171313bed39e96f21bc2f9faf2868e267ae3girish#CFLAGS += -DLEGION -DAXIS -DAXIS_DEBUG -DAXIS_DEBUG_LB -DSAM_DEBUG
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Enable the following flags to run mac internal loopback under AXIS
4496171313bed39e96f21bc2f9faf2868e267ae3girish# (NOTE: LEGION flag can be enabled too)
4496171313bed39e96f21bc2f9faf2868e267ae3girish#CFLAGS += -DAXIS_DEBUG -DAXIS -DAXIS_DEBUG_LB -DSAM_DEBUG -DLEGION
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Enable NXGE debug
4496171313bed39e96f21bc2f9faf2868e267ae3girish#CFLAGS += -DNXGE_DEBUG
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Enable NPI debug
4496171313bed39e96f21bc2f9faf2868e267ae3girish#CFLAGS += -DNPI_DEBUG
4496171313bed39e96f21bc2f9faf2868e267ae3girish#CFLAGS += -DUSE_RX_BUFF_ATTR
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girish#CFLAGS += -DNIU_PA_WORKAROUND
4496171313bed39e96f21bc2f9faf2868e267ae3girish#CFLAGS += -DNIU_HV_WORKAROUND
4496171313bed39e96f21bc2f9faf2868e267ae3girishCFLAGS += -DNIU_LP_WORKAROUND
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girishLINTFLAGS += -DSOLARIS
4496171313bed39e96f21bc2f9faf2868e267ae3girishLINTFLAGS += -DNIU_LP_WORKAROUND
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# STREAMS, DDI API limitations and other ON header file definitions such as ethernet.h
4496171313bed39e96f21bc2f9faf2868e267ae3girish# force us to turn off these lint checks.
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girishLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
4496171313bed39e96f21bc2f9faf2868e267ae3girishLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Driver depends on mac & IP
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girishLDFLAGS += -dy -N misc/mac -N drv/ip
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Default build targets.
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish.KEEP_STATE:
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girishdef: $(DEF_DEPS)
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girishall: $(ALL_DEPS)
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girishclean: $(CLEAN_DEPS)
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girishclobber: $(CLOBBER_DEPS)
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girishlint: $(LINT_DEPS)
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girishmodlintlib: $(MODLINTLIB_DEPS)
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girishclean.lint: $(CLEAN_LINT_DEPS)
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girishinstall: $(INSTALL_DEPS)
4496171313bed39e96f21bc2f9faf2868e267ae3girish
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girish# Include common targets.
4496171313bed39e96f21bc2f9faf2868e267ae3girish#
4496171313bed39e96f21bc2f9faf2868e267ae3girishinclude $(UTSBASE)/$(PLATFORM)/Makefile.targ