12fcbc377Syt160523# CDDL HEADER START 22fcbc377Syt160523# 32fcbc377Syt160523# The contents of this file are subject to the terms of the 42fcbc377Syt160523# Common Development and Distribution License (the "License"). 52fcbc377Syt160523# You may not use this file except in compliance with the License. 62fcbc377Syt160523# 72fcbc377Syt160523# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 82fcbc377Syt160523# or http://www.opensolaris.org/os/licensing. 92fcbc377Syt160523# See the License for the specific language governing permissions 102fcbc377Syt160523# and limitations under the License. 112fcbc377Syt160523# 122fcbc377Syt160523# When distributing Covered Code, include this CDDL HEADER in each 132fcbc377Syt160523# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 142fcbc377Syt160523# If applicable, add the following below this CDDL HEADER, with the 152fcbc377Syt160523# fields enclosed by brackets "[]" replaced with your own identifying 162fcbc377Syt160523# information: Portions Copyright [yyyy] [name of copyright owner] 172fcbc377Syt160523# 182fcbc377Syt160523# CDDL HEADER END 192fcbc377Syt160523# 202fcbc377Syt160523 212fcbc377Syt160523# 224e942d8cSshidokht# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 232fcbc377Syt160523# Use is subject to license terms. 242fcbc377Syt160523# 252fcbc377Syt160523# ident "%Z%%M% %I% %E% SMI" 262fcbc377Syt160523# 272fcbc377Syt160523 282fcbc377Syt160523# 292fcbc377Syt160523# uts/sparc/ahci/Makefile 302fcbc377Syt160523# 312fcbc377Syt160523# This makefile drives the production of the 322fcbc377Syt160523# "/kernel/drv/ahci" kernel module. 332fcbc377Syt160523# 342fcbc377Syt160523# sparc architecture dependent 352fcbc377Syt160523# 362fcbc377Syt160523 372fcbc377Syt160523# 382fcbc377Syt160523# Path to the base of the uts directory tree (usually /usr/src/uts). 392fcbc377Syt160523# 402fcbc377Syt160523UTSBASE = ../.. 412fcbc377Syt160523 422fcbc377Syt160523# 432fcbc377Syt160523# Define the module and object file sets. 442fcbc377Syt160523# 452fcbc377Syt160523MODULE = ahci 462fcbc377Syt160523OBJECTS = $(AHCI_OBJS:%=$(OBJS_DIR)/%) 472fcbc377Syt160523LINTS = $(AHCI_OBJS:%.o=$(LINTS_DIR)/%.ln) 482fcbc377Syt160523WARLOCK_OUT = $(AHCI_OBJS:%.o=%.ll) 492fcbc377Syt160523WARLOCK_OK = $(MODULE).ok 502fcbc377Syt160523ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 512fcbc377Syt160523CONF_SRCDIR = $(UTSBASE)/common/io/sata/adapters/ahci 522fcbc377Syt160523WLCMD_DIR = $(UTSBASE)/common/io/warlock 532fcbc377Syt160523 542fcbc377Syt160523# 552fcbc377Syt160523# Include common rules. 562fcbc377Syt160523# 572fcbc377Syt160523include $(UTSBASE)/sparc/Makefile.sparc 582fcbc377Syt160523 592fcbc377Syt160523# 602fcbc377Syt160523# Define targets 612fcbc377Syt160523# 622fcbc377Syt160523ALL_TARGET = $(BINARY) 632fcbc377Syt160523LINT_TARGET = $(MODULE).lint 642fcbc377Syt160523INSTALL_TARGET = $(BINARY) $(ROOTMODULE) 652fcbc377Syt160523 662fcbc377Syt160523# 672fcbc377Syt160523# Overrides. 682fcbc377Syt160523# 692fcbc377Syt160523DEBUG_FLGS = 702fcbc377Syt160523DEBUG_DEFS += $(DEBUG_FLGS) 712fcbc377Syt160523 722fcbc377Syt160523# 732fcbc377Syt160523# lint pass one enforcement 742fcbc377Syt160523# 752fcbc377Syt160523CFLAGS += $(CCVERBOSE) 762fcbc377Syt160523 772fcbc377Syt160523# 782fcbc377Syt160523# Default build targets. 792fcbc377Syt160523# 802fcbc377Syt160523.KEEP_STATE: 812fcbc377Syt160523 822fcbc377Syt160523def: $(DEF_DEPS) 832fcbc377Syt160523 842fcbc377Syt160523all: $(ALL_DEPS) 852fcbc377Syt160523 862fcbc377Syt160523clean: $(CLEAN_DEPS) 872fcbc377Syt160523 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 882fcbc377Syt160523 892fcbc377Syt160523clobber: $(CLOBBER_DEPS) 902fcbc377Syt160523 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 912fcbc377Syt160523 922fcbc377Syt160523lint: $(LINT_DEPS) 932fcbc377Syt160523 942fcbc377Syt160523modlintlib: $(MODLINTLIB_DEPS) 952fcbc377Syt160523 962fcbc377Syt160523clean.lint: $(CLEAN_LINT_DEPS) 972fcbc377Syt160523 982fcbc377Syt160523install: $(INSTALL_DEPS) 992fcbc377Syt160523 1002fcbc377Syt160523# 1012fcbc377Syt160523# Include common targets. 1022fcbc377Syt160523# 1032fcbc377Syt160523include $(UTSBASE)/sparc/Makefile.targ 1042fcbc377Syt160523 1052fcbc377Syt160523 1062fcbc377Syt160523# 1072fcbc377Syt160523# Defines for local commands. 1082fcbc377Syt160523# 1092fcbc377Syt160523WARLOCK = warlock 1102fcbc377Syt160523WLCC = wlcc 1112fcbc377Syt160523TOUCH = touch 1122fcbc377Syt160523TEST = test 1132fcbc377Syt160523 1142fcbc377Syt160523SD_FILES = $(SD_OBJS:%.o=../sd/%.ll) 1152fcbc377Syt160523SATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll) 1162fcbc377Syt160523SCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll) 1174e942d8cSshidokhtCMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll) 1182fcbc377Syt160523 1192fcbc377Syt160523warlock: $(WARLOCK_OK) 1202fcbc377Syt160523 121*bf56214cSstevel$(WARLOCK_OK): $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) warlock_ddi.files \ 1224e942d8cSshidokht sata.files scsi.files sd.files cmlb.files 1232fcbc377Syt160523 $(WARLOCK) -c $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) \ 1242fcbc377Syt160523 $(SD_FILES) \ 1252fcbc377Syt160523 $(SCSI_FILES) \ 1264e942d8cSshidokht $(CMLB_FILES) \ 1272fcbc377Syt160523 $(SATA_FILES) \ 1282fcbc377Syt160523 -l ../warlock/ddi_dki_impl.ll 1292fcbc377Syt160523 $(TOUCH) $@ 1302fcbc377Syt160523 1312fcbc377Syt160523%.ll: $(UTSBASE)/common/io/sata/adapters/ahci/%.c 1322fcbc377Syt160523 $(WLCC) $(CPPFLAGS) -D DEBUG -D __sparcv9 -o $@ $< 1332fcbc377Syt160523 1342fcbc377Syt160523sata.files: 1352fcbc377Syt160523 @cd ../sata; pwd; $(MAKE) warlock 1362fcbc377Syt160523 1372fcbc377Syt160523scsi.files: 1382fcbc377Syt160523 @cd ../scsi; pwd; $(MAKE) warlock 1392fcbc377Syt160523 1402fcbc377Syt160523sd.files: 1412fcbc377Syt160523 @cd ../sd; pwd; $(MAKE) warlock_alone 1422fcbc377Syt160523 1434e942d8cSshidokhtcmlb.files: 1444e942d8cSshidokht @cd ../cmlb; pwd; $(MAKE) warlock 1454e942d8cSshidokht 1464e942d8cSshidokht 1472fcbc377Syt160523warlock_ddi.files: 1482fcbc377Syt160523 @cd ../warlock; pwd; $(MAKE) warlock 149