Makefile revision adfcba552dfc70ff685a2e8703fe1761b244f3e8
98e1584b29f1a2323dfa98b88270c57354cd13dbTinderbox User#
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# CDDL HEADER START
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson#
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# The contents of this file are subject to the terms of the
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# Common Development and Distribution License (the "License").
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# You may not use this file except in compliance with the License.
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson#
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
230f8da57ce436687289c928c209a5b90979dbbaMark Andrews# or http://www.opensolaris.org/os/licensing.
230f8da57ce436687289c928c209a5b90979dbbaMark Andrews# See the License for the specific language governing permissions
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# and limitations under the License.
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson#
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# When distributing Covered Code, include this CDDL HEADER in each
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# If applicable, add the following below this CDDL HEADER, with the
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# fields enclosed by brackets "[]" replaced with your own identifying
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# information: Portions Copyright [yyyy] [name of copyright owner]
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson#
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# CDDL HEADER END
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson#
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# uts/i86pc/nxge/Makefile
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson#
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# Use is subject to license terms.
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson#
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson#
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# ident "%Z%%M% %I% %E% SMI"
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson#
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# This makefile drives the production of the Sun NIU
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson# 10G/1G Ethernet leaf driver kernel module.
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson#
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson#
c3a56b9ab3f7ddf433a9d22b6a4e9db42155be4bAndreas Gustafsson# Path to the base of the uts directory tree (usually /usr/src/uts).
c3a56b9ab3f7ddf433a9d22b6a4e9db42155be4bAndreas Gustafsson#
c3a56b9ab3f7ddf433a9d22b6a4e9db42155be4bAndreas GustafssonUTSBASE = ../..
c3a56b9ab3f7ddf433a9d22b6a4e9db42155be4bAndreas Gustafsson
230f8da57ce436687289c928c209a5b90979dbbaMark Andrews#
230f8da57ce436687289c928c209a5b90979dbbaMark Andrews# Define the module and object file sets.
230f8da57ce436687289c928c209a5b90979dbbaMark Andrews#
230f8da57ce436687289c928c209a5b90979dbbaMark AndrewsMODULE = nxge
230f8da57ce436687289c928c209a5b90979dbbaMark AndrewsNXGE_OBJECTS = $(NXGE_OBJS) $(NXGE_NPI_OBJS)
230f8da57ce436687289c928c209a5b90979dbbaMark AndrewsOBJECTS = $(NXGE_OBJECTS:%=$(OBJS_DIR)/%)
230f8da57ce436687289c928c209a5b90979dbbaMark AndrewsLINTS = $(NXGE_OBJECTS:%.o=$(LINTS_DIR)/%.ln)
230f8da57ce436687289c928c209a5b90979dbbaMark AndrewsROOTMODULE = $(ROOT_PSM_DRV_DIR)/$(MODULE)
230f8da57ce436687289c928c209a5b90979dbbaMark AndrewsCONF_SRCDIR = $(UTSBASE)/common/io/nxge
230f8da57ce436687289c928c209a5b90979dbbaMark Andrews
364162f4ae54b4c3a7602cec9add2aa9b3a89ad2Mark Andrews#
b2b408e4ed56c94e49a4bd3202df546de00b15b0Mark Andrews# Include common rules.
b2b408e4ed56c94e49a4bd3202df546de00b15b0Mark Andrews#
b2b408e4ed56c94e49a4bd3202df546de00b15b0Mark Andrewsinclude $(UTSBASE)/i86pc/Makefile.i86pc
b2b408e4ed56c94e49a4bd3202df546de00b15b0Mark Andrews
b2b408e4ed56c94e49a4bd3202df546de00b15b0Mark Andrews#
b2b408e4ed56c94e49a4bd3202df546de00b15b0Mark Andrews# Override defaults to build a unique, local modstubs.o.
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#
090ba6ff300ccb980e3adfa24f69251efe9db85dMark AndrewsMODSTUBS_DIR = $(OBJS_DIR)
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews
090ba6ff300ccb980e3adfa24f69251efe9db85dMark AndrewsCLEANFILES += $(MODSTUBS_O)
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews# Define targets
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#
090ba6ff300ccb980e3adfa24f69251efe9db85dMark AndrewsALL_TARGET = $(BINARY)
090ba6ff300ccb980e3adfa24f69251efe9db85dMark AndrewsLINT_TARGET = $(MODULE).lint
090ba6ff300ccb980e3adfa24f69251efe9db85dMark AndrewsINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews# Turn on doubleword alignment for 64 bit registers
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#
090ba6ff300ccb980e3adfa24f69251efe9db85dMark AndrewsCFLAGS += -dalign
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews# Include nxge specific header files
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#
090ba6ff300ccb980e3adfa24f69251efe9db85dMark AndrewsINC_PATH += -I$(UTSBASE)/common
090ba6ff300ccb980e3adfa24f69251efe9db85dMark AndrewsINC_PATH += -I$(UTSBASE)/common/io/nxge/npi
090ba6ff300ccb980e3adfa24f69251efe9db85dMark AndrewsINC_PATH += -I$(UTSBASE)/common/sys/nxge
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews# lint pass one enforcement
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#
090ba6ff300ccb980e3adfa24f69251efe9db85dMark AndrewsCFLAGS += -DSOLARIS
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#ALL_BUILDS = $(ALL_BUILDS64)
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#DEF_BUILDS = $(DEF_BUILDS64)
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#CLEANLINTFILES += $(LINT64_FILES)
230f8da57ce436687289c928c209a5b90979dbbaMark Andrews#
230f8da57ce436687289c928c209a5b90979dbbaMark AndrewsLINTFLAGS += -DSOLARIS
c3a56b9ab3f7ddf433a9d22b6a4e9db42155be4bAndreas Gustafsson#
b2b408e4ed56c94e49a4bd3202df546de00b15b0Mark Andrews# STREAMS, DDI API limitations and other ON header file definitions such as ethernet.h
230f8da57ce436687289c928c209a5b90979dbbaMark Andrews# force us to turn off these lint checks.
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews#
090ba6ff300ccb980e3adfa24f69251efe9db85dMark AndrewsLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
090ba6ff300ccb980e3adfa24f69251efe9db85dMark AndrewsLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
090ba6ff300ccb980e3adfa24f69251efe9db85dMark AndrewsLINTTAGS += -erroff=E_FALSE_LOGICAL_EXPR
b2b408e4ed56c94e49a4bd3202df546de00b15b0Mark Andrews#
230f8da57ce436687289c928c209a5b90979dbbaMark Andrews# Driver depends on mac & IP
b2b408e4ed56c94e49a4bd3202df546de00b15b0Mark Andrews#
b2b408e4ed56c94e49a4bd3202df546de00b15b0Mark AndrewsLDFLAGS += -dy -N misc/mac -N drv/ip
b2b408e4ed56c94e49a4bd3202df546de00b15b0Mark Andrews
b2b408e4ed56c94e49a4bd3202df546de00b15b0Mark Andrews#
b2b408e4ed56c94e49a4bd3202df546de00b15b0Mark Andrews# Default build targets.
b2b408e4ed56c94e49a4bd3202df546de00b15b0Mark Andrews#
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson.KEEP_STATE:
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafssondef: $(DEF_DEPS)
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrewsall: $(ALL_DEPS)
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafssonclean: $(CLEAN_DEPS)
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafssonclobber: $(CLOBBER_DEPS)
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrewslint: $(LINT_DEPS)
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrewsmodlintlib: $(MODLINTLIB_DEPS)
6211baaa66d7cac28a21b6426681e597ff04ca9eAndreas Gustafsson
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrewsclean.lint: $(CLEAN_LINT_DEPS)
090ba6ff300ccb980e3adfa24f69251efe9db85dMark Andrews
c3a56b9ab3f7ddf433a9d22b6a4e9db42155be4bAndreas Gustafssoninstall: $(INSTALL_DEPS)
c3a56b9ab3f7ddf433a9d22b6a4e9db42155be4bAndreas Gustafsson
230f8da57ce436687289c928c209a5b90979dbbaMark Andrews#
230f8da57ce436687289c928c209a5b90979dbbaMark Andrews# Include common targets.
230f8da57ce436687289c928c209a5b90979dbbaMark Andrews#
230f8da57ce436687289c928c209a5b90979dbbaMark Andrewsinclude $(UTSBASE)/i86pc/Makefile.targ
230f8da57ce436687289c928c209a5b90979dbbaMark Andrews