Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
e2ca2865a6870e9c6cbef6becbcc68cafde64537Sukumar Swaminathan# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Use is subject to license terms.
89b43686db1fe9681d80a7cf5662730cb9378caeBayard Bell# Copyright (c) 2011 Bayard G. Bell. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
93c20f2609342fd05f6625f16dfcb9348e7977f2Sukumar Swaminathan# This makefile drives the production of the emlxs driver kernel module.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
93c20f2609342fd05f6625f16dfcb9348e7977f2Sukumar Swaminathan# Path to the base of the uts directory tree (usually /usr/src/uts).
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteUTSBASE = ../../
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMMON_BASE = ../../../common
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Define the module and object file sets.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteMODULE = emlxs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteOBJECTS = $(EMLXS_OBJS:%=$(OBJS_DIR)/%)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLINTS = $(EMLXS_OBJS:%.o=$(LINTS_DIR)/%.ln)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCONF_SRCDIR = $(UTSBASE)/common/io/fibre-channel/fca/emlxs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Include common rules.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
e2ca2865a6870e9c6cbef6becbcc68cafde64537Sukumar SwaminathanARCHDIR = intel
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude ../Makefile.$(ARCHDIR)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Define targets
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteALL_TARGET = $(BINARY) $(SRC_CONFILE)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLINT_TARGET = $(MODULE).lint
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteEMLXS_FLAGS = -DEMLXS_I386
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteEMLXS_FLAGS += -DS11
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteEMLXS_FLAGS += -DVERSION=\"11\"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteEMLXS_FLAGS += -DMACH=\"$(MACH)\"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteEMLXS_CFLAGS = $(EMLXS_FLAGS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteEMLXS_LFLAGS = $(EMLXS_FLAGS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCFLAGS += $(EMLXS_CFLAGS) -DEMLXS_ARCH=\"$(CLASS)\"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLINTTAGS += $(EMLXS_LFLAGS) -DEMLXS_ARCH=\"$(CLASS)\"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Overrides and depends_on
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteINC_PATH += -I$(ROOT)/usr/include
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteINC_PATH += -I$(UTSBASE)/common/sys
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteINC_PATH += -I$(COMMON_BASE)/bignum
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/fca
93c20f2609342fd05f6625f16dfcb9348e7977f2Sukumar SwaminathanINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/fca/emlxs
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/impl
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/ulp
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
89b43686db1fe9681d80a7cf5662730cb9378caeBayard Bell#
89b43686db1fe9681d80a7cf5662730cb9378caeBayard Bell# misc/fctl required because #ifdef MODSYM_LOAD code
89b43686db1fe9681d80a7cf5662730cb9378caeBayard Bell# triggered by -DS11; uses DDI calls to load FCA symbols
89b43686db1fe9681d80a7cf5662730cb9378caeBayard Bell#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLDFLAGS += -dy -Nmisc/md5 -Nmisc/sha1
89b43686db1fe9681d80a7cf5662730cb9378caeBayard BellLDFLAGS += -Nmisc/bignum -Nmisc/fctl
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# For now, disable these lint checks; maintainers should endeavor
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# to investigate and remove these for maximum lint coverage.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLINTTAGS += -erroff=E_STATIC_UNUSED
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLINTTAGS += -erroff=E_INCONS_VAL_TYPE_DECL2
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-parentheses
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-unused-label
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-uninitialized
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Default build targets.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte.KEEP_STATE:
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortedef: $(DEF_DEPS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteall: $(ALL_DEPS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteclean: $(CLEAN_DEPS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteclobber: $(CLOBBER_DEPS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortelint: $(LINT_DEPS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortemodlintlib: $(MODLINTLIB_DEPS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteclean.lint: $(CLEAN_LINT_DEPS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinstall: $(INSTALL_DEPS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Include common targets.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude ../Makefile.targ