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 262fcbc377Syt160523# 272fcbc377Syt160523# uts/sparc/ahci/Makefile 282fcbc377Syt160523# 292fcbc377Syt160523# This makefile drives the production of the 302fcbc377Syt160523# "/kernel/drv/ahci" kernel module. 312fcbc377Syt160523# 322fcbc377Syt160523# sparc architecture dependent 332fcbc377Syt160523# 342fcbc377Syt160523 352fcbc377Syt160523# 362fcbc377Syt160523# Path to the base of the uts directory tree (usually /usr/src/uts). 372fcbc377Syt160523# 382fcbc377Syt160523UTSBASE = ../.. 392fcbc377Syt160523 402fcbc377Syt160523# 412fcbc377Syt160523# Define the module and object file sets. 422fcbc377Syt160523# 432fcbc377Syt160523MODULE = ahci 442fcbc377Syt160523OBJECTS = $(AHCI_OBJS:%=$(OBJS_DIR)/%) 452fcbc377Syt160523LINTS = $(AHCI_OBJS:%.o=$(LINTS_DIR)/%.ln) 462fcbc377Syt160523WARLOCK_OUT = $(AHCI_OBJS:%.o=%.ll) 472fcbc377Syt160523WARLOCK_OK = $(MODULE).ok 482fcbc377Syt160523ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 492fcbc377Syt160523CONF_SRCDIR = $(UTSBASE)/common/io/sata/adapters/ahci 502fcbc377Syt160523WLCMD_DIR = $(UTSBASE)/common/io/warlock 512fcbc377Syt160523 522fcbc377Syt160523# 532fcbc377Syt160523# Include common rules. 542fcbc377Syt160523# 552fcbc377Syt160523include $(UTSBASE)/sparc/Makefile.sparc 562fcbc377Syt160523 572fcbc377Syt160523# 582fcbc377Syt160523# Define targets 592fcbc377Syt160523# 602fcbc377Syt160523ALL_TARGET = $(BINARY) 612fcbc377Syt160523LINT_TARGET = $(MODULE).lint 622fcbc377Syt160523INSTALL_TARGET = $(BINARY) $(ROOTMODULE) 632fcbc377Syt160523 642fcbc377Syt160523# 652fcbc377Syt160523# Overrides. 662fcbc377Syt160523# 672fcbc377Syt160523DEBUG_FLGS = 682fcbc377Syt160523DEBUG_DEFS += $(DEBUG_FLGS) 692fcbc377Syt160523 702fcbc377Syt160523# 712fcbc377Syt160523# lint pass one enforcement 722fcbc377Syt160523# 732fcbc377Syt160523CFLAGS += $(CCVERBOSE) 742fcbc377Syt160523 75*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 76*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-label 77*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized 78*7014882cSRichard Lowe 792fcbc377Syt160523# 802fcbc377Syt160523# Default build targets. 812fcbc377Syt160523# 822fcbc377Syt160523.KEEP_STATE: 832fcbc377Syt160523 842fcbc377Syt160523def: $(DEF_DEPS) 852fcbc377Syt160523 862fcbc377Syt160523all: $(ALL_DEPS) 872fcbc377Syt160523 882fcbc377Syt160523clean: $(CLEAN_DEPS) 892fcbc377Syt160523 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 902fcbc377Syt160523 912fcbc377Syt160523clobber: $(CLOBBER_DEPS) 922fcbc377Syt160523 $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 932fcbc377Syt160523 942fcbc377Syt160523lint: $(LINT_DEPS) 952fcbc377Syt160523 962fcbc377Syt160523modlintlib: $(MODLINTLIB_DEPS) 972fcbc377Syt160523 982fcbc377Syt160523clean.lint: $(CLEAN_LINT_DEPS) 992fcbc377Syt160523 1002fcbc377Syt160523install: $(INSTALL_DEPS) 1012fcbc377Syt160523 1022fcbc377Syt160523# 1032fcbc377Syt160523# Include common targets. 1042fcbc377Syt160523# 1052fcbc377Syt160523include $(UTSBASE)/sparc/Makefile.targ 1062fcbc377Syt160523 1072fcbc377Syt160523 1082fcbc377Syt160523# 1092fcbc377Syt160523# Defines for local commands. 1102fcbc377Syt160523# 1112fcbc377Syt160523WARLOCK = warlock 1122fcbc377Syt160523WLCC = wlcc 1132fcbc377Syt160523TOUCH = touch 1142fcbc377Syt160523TEST = test 1152fcbc377Syt160523 1162fcbc377Syt160523SD_FILES = $(SD_OBJS:%.o=../sd/%.ll) 1172fcbc377Syt160523SATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll) 1182fcbc377Syt160523SCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll) 1194e942d8cSshidokhtCMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll) 1202fcbc377Syt160523 1212fcbc377Syt160523warlock: $(WARLOCK_OK) 1222fcbc377Syt160523 123bf56214cSstevel$(WARLOCK_OK): $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) warlock_ddi.files \ 1244e942d8cSshidokht sata.files scsi.files sd.files cmlb.files 1252fcbc377Syt160523 $(WARLOCK) -c $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) \ 1262fcbc377Syt160523 $(SD_FILES) \ 1272fcbc377Syt160523 $(SCSI_FILES) \ 1284e942d8cSshidokht $(CMLB_FILES) \ 1292fcbc377Syt160523 $(SATA_FILES) \ 1302fcbc377Syt160523 -l ../warlock/ddi_dki_impl.ll 1312fcbc377Syt160523 $(TOUCH) $@ 1322fcbc377Syt160523 1332fcbc377Syt160523%.ll: $(UTSBASE)/common/io/sata/adapters/ahci/%.c 1342fcbc377Syt160523 $(WLCC) $(CPPFLAGS) -D DEBUG -D __sparcv9 -o $@ $< 1352fcbc377Syt160523 1362fcbc377Syt160523sata.files: 1372fcbc377Syt160523 @cd ../sata; pwd; $(MAKE) warlock 1382fcbc377Syt160523 1392fcbc377Syt160523scsi.files: 1402fcbc377Syt160523 @cd ../scsi; pwd; $(MAKE) warlock 1412fcbc377Syt160523 1422fcbc377Syt160523sd.files: 1432fcbc377Syt160523 @cd ../sd; pwd; $(MAKE) warlock_alone 1442fcbc377Syt160523 1454e942d8cSshidokhtcmlb.files: 1464e942d8cSshidokht @cd ../cmlb; pwd; $(MAKE) warlock 1474e942d8cSshidokht 1484e942d8cSshidokht 1492fcbc377Syt160523warlock_ddi.files: 1502fcbc377Syt160523 @cd ../warlock; pwd; $(MAKE) warlock 151