1942c5e3cSpl196000# 2942c5e3cSpl196000# CDDL HEADER START 3942c5e3cSpl196000# 4942c5e3cSpl196000# The contents of this file are subject to the terms of the 5942c5e3cSpl196000# Common Development and Distribution License (the "License"). 6942c5e3cSpl196000# You may not use this file except in compliance with the License. 7942c5e3cSpl196000# 8942c5e3cSpl196000# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9942c5e3cSpl196000# or http://www.opensolaris.org/os/licensing. 10942c5e3cSpl196000# See the License for the specific language governing permissions 11942c5e3cSpl196000# and limitations under the License. 12942c5e3cSpl196000# 13942c5e3cSpl196000# When distributing Covered Code, include this CDDL HEADER in each 14942c5e3cSpl196000# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15942c5e3cSpl196000# If applicable, add the following below this CDDL HEADER, with the 16942c5e3cSpl196000# fields enclosed by brackets "[]" replaced with your own identifying 17942c5e3cSpl196000# information: Portions Copyright [yyyy] [name of copyright owner] 18942c5e3cSpl196000# 19942c5e3cSpl196000# CDDL HEADER END 20942c5e3cSpl196000# 21942c5e3cSpl196000 22942c5e3cSpl196000# 23a74f7440Spl196000# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24942c5e3cSpl196000# Use is subject to license terms. 25942c5e3cSpl196000# 26*7014882cSRichard Lowe 27942c5e3cSpl196000# 28942c5e3cSpl196000# This makefile drives the production of the aac driver kernel module. 29942c5e3cSpl196000# 30942c5e3cSpl196000# Sparc implementation architecture dependent 31942c5e3cSpl196000# 32942c5e3cSpl196000 33942c5e3cSpl196000# 34942c5e3cSpl196000# Path to the base of the uts directory tree (usually /usr/src/uts). 35942c5e3cSpl196000# 36942c5e3cSpl196000UTSBASE = ../.. 37942c5e3cSpl196000 38942c5e3cSpl196000# 39942c5e3cSpl196000# Define the module and object file sets. 40942c5e3cSpl196000# 41942c5e3cSpl196000MODULE = aac 42942c5e3cSpl196000OBJECTS = $(AAC_OBJS:%=$(OBJS_DIR)/%) 43942c5e3cSpl196000LINTS = $(AAC_OBJS:%.o=$(LINTS_DIR)/%.ln) 44942c5e3cSpl196000ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 45942c5e3cSpl196000CONF_SRCDIR = $(UTSBASE)/common/io/aac 46942c5e3cSpl196000WARLOCK_OUT = $(AAC_OBJS:%.o=%.ll) 47942c5e3cSpl196000WARLOCK_OK = $(MODULE).ok 48942c5e3cSpl196000WLCMD_DIR = $(UTSBASE)/common/io/warlock 49942c5e3cSpl196000 50942c5e3cSpl196000# 51942c5e3cSpl196000# Include common rules. 52942c5e3cSpl196000# 53942c5e3cSpl196000include $(UTSBASE)/sparc/Makefile.sparc 54942c5e3cSpl196000 55942c5e3cSpl196000# 56942c5e3cSpl196000# Define targets 57942c5e3cSpl196000# 58942c5e3cSpl196000ALL_TARGET = $(BINARY) $(CONFMOD) 59942c5e3cSpl196000LINT_TARGET = $(MODULE).lint 60942c5e3cSpl196000INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 61942c5e3cSpl196000 62942c5e3cSpl196000# 63942c5e3cSpl196000# lint pass one enforcement 64942c5e3cSpl196000# 65942c5e3cSpl196000CFLAGS += $(CCVERBOSE) 66942c5e3cSpl196000 67942c5e3cSpl196000# 68942c5e3cSpl196000# Kernel Module Dependencies 69942c5e3cSpl196000# 70942c5e3cSpl196000LDFLAGS += -dy -Nmisc/scsi 71942c5e3cSpl196000 72942c5e3cSpl196000# 73942c5e3cSpl196000# Overrides 74942c5e3cSpl196000# 75942c5e3cSpl196000 76*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized 77*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 78*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-value 79*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-label 80*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-switch 81*7014882cSRichard Lowe 82942c5e3cSpl196000# 83942c5e3cSpl196000# Default build targets. 84942c5e3cSpl196000# 85942c5e3cSpl196000.KEEP_STATE: 86942c5e3cSpl196000 87942c5e3cSpl196000def: $(DEF_DEPS) 88942c5e3cSpl196000 89942c5e3cSpl196000all: $(ALL_DEPS) 90942c5e3cSpl196000 91942c5e3cSpl196000clean: $(CLEAN_DEPS) 92942c5e3cSpl196000 93942c5e3cSpl196000clobber: $(CLOBBER_DEPS) 94942c5e3cSpl196000 95942c5e3cSpl196000lint: $(LINT_DEPS) 96942c5e3cSpl196000 97942c5e3cSpl196000modlintlib: $(MODLINTLIB_DEPS) 98942c5e3cSpl196000 99942c5e3cSpl196000clean.lint: $(CLEAN_LINT_DEPS) 100942c5e3cSpl196000 101942c5e3cSpl196000install: $(INSTALL_DEPS) 102942c5e3cSpl196000 103942c5e3cSpl196000# 104942c5e3cSpl196000# Include common targets. 105942c5e3cSpl196000# 106942c5e3cSpl196000include $(UTSBASE)/sparc/Makefile.targ 107942c5e3cSpl196000 108942c5e3cSpl196000# 109942c5e3cSpl196000# Defines for local commands. 110942c5e3cSpl196000# 111942c5e3cSpl196000WARLOCK = warlock 112942c5e3cSpl196000WLCC = wlcc 113942c5e3cSpl196000TOUCH = touch 114942c5e3cSpl196000TEST = test 115942c5e3cSpl196000 116942c5e3cSpl196000# 117942c5e3cSpl196000# lock_lint rules 118942c5e3cSpl196000# 119942c5e3cSpl196000SCSI_FILES = $(SCSI_OBJS:%.o= -l $(UTSBASE)/sparc/scsi/%.ll) 120942c5e3cSpl196000 121942c5e3cSpl196000%.wlcmd: 122942c5e3cSpl196000 cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@ 123942c5e3cSpl196000 124942c5e3cSpl196000warlock: $(WARLOCK_OK) 125942c5e3cSpl196000 126942c5e3cSpl196000$(WARLOCK_OK): $(WARLOCK_OUT) warlock_ddi.files scsi.files aac.wlcmd 127942c5e3cSpl196000 $(WARLOCK) -c $(WLCMD_DIR)/aac.wlcmd $(WARLOCK_OUT) \ 128942c5e3cSpl196000 $(SCSI_FILES) \ 129942c5e3cSpl196000 $(UTSBASE)/sparc/warlock/scsi.ll \ 130942c5e3cSpl196000 -l $(UTSBASE)/sparc/warlock/ddi_dki_impl.ll 131942c5e3cSpl196000 $(TOUCH) $@ 132942c5e3cSpl196000 133942c5e3cSpl196000%.ll: $(UTSBASE)/common/io/aac/%.c 134942c5e3cSpl196000 $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 135942c5e3cSpl196000 136942c5e3cSpl196000warlock_ddi.files: 137942c5e3cSpl196000 @cd $(UTSBASE)/sparc/warlock; pwd; $(MAKE) warlock 138942c5e3cSpl196000 139942c5e3cSpl196000scsi.files: 140942c5e3cSpl196000 @cd $(UTSBASE)/sparc/scsi; pwd; $(MAKE) warlock 141