18d483882Smlf# 28d483882Smlf# CDDL HEADER START 38d483882Smlf# 48d483882Smlf# The contents of this file are subject to the terms of the 58d483882Smlf# Common Development and Distribution License (the "License"). 68d483882Smlf# You may not use this file except in compliance with the License. 78d483882Smlf# 88d483882Smlf# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 98d483882Smlf# or http://www.opensolaris.org/os/licensing. 108d483882Smlf# See the License for the specific language governing permissions 118d483882Smlf# and limitations under the License. 128d483882Smlf# 138d483882Smlf# When distributing Covered Code, include this CDDL HEADER in each 148d483882Smlf# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 158d483882Smlf# If applicable, add the following below this CDDL HEADER, with the 168d483882Smlf# fields enclosed by brackets "[]" replaced with your own identifying 178d483882Smlf# information: Portions Copyright [yyyy] [name of copyright owner] 188d483882Smlf# 198d483882Smlf# CDDL HEADER END 208d483882Smlf# 218d483882Smlf 228d483882Smlf# 233f318a28SAlan Perry# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 248d483882Smlf# Use is subject to license terms. 258d483882Smlf# 268d483882Smlf# 278d483882Smlf# Path to the base of the uts directory tree (usually /usr/src/uts). 288d483882Smlf# 298d483882SmlfUTSBASE = ../.. 308d483882Smlf 318d483882Smlf# 328d483882Smlf# Define the module and object file sets. 338d483882Smlf# 348d483882SmlfMODULE = nv_sata 358d483882SmlfOBJECTS = $(NV_SATA_OBJS:%=$(OBJS_DIR)/%) 368d483882SmlfLINTS = $(NV_SATA_OBJS:%.o=$(LINTS_DIR)/%.ln) 378d483882SmlfROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 388d483882SmlfCONF_SRCDIR = $(UTSBASE)/common/io/sata/adapters/nv_sata 398d483882SmlfWARLOCK_OUT = $(NV_SATA_OBJS:%.o=%.ll) 408d483882SmlfWARLOCK_OK = $(MODULE).ok 418d483882SmlfWLCMD_DIR = $(UTSBASE)/common/io/warlock 428d483882Smlf 438d483882Smlf# 448d483882Smlf# Include common rules. 458d483882Smlf# 468d483882Smlfinclude $(UTSBASE)/intel/Makefile.intel 478d483882Smlf 488d483882Smlf# 498d483882Smlf# Define targets 508d483882Smlf# 518d483882SmlfALL_TARGET = $(BINARY) 528d483882SmlfLINT_TARGET = $(MODULE).lint 538d483882SmlfINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 548d483882Smlf 558d483882Smlf# 568d483882Smlf# Overrides. 578d483882Smlf# 588d483882SmlfDEBUG_FLGS = 598d483882SmlfDEBUG_DEFS += $(DEBUG_FLGS) 603f318a28SAlan PerryCPPFLAGS += -DSGPIO_SUPPORT 618d483882Smlf 628d483882Smlf# 638d483882Smlf# lint pass one enforcement 648d483882Smlf# 658d483882SmlfCFLAGS += $(CCVERBOSE) 668d483882Smlf 678d483882Smlf# 688d483882Smlf# dependency on sata module 698d483882Smlf# 708d483882SmlfLDFLAGS += -dy -N misc/sata 718d483882Smlf 728d483882Smlf# 738d483882Smlf# For now, disable these lint checks; maintainers should endeavor 748d483882Smlf# to investigate and remove these for maximum lint coverage. 758d483882Smlf# Please do not carry these forward to new Makefiles. 768d483882Smlf# 778d483882SmlfLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 788d483882Smlf 79*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized 80*7014882cSRichard Lowe 818d483882Smlf# 828d483882Smlf# Default build targets. 838d483882Smlf# 848d483882Smlf.KEEP_STATE: 858d483882Smlf 868d483882Smlfdef: $(DEF_DEPS) 878d483882Smlf 888d483882Smlfall: $(ALL_DEPS) 898d483882Smlf 908d483882Smlfclean: $(CLEAN_DEPS) 918d483882Smlf $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 928d483882Smlf 938d483882Smlfclobber: $(CLOBBER_DEPS) 948d483882Smlf $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 958d483882Smlf 968d483882Smlflint: $(LINT_DEPS) 978d483882Smlf 988d483882Smlfmodlintlib: $(MODLINTLIB_DEPS) 998d483882Smlf 1008d483882Smlfclean.lint: $(CLEAN_LINT_DEPS) 1018d483882Smlf 1028d483882Smlfinstall: $(INSTALL_DEPS) 1038d483882Smlf 1048d483882Smlf# 1058d483882Smlf# Include common targets. 1068d483882Smlf# 1078d483882Smlfinclude $(UTSBASE)/intel/Makefile.targ 1088d483882Smlf 1098d483882Smlf 1108d483882Smlf# 1118d483882Smlf# Defines for local commands. 1128d483882Smlf# 1138d483882SmlfWARLOCK = warlock 1148d483882SmlfWLCC = wlcc 1158d483882SmlfTOUCH = touch 1168d483882SmlfTEST = test 1178d483882Smlf 1188d483882SmlfNV_SATA_FILES = $(MODULE).ll 1198d483882SmlfSD_FILES = $(SD_OBJS:%.o=../sd/%.ll) 1208d483882SmlfSATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll) 1218d483882SmlfSCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll) 1228d483882SmlfCMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll) 1238d483882Smlf 1248d483882Smlfwarlock: $(WARLOCK_OK) 1258d483882Smlf 1268d483882Smlf 1278d483882Smlf$(WARLOCK_OK): $(WLCMD_DIR)/nv_sata.wlcmd $(WARLOCK_OUT) warlock_ddi.files \ 1288d483882Smlf sata.files scsi.files sd.files cmlb.files 1298d483882Smlf $(WARLOCK) -c $(WLCMD_DIR)/nv_sata.wlcmd $(WARLOCK_OUT) \ 1308d483882Smlf $(SD_FILES) \ 1318d483882Smlf $(SCSI_FILES) \ 1328d483882Smlf $(CMLB_FILES) \ 1338d483882Smlf $(SATA_FILES) \ 1348d483882Smlf -l ../warlock/ddi_dki_impl.ll 1358d483882Smlf $(TOUCH) $@ 1368d483882Smlf 1378d483882Smlf%.ll: $(UTSBASE)/common/io/sata/adapters/nv_sata/%.c 1388d483882Smlf $(WLCC) $(CPPFLAGS) -D DEBUG -o $@ $< 1398d483882Smlf 1408d483882Smlfsata.files: 1418d483882Smlf @cd ../sata; pwd; $(MAKE) warlock 1428d483882Smlf 1438d483882Smlfscsi.files: 1448d483882Smlf @cd ../scsi; pwd; $(MAKE) warlock 1458d483882Smlf 1468d483882Smlfsd.files: 1478d483882Smlf @cd ../sd; pwd; $(MAKE) warlock_alone 1488d483882Smlf 1498d483882Smlfcmlb.files: 1508d483882Smlf @cd ../cmlb; pwd; $(MAKE) warlock 1518d483882Smlf 1528d483882Smlfwarlock_ddi.files: 1538d483882Smlf @cd ../warlock; pwd; $(MAKE) warlock 154