Makefile revision 6f45ec7b0b964c3be967c4880e8867ac1e7763a5
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# CDDL HEADER START
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# The contents of this file are subject to the terms of the
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# Common Development and Distribution License (the "License").
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# You may not use this file except in compliance with the License.
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# or http://www.opensolaris.org/os/licensing.
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# See the License for the specific language governing permissions
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# and limitations under the License.
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# When distributing Covered Code, include this CDDL HEADER in each
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# If applicable, add the following below this CDDL HEADER, with the
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# fields enclosed by brackets "[]" replaced with your own identifying
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# information: Portions Copyright [yyyy] [name of copyright owner]
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# CDDL HEADER END
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# uts/sun4u/nxge/Makefile
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# Use is subject to license terms.
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# ident "%Z%%M% %I% %E% SMI"
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# This makefile drives the production of the Sun
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# 10G/1G Ethernet leaf driver kernel module.
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# Path to the base of the uts directory tree (usually /usr/src/uts).
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlUTSBASE = ../..
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# Define the module and object file sets.
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlMODULE = nxge
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlNXGE_OBJECTS = $(NXGE_OBJS) $(NXGE_NPI_OBJS)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlOBJECTS = $(NXGE_OBJECTS:%=$(OBJS_DIR)/%)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlLINTS = $(NXGE_OBJECTS:%.o=$(LINTS_DIR)/%.ln)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlCONF_SRCDIR = $(UTSBASE)/common/io/nxge
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# Include common rules.
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlinclude $(UTSBASE)/sun4u/Makefile.sun4u
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# Override defaults to build a unique, local modstubs.o.
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlMODSTUBS_DIR = $(OBJS_DIR)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlCLEANFILES += $(MODSTUBS_O)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# Define targets
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlALL_TARGET = $(BINARY)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlLINT_TARGET = $(MODULE).lint
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# Turn on doubleword alignment for 64 bit registers
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlCFLAGS += -dalign
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# Include nxge specific header files
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlINC_PATH += -I$(UTSBASE)/common
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlINC_PATH += -I$(UTSBASE)/common/io/nxge/npi
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlINC_PATH += -I$(UTSBASE)/common/sys/nxge
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# lint pass one enforcement
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlCFLAGS += -DSOLARIS
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlLINTFLAGS += -DSOLARIS
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# STREAMS, DDI API limitations and other ON header file definitions such as ethernet.h
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# force us to turn off these lint checks.
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# Driver depends on mac & IP
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlLDFLAGS += -dy -N misc/mac -N drv/ip
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# Default build targets.
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml.KEEP_STATE:
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mldef: $(DEF_DEPS)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlall: $(ALL_DEPS)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlclean: $(CLEAN_DEPS)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlclobber: $(CLOBBER_DEPS)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mllint: $(LINT_DEPS)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlmodlintlib: $(MODLINTLIB_DEPS)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlclean.lint: $(CLEAN_LINT_DEPS)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlinstall: $(INSTALL_DEPS)
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml# Include common targets.
6f45ec7b0b964c3be967c4880e8867ac1e7763a5ml#
6f45ec7b0b964c3be967c4880e8867ac1e7763a5mlinclude $(UTSBASE)/sun4u/Makefile.targ