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