xref: /titanic_50/usr/src/uts/intel/ahci/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
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#
23689d74b0Syt160523# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
242fcbc377Syt160523# Use is subject to license terms.
252fcbc377Syt160523#
262fcbc377Syt160523
272fcbc377Syt160523#
282fcbc377Syt160523#	This makefile drives the production of the
292fcbc377Syt160523#	"/kernel/drv/ahci" kernel module.
302fcbc377Syt160523#
312fcbc377Syt160523#	intel architecture dependent
322fcbc377Syt160523#
332fcbc377Syt160523
342fcbc377Syt160523#
352fcbc377Syt160523#	Path to the base of the uts directory tree (usually /usr/src/uts).
362fcbc377Syt160523#
372fcbc377Syt160523UTSBASE	= ../..
382fcbc377Syt160523
392fcbc377Syt160523#
402fcbc377Syt160523#	Define the module and object file sets.
412fcbc377Syt160523#
422fcbc377Syt160523MODULE		= ahci
432fcbc377Syt160523OBJECTS		= $(AHCI_OBJS:%=$(OBJS_DIR)/%)
442fcbc377Syt160523LINTS		= $(AHCI_OBJS:%.o=$(LINTS_DIR)/%.ln)
452fcbc377Syt160523ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
462fcbc377Syt160523CONF_SRCDIR     = $(UTSBASE)/common/io/sata/adapters/ahci
472fcbc377Syt160523WARLOCK_OUT     = $(AHCI_OBJS:%.o=%.ll)
482fcbc377Syt160523WARLOCK_OK      = $(MODULE).ok
492fcbc377Syt160523WLCMD_DIR	= $(UTSBASE)/common/io/warlock
502fcbc377Syt160523
512fcbc377Syt160523#
522fcbc377Syt160523#	Include common rules.
532fcbc377Syt160523#
542fcbc377Syt160523include $(UTSBASE)/intel/Makefile.intel
552fcbc377Syt160523
562fcbc377Syt160523#
572fcbc377Syt160523#	Define targets
582fcbc377Syt160523#
592fcbc377Syt160523ALL_TARGET	= $(BINARY)
602fcbc377Syt160523LINT_TARGET	= $(MODULE).lint
612fcbc377Syt160523INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
622fcbc377Syt160523
632fcbc377Syt160523#
642fcbc377Syt160523#	Overrides.
652fcbc377Syt160523#
662fcbc377Syt160523DEBUG_FLGS	=
672fcbc377Syt160523DEBUG_DEFS	+= $(DEBUG_FLGS)
682fcbc377Syt160523
692fcbc377Syt160523#
702fcbc377Syt160523# lint pass one enforcement
712fcbc377Syt160523#
722fcbc377Syt160523CFLAGS += $(CCVERBOSE)
732fcbc377Syt160523
74*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
75*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-label
76*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
77*7014882cSRichard Lowe
782fcbc377Syt160523#
792fcbc377Syt160523#
802fcbc377Syt160523# we depend on the sata module
812fcbc377Syt160523LDFLAGS += -dy -N misc/sata
822fcbc377Syt160523
832fcbc377Syt160523#
842fcbc377Syt160523# For now, disable these lint checks; maintainers should endeavor
852fcbc377Syt160523# to investigate and remove these for maximum lint coverage.
862fcbc377Syt160523# Please do not carry these forward to new Makefiles.
872fcbc377Syt160523#
882fcbc377Syt160523
892fcbc377Syt160523#
902fcbc377Syt160523#	Default build targets.
912fcbc377Syt160523#
922fcbc377Syt160523.KEEP_STATE:
932fcbc377Syt160523
942fcbc377Syt160523def:		$(DEF_DEPS)
952fcbc377Syt160523
962fcbc377Syt160523all:		$(ALL_DEPS)
972fcbc377Syt160523
982fcbc377Syt160523clean:		$(CLEAN_DEPS)
992fcbc377Syt160523		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
1002fcbc377Syt160523
1012fcbc377Syt160523clobber:	$(CLOBBER_DEPS)
1022fcbc377Syt160523		$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
1032fcbc377Syt160523
1042fcbc377Syt160523lint:		$(LINT_DEPS)
1052fcbc377Syt160523
1062fcbc377Syt160523modlintlib:	$(MODLINTLIB_DEPS)
1072fcbc377Syt160523
1082fcbc377Syt160523clean.lint:	$(CLEAN_LINT_DEPS)
1092fcbc377Syt160523
1102fcbc377Syt160523install:	$(INSTALL_DEPS)
1112fcbc377Syt160523
1122fcbc377Syt160523#
1132fcbc377Syt160523#	Include common targets.
1142fcbc377Syt160523#
1152fcbc377Syt160523include $(UTSBASE)/intel/Makefile.targ
1162fcbc377Syt160523
1172fcbc377Syt160523
1182fcbc377Syt160523#
1192fcbc377Syt160523#	Defines for local commands.
1202fcbc377Syt160523#
1212fcbc377Syt160523WARLOCK		= warlock
1222fcbc377Syt160523WLCC		= wlcc
1232fcbc377Syt160523TOUCH		= touch
1242fcbc377Syt160523TEST		= test
1252fcbc377Syt160523
1262fcbc377Syt160523AHCI_FILES   = $(MODULE).ll
1272fcbc377Syt160523SD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
1282fcbc377Syt160523SATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll)
1292fcbc377Syt160523SCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
1304e942d8cSshidokhtCMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
1312fcbc377Syt160523
1322fcbc377Syt160523warlock: $(WARLOCK_OK)
1332fcbc377Syt160523
134bf56214cSstevel$(WARLOCK_OK): $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) warlock_ddi.files \
1354e942d8cSshidokht	sata.files scsi.files sd.files cmlb.files
1362fcbc377Syt160523	$(WARLOCK) -c $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) \
1372fcbc377Syt160523	$(SD_FILES) \
1382fcbc377Syt160523	$(SCSI_FILES) \
1394e942d8cSshidokht	$(CMLB_FILES) \
1402fcbc377Syt160523        $(SATA_FILES) \
1412fcbc377Syt160523	-l ../warlock/ddi_dki_impl.ll
1422fcbc377Syt160523	$(TOUCH) $@
1432fcbc377Syt160523
1442fcbc377Syt160523%.ll: $(UTSBASE)/common/io/sata/adapters/ahci/%.c
1452fcbc377Syt160523	$(WLCC) $(CPPFLAGS) -D DEBUG -o $@ $<
1462fcbc377Syt160523
1472fcbc377Syt160523sata.files:
1482fcbc377Syt160523	@cd ../sata; pwd; $(MAKE) warlock
1492fcbc377Syt160523
1502fcbc377Syt160523scsi.files:
1512fcbc377Syt160523	@cd ../scsi; pwd; $(MAKE) warlock
1522fcbc377Syt160523
1532fcbc377Syt160523sd.files:
1542fcbc377Syt160523	@cd ../sd; pwd; $(MAKE) warlock_alone
1552fcbc377Syt160523
1564e942d8cSshidokhtcmlb.files:
1574e942d8cSshidokht	@cd ../cmlb; pwd; $(MAKE) warlock
1584e942d8cSshidokht
1592fcbc377Syt160523warlock_ddi.files:
1602fcbc377Syt160523	@cd ../warlock; pwd; $(MAKE) warlock
161