17c478bd9Sstevel@tonic-gate# 2*382c8bcaSpl196000# CDDL HEADER START 3*382c8bcaSpl196000# 4*382c8bcaSpl196000# The contents of this file are subject to the terms of the 5*382c8bcaSpl196000# Common Development and Distribution License (the "License"). 6*382c8bcaSpl196000# You may not use this file except in compliance with the License. 7*382c8bcaSpl196000# 8*382c8bcaSpl196000# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*382c8bcaSpl196000# or http://www.opensolaris.org/os/licensing. 10*382c8bcaSpl196000# See the License for the specific language governing permissions 11*382c8bcaSpl196000# and limitations under the License. 12*382c8bcaSpl196000# 13*382c8bcaSpl196000# When distributing Covered Code, include this CDDL HEADER in each 14*382c8bcaSpl196000# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*382c8bcaSpl196000# If applicable, add the following below this CDDL HEADER, with the 16*382c8bcaSpl196000# fields enclosed by brackets "[]" replaced with your own identifying 17*382c8bcaSpl196000# information: Portions Copyright [yyyy] [name of copyright owner] 18*382c8bcaSpl196000# 19*382c8bcaSpl196000# CDDL HEADER END 20*382c8bcaSpl196000# 21*382c8bcaSpl196000 22*382c8bcaSpl196000# 23*382c8bcaSpl196000# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate# Use is subject to license terms. 257c478bd9Sstevel@tonic-gate# 267c478bd9Sstevel@tonic-gate# ident "%Z%%M% %I% %E% SMI" 277c478bd9Sstevel@tonic-gate# 287c478bd9Sstevel@tonic-gate# This makefile drives the production of the aac driver kernel module. 297c478bd9Sstevel@tonic-gate# 307c478bd9Sstevel@tonic-gate# intel implementation architecture dependent 317c478bd9Sstevel@tonic-gate# 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gate# 347c478bd9Sstevel@tonic-gate# Path to the base of the uts directory tree (usually /usr/src/uts). 357c478bd9Sstevel@tonic-gate# 367c478bd9Sstevel@tonic-gateUTSBASE = ../.. 377c478bd9Sstevel@tonic-gate 387c478bd9Sstevel@tonic-gate# 397c478bd9Sstevel@tonic-gate# Define the module and object file sets. 407c478bd9Sstevel@tonic-gate# 417c478bd9Sstevel@tonic-gateMODULE = aac 427c478bd9Sstevel@tonic-gateOBJECTS = $(AAC_OBJS:%=$(OBJS_DIR)/%) 437c478bd9Sstevel@tonic-gateLINTS = $(AAC_OBJS:%.o=$(LINTS_DIR)/%.ln) 447c478bd9Sstevel@tonic-gateROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 457c478bd9Sstevel@tonic-gateCONF_SRCDIR = $(UTSBASE)/intel/io/aac 46*382c8bcaSpl196000WARLOCK_OUT = $(AAC_OBJS:%.o=%.ll) 47*382c8bcaSpl196000WARLOCK_OK = $(MODULE).ok 48*382c8bcaSpl196000WLCMD_DIR = $(UTSBASE)/common/io/warlock 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gate# 517c478bd9Sstevel@tonic-gate# Include common rules. 527c478bd9Sstevel@tonic-gate# 537c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.intel 547c478bd9Sstevel@tonic-gate 557c478bd9Sstevel@tonic-gate# 567c478bd9Sstevel@tonic-gate# Define targets 577c478bd9Sstevel@tonic-gate# 58c8343062SmeemALL_TARGET = $(BINARY) $(CONFMOD) 597c478bd9Sstevel@tonic-gateLINT_TARGET = $(MODULE).lint 60c8343062SmeemINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gate# 63bb25c06cSjg# For now, disable these lint checks; maintainers should endeavor 64bb25c06cSjg# to investigate and remove these for maximum lint coverage. 65bb25c06cSjg# Please do not carry these forward to new Makefiles. 66bb25c06cSjg# 67bb25c06cSjgLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 68bb25c06cSjgLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW 69bb25c06cSjg 70bb25c06cSjg# 717c478bd9Sstevel@tonic-gate# Overrides 727c478bd9Sstevel@tonic-gate# 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gate# 757c478bd9Sstevel@tonic-gate# Default build targets. 767c478bd9Sstevel@tonic-gate# 777adeeb5aSmike_s.KEEP_STATE: 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gatedef: $(DEF_DEPS) 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gateall: $(ALL_DEPS) 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gateclean: $(CLEAN_DEPS) 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gateclobber: $(CLOBBER_DEPS) 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gatelint: $(LINT_DEPS) 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gatemodlintlib: $(MODLINTLIB_DEPS) 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gateclean.lint: $(CLEAN_LINT_DEPS) 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gateinstall: $(INSTALL_DEPS) 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate# 967c478bd9Sstevel@tonic-gate# Include common targets. 977c478bd9Sstevel@tonic-gate# 987c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.targ 99*382c8bcaSpl196000 100*382c8bcaSpl196000# 101*382c8bcaSpl196000# Defines for local commands. 102*382c8bcaSpl196000# 103*382c8bcaSpl196000WARLOCK = warlock 104*382c8bcaSpl196000WLCC = wlcc 105*382c8bcaSpl196000TOUCH = touch 106*382c8bcaSpl196000TEST = test 107*382c8bcaSpl196000 108*382c8bcaSpl196000# 109*382c8bcaSpl196000# lock_lint rules 110*382c8bcaSpl196000# 111*382c8bcaSpl196000SCSI_FILES = $(SCSI_OBJS:%.o= -l $(UTSBASE)/intel/scsi/%.ll) 112*382c8bcaSpl196000 113*382c8bcaSpl196000%.wlcmd: 114*382c8bcaSpl196000 cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@ 115*382c8bcaSpl196000 116*382c8bcaSpl196000warlock: $(WARLOCK_OK) 117*382c8bcaSpl196000 118*382c8bcaSpl196000$(WARLOCK_OK): $(WARLOCK_OUT) warlock_ddi.files scsi.files aac.wlcmd 119*382c8bcaSpl196000 $(WARLOCK) -c $(WLCMD_DIR)/aac.wlcmd $(WARLOCK_OUT) \ 120*382c8bcaSpl196000 $(SCSI_FILES) \ 121*382c8bcaSpl196000 $(UTSBASE)/intel/warlock/scsi.ll \ 122*382c8bcaSpl196000 -l $(UTSBASE)/intel/warlock/ddi_dki_impl.ll 123*382c8bcaSpl196000 $(TOUCH) $@ 124*382c8bcaSpl196000 125*382c8bcaSpl196000%.ll: $(UTSBASE)/intel/io/aac/%.c 126*382c8bcaSpl196000 $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 127*382c8bcaSpl196000 128*382c8bcaSpl196000warlock_ddi.files: 129*382c8bcaSpl196000 @cd $(UTSBASE)/intel/warlock; pwd; $(MAKE) warlock 130*382c8bcaSpl196000 131*382c8bcaSpl196000scsi.files: 132*382c8bcaSpl196000 @cd $(UTSBASE)/intel/scsi; pwd; $(MAKE) warlock 133