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# 2344961713Sgirish# Copyright 2006 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 3044961713Sgirish# 10G 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 4444961713SgirishOBJECTS = $(NXGE_OBJS:%=$(OBJS_DIR)/%) $(NXGE_NPI_OBJS:%=$(OBJS_DIR)/%) 4544961713SgirishLINTS = $(NXGE_OBJS:%.o=$(LINTS_DIR)/%.ln) \ 4644961713Sgirish $(NXGE_NPI_OBJS:%.o=$(LINTS_DIR)/%.ln) 4744961713SgirishROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE) 4844961713Sgirish 4944961713Sgirish# 5044961713Sgirish# Include common rules. 5144961713Sgirish# 5244961713Sgirishinclude $(UTSBASE)/sun4v/Makefile.sun4v 5344961713Sgirish 5444961713Sgirish# 5544961713Sgirish# Override defaults to build a unique, local modstubs.o. 5644961713Sgirish# 5744961713SgirishMODSTUBS_DIR = $(OBJS_DIR) 5844961713Sgirish 5944961713SgirishCLEANFILES += $(MODSTUBS_O) 6044961713Sgirish 6144961713Sgirish# 6244961713Sgirish# Define targets 6344961713Sgirish# 6444961713SgirishALL_TARGET = $(BINARY) 6544961713SgirishLINT_TARGET = $(MODULE).lint 6644961713SgirishINSTALL_TARGET = $(BINARY) $(ROOTMODULE) 6744961713Sgirish 6844961713Sgirish# 6944961713Sgirish# 7044961713Sgirish# Turn on doubleword alignment for 64 bit registers 7144961713Sgirish# 7244961713SgirishCFLAGS += -dalign 7344961713Sgirish# 7444961713Sgirish# Include nxge specific header files 7544961713Sgirish# 7644961713SgirishINC_PATH += -I$(UTSBASE)/sun4v/io/nxge/npi 7744961713SgirishINC_PATH += -I$(UTSBASE)/sun4v/sys/nxge 7844961713Sgirish# 7944961713Sgirish# 8044961713Sgirish# lint pass one enforcement 8144961713Sgirish# 8244961713SgirishCFLAGS += -DSOLARIS 8344961713Sgirish# NEMO 8444961713Sgirish#CFLAGS += -DNEMO 8544961713Sgirish# 8644961713Sgirish# Enable the following flags to run mac internal loopback under legion 8744961713Sgirish#CFLAGS += -DLEGION -DAXIS -DAXIS_DEBUG -DAXIS_DEBUG_LB -DSAM_DEBUG 8844961713Sgirish# 8944961713Sgirish# Enable the following flags to run mac internal loopback under AXIS 9044961713Sgirish# (NOTE: LEGION flag can be enabled too) 9144961713Sgirish#CFLAGS += -DAXIS_DEBUG -DAXIS -DAXIS_DEBUG_LB -DSAM_DEBUG -DLEGION 9244961713Sgirish# 9344961713Sgirish# Enable NXGE debug 9444961713Sgirish#CFLAGS += -DNXGE_DEBUG 9544961713Sgirish# Enable NPI debug 9644961713Sgirish#CFLAGS += -DNPI_DEBUG 97*14ea4bb7Ssd77468#CFLAGS += -DNXGE_FM 9844961713Sgirish#CFLAGS += -DUSE_RX_BUFF_ATTR 9944961713Sgirish 10044961713Sgirish#CFLAGS += -DNIU_PA_WORKAROUND 10144961713Sgirish#CFLAGS += -DNIU_HV_WORKAROUND 10244961713SgirishCFLAGS += -DNIU_LP_WORKAROUND 10344961713Sgirish 10444961713SgirishLINTFLAGS += -DSOLARIS 105*14ea4bb7Ssd77468LINTFLAGS += -DNXGE_FM 10644961713SgirishLINTFLAGS += -DNIU_LP_WORKAROUND 10744961713Sgirish# 10844961713Sgirish# STREAMS, DDI API limitations and other ON header file definitions such as ethernet.h 10944961713Sgirish# force us to turn off these lint checks. 11044961713Sgirish# 11144961713SgirishLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 11244961713SgirishLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW 11344961713Sgirish# 11444961713Sgirish# Driver depends on mac & IP 11544961713Sgirish# 11644961713SgirishLDFLAGS += -dy -N misc/mac -N drv/ip 11744961713Sgirish 11844961713Sgirish# 11944961713Sgirish# Default build targets. 12044961713Sgirish# 12144961713Sgirish.KEEP_STATE: 12244961713Sgirish 12344961713Sgirishdef: $(DEF_DEPS) 12444961713Sgirish 12544961713Sgirishall: $(ALL_DEPS) 12644961713Sgirish 12744961713Sgirishclean: $(CLEAN_DEPS) 12844961713Sgirish 12944961713Sgirishclobber: $(CLOBBER_DEPS) 13044961713Sgirish 13144961713Sgirishlint: $(LINT_DEPS) 13244961713Sgirish 13344961713Sgirishmodlintlib: $(MODLINTLIB_DEPS) 13444961713Sgirish 13544961713Sgirishclean.lint: $(CLEAN_LINT_DEPS) 13644961713Sgirish 13744961713Sgirishinstall: $(INSTALL_DEPS) 13844961713Sgirish 13944961713Sgirish# 14044961713Sgirish# Include common targets. 14144961713Sgirish# 14244961713Sgirishinclude $(UTSBASE)/$(PLATFORM)/Makefile.targ 143