942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# CDDL HEADER START
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# The contents of this file are subject to the terms of the
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# Common Development and Distribution License (the "License").
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# You may not use this file except in compliance with the License.
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# or http://www.opensolaris.org/os/licensing.
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# See the License for the specific language governing permissions
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# and limitations under the License.
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# When distributing Covered Code, include this CDDL HEADER in each
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# If applicable, add the following below this CDDL HEADER, with the
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# fields enclosed by brackets "[]" replaced with your own identifying
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# information: Portions Copyright [yyyy] [name of copyright owner]
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# CDDL HEADER END
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
a74f7440e9d4ba2cf59e6cbfc445479a28170f2apl# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# Use is subject to license terms.
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# This makefile drives the production of the aac driver kernel module.
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# Sparc implementation architecture dependent
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# Path to the base of the uts directory tree (usually /usr/src/uts).
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021plUTSBASE = ../..
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# Define the module and object file sets.
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021plMODULE = aac
942c5e3c2dd127463517e5cc1694ee94ca45e021plOBJECTS = $(AAC_OBJS:%=$(OBJS_DIR)/%)
942c5e3c2dd127463517e5cc1694ee94ca45e021plLINTS = $(AAC_OBJS:%.o=$(LINTS_DIR)/%.ln)
942c5e3c2dd127463517e5cc1694ee94ca45e021plROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
942c5e3c2dd127463517e5cc1694ee94ca45e021plCONF_SRCDIR = $(UTSBASE)/common/io/aac
942c5e3c2dd127463517e5cc1694ee94ca45e021plWARLOCK_OUT = $(AAC_OBJS:%.o=%.ll)
942c5e3c2dd127463517e5cc1694ee94ca45e021plWARLOCK_OK = $(MODULE).ok
942c5e3c2dd127463517e5cc1694ee94ca45e021plWLCMD_DIR = $(UTSBASE)/common/io/warlock
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# Include common rules.
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021plinclude $(UTSBASE)/sparc/Makefile.sparc
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# Define targets
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021plALL_TARGET = $(BINARY) $(CONFMOD)
942c5e3c2dd127463517e5cc1694ee94ca45e021plLINT_TARGET = $(MODULE).lint
942c5e3c2dd127463517e5cc1694ee94ca45e021plINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# lint pass one enforcement
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021plCFLAGS += $(CCVERBOSE)
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# Kernel Module Dependencies
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021plLDFLAGS += -dy -Nmisc/scsi
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# Overrides
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-uninitialized
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-parentheses
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-unused-value
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-unused-label
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-switch
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# Default build targets.
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl.KEEP_STATE:
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pldef: $(DEF_DEPS)
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021plall: $(ALL_DEPS)
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021plclean: $(CLEAN_DEPS)
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021plclobber: $(CLOBBER_DEPS)
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pllint: $(LINT_DEPS)
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021plmodlintlib: $(MODLINTLIB_DEPS)
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021plclean.lint: $(CLEAN_LINT_DEPS)
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021plinstall: $(INSTALL_DEPS)
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# Include common targets.
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021plinclude $(UTSBASE)/sparc/Makefile.targ
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# Defines for local commands.
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021plWARLOCK = warlock
942c5e3c2dd127463517e5cc1694ee94ca45e021plWLCC = wlcc
942c5e3c2dd127463517e5cc1694ee94ca45e021plTOUCH = touch
942c5e3c2dd127463517e5cc1694ee94ca45e021plTEST = test
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021pl# lock_lint rules
942c5e3c2dd127463517e5cc1694ee94ca45e021pl#
942c5e3c2dd127463517e5cc1694ee94ca45e021plSCSI_FILES = $(SCSI_OBJS:%.o= -l $(UTSBASE)/sparc/scsi/%.ll)
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pl%.wlcmd:
942c5e3c2dd127463517e5cc1694ee94ca45e021pl cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021plwarlock: $(WARLOCK_OK)
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pl$(WARLOCK_OK): $(WARLOCK_OUT) warlock_ddi.files scsi.files aac.wlcmd
942c5e3c2dd127463517e5cc1694ee94ca45e021pl $(WARLOCK) -c $(WLCMD_DIR)/aac.wlcmd $(WARLOCK_OUT) \
942c5e3c2dd127463517e5cc1694ee94ca45e021pl $(SCSI_FILES) \
942c5e3c2dd127463517e5cc1694ee94ca45e021pl $(UTSBASE)/sparc/warlock/scsi.ll \
942c5e3c2dd127463517e5cc1694ee94ca45e021pl -l $(UTSBASE)/sparc/warlock/ddi_dki_impl.ll
942c5e3c2dd127463517e5cc1694ee94ca45e021pl $(TOUCH) $@
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021pl%.ll: $(UTSBASE)/common/io/aac/%.c
942c5e3c2dd127463517e5cc1694ee94ca45e021pl $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021plwarlock_ddi.files:
942c5e3c2dd127463517e5cc1694ee94ca45e021pl @cd $(UTSBASE)/sparc/warlock; pwd; $(MAKE) warlock
942c5e3c2dd127463517e5cc1694ee94ca45e021pl
942c5e3c2dd127463517e5cc1694ee94ca45e021plscsi.files:
942c5e3c2dd127463517e5cc1694ee94ca45e021pl @cd $(UTSBASE)/sparc/scsi; pwd; $(MAKE) warlock