17c478bd9Sstevel@tonic-gate# 2382c8bcaSpl196000# CDDL HEADER START 3382c8bcaSpl196000# 4382c8bcaSpl196000# The contents of this file are subject to the terms of the 5382c8bcaSpl196000# Common Development and Distribution License (the "License"). 6382c8bcaSpl196000# You may not use this file except in compliance with the License. 7382c8bcaSpl196000# 8382c8bcaSpl196000# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9382c8bcaSpl196000# or http://www.opensolaris.org/os/licensing. 10382c8bcaSpl196000# See the License for the specific language governing permissions 11382c8bcaSpl196000# and limitations under the License. 12382c8bcaSpl196000# 13382c8bcaSpl196000# When distributing Covered Code, include this CDDL HEADER in each 14382c8bcaSpl196000# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15382c8bcaSpl196000# If applicable, add the following below this CDDL HEADER, with the 16382c8bcaSpl196000# fields enclosed by brackets "[]" replaced with your own identifying 17382c8bcaSpl196000# information: Portions Copyright [yyyy] [name of copyright owner] 18382c8bcaSpl196000# 19382c8bcaSpl196000# CDDL HEADER END 20382c8bcaSpl196000# 21382c8bcaSpl196000 22382c8bcaSpl196000# 23a74f7440Spl196000# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate# Use is subject to license terms. 257c478bd9Sstevel@tonic-gate# 26*7014882cSRichard Lowe 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) 45942c5e3cSpl196000CONF_SRCDIR = $(UTSBASE)/common/io/aac 46382c8bcaSpl196000WARLOCK_OUT = $(AAC_OBJS:%.o=%.ll) 47382c8bcaSpl196000WARLOCK_OK = $(MODULE).ok 48382c8bcaSpl196000WLCMD_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# 63942c5e3cSpl196000# Kernel Module Dependencies 64942c5e3cSpl196000# 65942c5e3cSpl196000LDFLAGS += -dy -Nmisc/scsi 66942c5e3cSpl196000 67942c5e3cSpl196000# 687c478bd9Sstevel@tonic-gate# Overrides 697c478bd9Sstevel@tonic-gate# 707c478bd9Sstevel@tonic-gate 71*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized 72*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 73*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-value 74*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-label 75*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-switch 76*7014882cSRichard Lowe 777c478bd9Sstevel@tonic-gate# 787c478bd9Sstevel@tonic-gate# Default build targets. 797c478bd9Sstevel@tonic-gate# 807adeeb5aSmike_s.KEEP_STATE: 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gatedef: $(DEF_DEPS) 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gateall: $(ALL_DEPS) 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gateclean: $(CLEAN_DEPS) 877c478bd9Sstevel@tonic-gate 887c478bd9Sstevel@tonic-gateclobber: $(CLOBBER_DEPS) 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gatelint: $(LINT_DEPS) 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gatemodlintlib: $(MODLINTLIB_DEPS) 937c478bd9Sstevel@tonic-gate 947c478bd9Sstevel@tonic-gateclean.lint: $(CLEAN_LINT_DEPS) 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gateinstall: $(INSTALL_DEPS) 977c478bd9Sstevel@tonic-gate 987c478bd9Sstevel@tonic-gate# 997c478bd9Sstevel@tonic-gate# Include common targets. 1007c478bd9Sstevel@tonic-gate# 1017c478bd9Sstevel@tonic-gateinclude $(UTSBASE)/intel/Makefile.targ 102382c8bcaSpl196000 103382c8bcaSpl196000# 104382c8bcaSpl196000# Defines for local commands. 105382c8bcaSpl196000# 106382c8bcaSpl196000WARLOCK = warlock 107382c8bcaSpl196000WLCC = wlcc 108382c8bcaSpl196000TOUCH = touch 109382c8bcaSpl196000TEST = test 110382c8bcaSpl196000 111382c8bcaSpl196000# 112382c8bcaSpl196000# lock_lint rules 113382c8bcaSpl196000# 114382c8bcaSpl196000SCSI_FILES = $(SCSI_OBJS:%.o= -l $(UTSBASE)/intel/scsi/%.ll) 115382c8bcaSpl196000 116382c8bcaSpl196000%.wlcmd: 117382c8bcaSpl196000 cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@ 118382c8bcaSpl196000 119382c8bcaSpl196000warlock: $(WARLOCK_OK) 120382c8bcaSpl196000 121382c8bcaSpl196000$(WARLOCK_OK): $(WARLOCK_OUT) warlock_ddi.files scsi.files aac.wlcmd 122382c8bcaSpl196000 $(WARLOCK) -c $(WLCMD_DIR)/aac.wlcmd $(WARLOCK_OUT) \ 123382c8bcaSpl196000 $(SCSI_FILES) \ 124382c8bcaSpl196000 $(UTSBASE)/intel/warlock/scsi.ll \ 125382c8bcaSpl196000 -l $(UTSBASE)/intel/warlock/ddi_dki_impl.ll 126382c8bcaSpl196000 $(TOUCH) $@ 127382c8bcaSpl196000 128942c5e3cSpl196000%.ll: $(UTSBASE)/common/io/aac/%.c 129382c8bcaSpl196000 $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 130382c8bcaSpl196000 131382c8bcaSpl196000warlock_ddi.files: 132382c8bcaSpl196000 @cd $(UTSBASE)/intel/warlock; pwd; $(MAKE) warlock 133382c8bcaSpl196000 134382c8bcaSpl196000scsi.files: 135382c8bcaSpl196000 @cd $(UTSBASE)/intel/scsi; pwd; $(MAKE) warlock 136