Makefile revision 7ff836697c120cb94bd30d5c2204eb9b74718e4c
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# CDDL HEADER START
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# The contents of this file are subject to the terms of the
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# Common Development and Distribution License (the "License").
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# You may not use this file except in compliance with the License.
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# or http://www.opensolaris.org/os/licensing.
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# See the License for the specific language governing permissions
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# and limitations under the License.
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# When distributing Covered Code, include this CDDL HEADER in each
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# If applicable, add the following below this CDDL HEADER, with the
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# fields enclosed by brackets "[]" replaced with your own identifying
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# information: Portions Copyright [yyyy] [name of copyright owner]
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# CDDL HEADER END
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# Use is subject to license terms.
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# This makefile drives the production of the fcoei driver for
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# LEADVILLE.
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# Path to the base of the uts directory tree (usually /usr/src/uts).
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong WangUTSBASE = ../..
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong WangARCHDIR:sh = cd ..; basename `pwd`
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# Define the module and object file sets.
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong WangMODULE = fcoei
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong WangOBJECTS = $(FCOEI_OBJS:%=$(OBJS_DIR)/%)
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong WangLINTS = $(FCOEI_OBJS:%.o=$(LINTS_DIR)/%.ln)
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong WangROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong WangCONF_SRCDIR = $(UTSBASE)/common/io/fibre-channel/fca/fcoei
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# Include common rules.
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wanginclude ../Makefile.$(ARCHDIR)
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# Define targets
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong WangALL_TARGET = $(BINARY) $(SRC_CONFILE)
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong WangLINT_TARGET = $(MODULE).lint
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong WangINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# Overrides and depends_on
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong WangLDFLAGS += -dy -Nmisc/fctl -Ndrv/fcoe
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong WangINC_PATH += -I$(UTSBASE)/common/io/fibre-channel/fca/fcoei
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# Default build targets.
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang.KEEP_STATE:
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wangdef: $(DEF_DEPS)
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wangall: $(ALL_DEPS)
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wangclean: $(CLEAN_DEPS)
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wangclobber: $(CLOBBER_DEPS)
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wanglint: $(LINT_DEPS)
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wangmodlintlib: $(MODLINTLIB_DEPS)
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wangclean.lint: $(CLEAN_LINT_DEPS)
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wanginstall: $(INSTALL_DEPS)
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang# Include common targets.
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wang#
7ff836697c120cb94bd30d5c2204eb9b74718e4cZhong Wanginclude ../Makefile.targ