xref: /titanic_41/usr/src/uts/sun4v/nxge/Makefile (revision 678453a8ed49104d8adad58f3ba591bdc39883e8)
144961713Sgirish#
244961713Sgirish# CDDL HEADER START
344961713Sgirish#
444961713Sgirish# The contents of this file are subject to the terms of the
544961713Sgirish# Common Development and Distribution License (the "License").
644961713Sgirish# You may not use this file except in compliance with the License.
744961713Sgirish#
844961713Sgirish# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
944961713Sgirish# or http://www.opensolaris.org/os/licensing.
1044961713Sgirish# See the License for the specific language governing permissions
1144961713Sgirish# and limitations under the License.
1244961713Sgirish#
1344961713Sgirish# When distributing Covered Code, include this CDDL HEADER in each
1444961713Sgirish# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1544961713Sgirish# If applicable, add the following below this CDDL HEADER, with the
1644961713Sgirish# fields enclosed by brackets "[]" replaced with your own identifying
1744961713Sgirish# information: Portions Copyright [yyyy] [name of copyright owner]
1844961713Sgirish#
1944961713Sgirish# CDDL HEADER END
2044961713Sgirish#
2144961713Sgirish# uts/sun4v/nxge/Makefile
2244961713Sgirish#
23*678453a8Sspeer# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
2444961713Sgirish# Use is subject to license terms.
2544961713Sgirish#
2644961713Sgirish#
2744961713Sgirish# ident	"%Z%%M%	%I%	%E% SMI"
2844961713Sgirish#
2944961713Sgirish#	This makefile drives the production of the N2 NIU
306f45ec7bSml29623#	10G and SUN 10G/1G Ethernet leaf driver kernel module.
3144961713Sgirish#
3244961713Sgirish#	sun4v implementation architecture dependent
3344961713Sgirish#
3444961713Sgirish
3544961713Sgirish#
3644961713Sgirish#	Path to the base of the uts directory tree (usually /usr/src/uts).
3744961713Sgirish#
3844961713SgirishUTSBASE	= ../..
3944961713Sgirish
4044961713Sgirish#
4144961713Sgirish#	Define the module and object file sets.
4244961713Sgirish#
4344961713SgirishMODULE		= nxge
446f45ec7bSml29623NXGE_OBJECTS =	$(NXGE_OBJS) $(NXGE_NPI_OBJS) $(NXGE_HCALL_OBJS)
456f45ec7bSml29623OBJECTS		=  $(NXGE_OBJECTS:%=$(OBJS_DIR)/%)
466f45ec7bSml29623LINTS		= $(NXGE_OBJECTS:%.o=$(LINTS_DIR)/%.ln)
4744961713SgirishROOTMODULE	= $(ROOT_PSM_DRV_DIR)/$(MODULE)
486f45ec7bSml29623CONF_SRCDIR	= $(UTSBASE)/common/io/nxge
4944961713Sgirish
5044961713Sgirish#
5144961713Sgirish#	Include common rules.
5244961713Sgirish#
5344961713Sgirishinclude $(UTSBASE)/sun4v/Makefile.sun4v
5444961713Sgirish
5544961713Sgirish#
5644961713Sgirish#	Override defaults to build a unique, local modstubs.o.
5744961713Sgirish#
5844961713SgirishMODSTUBS_DIR	= $(OBJS_DIR)
5944961713Sgirish
6044961713SgirishCLEANFILES	+= $(MODSTUBS_O)
6144961713Sgirish
6244961713Sgirish#
6344961713Sgirish#	Define targets
6444961713Sgirish#
6544961713SgirishALL_TARGET	= $(BINARY)
6644961713SgirishLINT_TARGET	= $(MODULE).lint
676f45ec7bSml29623INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
6844961713Sgirish
6944961713Sgirish#
7044961713Sgirish#
7144961713Sgirish# Turn on doubleword alignment for 64 bit registers
7244961713Sgirish#
7344961713SgirishCFLAGS	+= -dalign
7444961713Sgirish#
7544961713Sgirish# Include nxge specific header files
7644961713Sgirish#
776f45ec7bSml29623INC_PATH	+= -I$(UTSBASE)/common/io/nxge/npi
786f45ec7bSml29623INC_PATH	+= -I$(UTSBASE)/common/sys/nxge
79*678453a8SspeerINC_PATH	+= -I$(UTSBASE)/sun4v
8044961713Sgirish#
8144961713Sgirish#
8244961713Sgirish# lint pass one enforcement
8344961713Sgirish#
8444961713SgirishCFLAGS += -DSOLARIS
8544961713Sgirish# NEMO
8644961713Sgirish#CFLAGS += -DNEMO
8744961713Sgirish#
8844961713Sgirish# Enable the following flags to run mac internal loopback under legion
8944961713Sgirish#CFLAGS += -DLEGION -DAXIS -DAXIS_DEBUG -DAXIS_DEBUG_LB -DSAM_DEBUG
9044961713Sgirish#
9144961713Sgirish# Enable the following flags to run mac internal loopback under AXIS
9244961713Sgirish# (NOTE: LEGION flag can be enabled too)
9344961713Sgirish#CFLAGS += -DAXIS_DEBUG -DAXIS -DAXIS_DEBUG_LB -DSAM_DEBUG -DLEGION
9444961713Sgirish#
9544961713Sgirish# Enable NXGE debug
9644961713Sgirish#CFLAGS += -DNXGE_DEBUG
9744961713Sgirish# Enable NPI debug
9844961713Sgirish#CFLAGS += -DNPI_DEBUG
9914ea4bb7Ssd77468#CFLAGS += -DNXGE_FM
10044961713Sgirish#CFLAGS += -DUSE_RX_BUFF_ATTR
10144961713Sgirish
10244961713Sgirish#CFLAGS += -DNIU_PA_WORKAROUND
10344961713Sgirish#CFLAGS += -DNIU_HV_WORKAROUND
10444961713SgirishCFLAGS += -DNIU_LP_WORKAROUND
10544961713Sgirish
10644961713SgirishLINTFLAGS += -DSOLARIS
10714ea4bb7Ssd77468LINTFLAGS += -DNXGE_FM
10844961713SgirishLINTFLAGS += -DNIU_LP_WORKAROUND
10944961713Sgirish#
11044961713Sgirish# STREAMS, DDI API limitations and other ON header file definitions such as ethernet.h
11144961713Sgirish# force us to turn off these lint checks.
11244961713Sgirish#
11344961713SgirishLINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
11444961713SgirishLINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
11544961713Sgirish#
11644961713Sgirish#	Driver depends on mac & IP
11744961713Sgirish#
11844961713SgirishLDFLAGS		+= -dy -N misc/mac -N drv/ip
11944961713Sgirish
12044961713Sgirish#
12144961713Sgirish#	Default build targets.
12244961713Sgirish#
12344961713Sgirish.KEEP_STATE:
12444961713Sgirish
12544961713Sgirishdef:		$(DEF_DEPS)
12644961713Sgirish
12744961713Sgirishall:		$(ALL_DEPS)
12844961713Sgirish
12944961713Sgirishclean:		$(CLEAN_DEPS)
13044961713Sgirish
13144961713Sgirishclobber:	$(CLOBBER_DEPS)
13244961713Sgirish
13344961713Sgirishlint:		$(LINT_DEPS)
13444961713Sgirish
13544961713Sgirishmodlintlib:	$(MODLINTLIB_DEPS)
13644961713Sgirish
13744961713Sgirishclean.lint:	$(CLEAN_LINT_DEPS)
13844961713Sgirish
13944961713Sgirishinstall:	$(INSTALL_DEPS)
14044961713Sgirish
14144961713Sgirish#
14244961713Sgirish#	Include common targets.
14344961713Sgirish#
1446f45ec7bSml29623include $(UTSBASE)/sun4v/Makefile.targ
145