5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
297be3708069ef31814d6d75c0d71a50a78feb03Mark Andrews# CDDL HEADER START
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The contents of this file are subject to the terms of the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Common Development and Distribution License (the "License").
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You may not use this file except in compliance with the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# or http://www.opensolaris.org/os/licensing.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# See the License for the specific language governing permissions
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# and limitations under the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# information: Portions Copyright [yyyy] [name of copyright owner]
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER END
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Use is subject to license terms.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Copyright (c) 2011 Bayard G. Bell. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
2a31bd531072824ef252c18303859d6af7451b00Francis Dupont# This makefile drives the production of the emlxs driver kernel module.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Path to the base of the uts directory tree (usually /usr/src/uts).
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsUTSBASE = ../../
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMMON_BASE = ../../../common
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Define the module and object file sets.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsMODULE = emlxs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsOBJECTS = $(EMLXS_OBJS:%=$(OBJS_DIR)/%)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLINTS = $(EMLXS_OBJS:%.o=$(LINTS_DIR)/%.ln)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCONF_SRCDIR = $(UTSBASE)/common/io/fibre-channel/fca/emlxs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Include common rules.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsARCHDIR = sparc
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../Makefile.$(ARCHDIR)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Define targets
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsALL_TARGET = $(BINARY) $(SRC_CONFILE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLINT_TARGET = $(MODULE).lint
ab8729140b1ad688ab03e1e9ce438fb1cbb49222Automatic UpdaterINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEMLXS_FLAGS = -DEMLXS_SPARC
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEMLXS_FLAGS += -DS11
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEMLXS_FLAGS += -DVERSION=\"11\"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEMLXS_FLAGS += -DMACH=\"$(MACH)\"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEMLXS_CFLAGS = $(EMLXS_FLAGS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsEMLXS_LFLAGS = $(EMLXS_FLAGS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCFLAGS += $(EMLXS_CFLAGS) -DEMLXS_ARCH=\"64\"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLINTTAGS += $(EMLXS_LFLAGS) -DEMLXS_ARCH=\"64\"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Overrides and depends_on
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsINC_PATH += -I$(ROOT)/usr/include
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsINC_PATH += -I$(UTSBASE)/common/sys
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsINC_PATH += -I$(COMMON_BASE)/bignum
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/fca
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/fca/emlxs
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/impl
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/ulp
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLDFLAGS += -dy -Nmisc/md5 -Nmisc/sha1
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLDFLAGS += -Nmisc/bignum -Nmisc/fctl
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# For now, disable these lint checks; maintainers should endeavor
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# to investigate and remove these for maximum lint coverage.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLINTTAGS += -erroff=E_STATIC_UNUSED
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLINTTAGS += -erroff=E_INCONS_VAL_TYPE_DECL2
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCERRWARN += -_gcc=-Wno-parentheses
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCERRWARN += -_gcc=-Wno-unused-label
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCERRWARN += -_gcc=-Wno-uninitialized
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Default build targets.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews.KEEP_STATE:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsdef: $(DEF_DEPS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsall: $(ALL_DEPS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsclean: $(CLEAN_DEPS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsclobber: $(CLOBBER_DEPS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewslint: $(LINT_DEPS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsmodlintlib: $(MODLINTLIB_DEPS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsclean.lint: $(CLEAN_LINT_DEPS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinstall: $(INSTALL_DEPS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Include common targets.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../Makefile.targ
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews