Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
1N/A#
1N/A# CDDL HEADER START
1N/A#
1N/A# The contents of this file are subject to the terms of the
1N/A# Common Development and Distribution License (the "License").
1N/A# You may not use this file except in compliance with the License.
1N/A#
1N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1N/A# or http://www.opensolaris.org/os/licensing.
1N/A# See the License for the specific language governing permissions
1N/A# and limitations under the License.
1N/A#
1N/A# When distributing Covered Code, include this CDDL HEADER in each
1N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1N/A# If applicable, add the following below this CDDL HEADER, with the
1N/A# fields enclosed by brackets "[]" replaced with your own identifying
1N/A# information: Portions Copyright [yyyy] [name of copyright owner]
1N/A#
1N/A# CDDL HEADER END
1N/A#
1N/A# uts/sun4v/nxge/Makefile
1N/A#
1N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
1N/A# Use is subject to license terms.
1N/A#
1N/A#
1N/A#
1N/A# This makefile drives the production of the N2 NIU
1N/A# 10G and SUN 10G/1G Ethernet leaf driver kernel module.
1N/A#
1N/A# sun4v implementation architecture dependent
1N/A#
1N/A
1N/A#
1N/A# Path to the base of the uts directory tree (usually /usr/src/uts).
1N/A#
1N/AUTSBASE = ../..
1N/A
1N/A#
1N/A# Define the module and object file sets.
1N/A#
1N/AMODULE = nxge
1N/ANXGE_OBJECTS = $(NXGE_OBJS) $(NXGE_NPI_OBJS) $(NXGE_HCALL_OBJS)
1N/AOBJECTS = $(NXGE_OBJECTS:%=$(OBJS_DIR)/%)
1N/ALINTS = $(NXGE_OBJECTS:%.o=$(LINTS_DIR)/%.ln)
1N/AROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE)
1N/ACONF_SRCDIR = $(UTSBASE)/common/io/nxge
1N/A
1N/A#
1N/A# Include common rules.
1N/A#
1N/Ainclude $(UTSBASE)/sun4v/Makefile.sun4v
1N/A
1N/A#
1N/A# Override defaults to build a unique, local modstubs.o.
1N/A#
1N/AMODSTUBS_DIR = $(OBJS_DIR)
1N/A
1N/ACLEANFILES += $(MODSTUBS_O)
1N/A
1N/A#
1N/A# Define targets
1N/A#
1N/AALL_TARGET = $(BINARY)
1N/ALINT_TARGET = $(MODULE).lint
1N/AINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
1N/A
1N/A#
1N/A#
1N/A# Turn on doubleword alignment for 64 bit registers
1N/A#
1N/ACFLAGS += -dalign
1N/A#
1N/A# Include nxge specific header files
1N/A#
INC_PATH += -I$(UTSBASE)/common/io/nxge/npi
INC_PATH += -I$(UTSBASE)/common/sys/nxge
INC_PATH += -I$(UTSBASE)/sun4v
#
#
# lint pass one enforcement
#
CFLAGS += -DSOLARIS
# NEMO
#CFLAGS += -DNEMO
#
# Enable the following flags to run mac internal loopback under legion
#CFLAGS += -DLEGION -DAXIS -DAXIS_DEBUG -DAXIS_DEBUG_LB -DSAM_DEBUG
#
# Enable the following flags to run mac internal loopback under AXIS
# (NOTE: LEGION flag can be enabled too)
#CFLAGS += -DAXIS_DEBUG -DAXIS -DAXIS_DEBUG_LB -DSAM_DEBUG -DLEGION
#
# Enable NXGE debug
#CFLAGS += -DNXGE_DEBUG
# Enable NPI debug
#CFLAGS += -DNPI_DEBUG
#CFLAGS += -DNXGE_FM
#CFLAGS += -DUSE_RX_BUFF_ATTR
#CFLAGS += -DNIU_PA_WORKAROUND
#CFLAGS += -DNIU_HV_WORKAROUND
CFLAGS += -DNIU_LP_WORKAROUND
LINTFLAGS += -DSOLARIS
LINTFLAGS += -DNXGE_FM
LINTFLAGS += -DNIU_LP_WORKAROUND
#
# STREAMS, DDI API limitations and other ON header file definitions such as ethernet.h
# force us to turn off these lint checks.
#
LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
CERRWARN += -_gcc=-Wno-unused-label
CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += -_gcc=-Wno-switch
CERRWARN += -_gcc=-Wno-uninitialized
CERRWARN += -_gcc=-Wno-type-limits
#
# Driver depends on mac & IP
#
LDFLAGS += -dy -N misc/mac -N drv/ip
#
# Default build targets.
#
.KEEP_STATE:
def: $(DEF_DEPS)
all: $(ALL_DEPS)
clean: $(CLEAN_DEPS)
clobber: $(CLOBBER_DEPS)
lint: $(LINT_DEPS)
modlintlib: $(MODLINTLIB_DEPS)
clean.lint: $(CLEAN_LINT_DEPS)
install: $(INSTALL_DEPS)
#
# Include common targets.
#
include $(UTSBASE)/sun4v/Makefile.targ