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