Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# CDDL HEADER START
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# The contents of this file are subject to the terms of the
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Common Development and Distribution License (the "License").
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg# You may not use this file except in compliance with the License.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# or http://www.opensolaris.org/os/licensing.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# See the License for the specific language governing permissions
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# and limitations under the License.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
0662ed52e814f8f08ef0e09956413a792584eddffuankg# When distributing Covered Code, include this CDDL HEADER in each
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# If applicable, add the following below this CDDL HEADER, with the
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# fields enclosed by brackets "[]" replaced with your own identifying
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# information: Portions Copyright [yyyy] [name of copyright owner]
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# CDDL HEADER END
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Use is subject to license terms.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
70953fb44a7140fe206c3a5f011e24209c8c5c6abnicholes#
70953fb44a7140fe206c3a5f011e24209c8c5c6abnicholes# This makefile drives the production of the
16b55a35cff91315d261d1baa776138af465c4e4fuankg# "/kernel/drv/ahci" kernel module.
16b55a35cff91315d261d1baa776138af465c4e4fuankg#
16b55a35cff91315d261d1baa776138af465c4e4fuankg# intel architecture dependent
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Path to the base of the uts directory tree (usually /usr/src/uts).
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesUTSBASE = ../..
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Define the module and object file sets.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesMODULE = ahci
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesOBJECTS = $(AHCI_OBJS:%=$(OBJS_DIR)/%)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesLINTS = $(AHCI_OBJS:%.o=$(LINTS_DIR)/%.ln)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesCONF_SRCDIR = $(UTSBASE)/common/io/sata/adapters/ahci
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesWARLOCK_OUT = $(AHCI_OBJS:%.o=%.ll)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesWARLOCK_OK = $(MODULE).ok
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesWLCMD_DIR = $(UTSBASE)/common/io/warlock
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Include common rules.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesinclude $(UTSBASE)/intel/Makefile.intel
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Define targets
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesALL_TARGET = $(BINARY)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesLINT_TARGET = $(MODULE).lint
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Overrides.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesDEBUG_FLGS =
ac7985784d08a3655291f24f711812b4d8b1cbcffuankgDEBUG_DEFS += $(DEBUG_FLGS)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# lint pass one enforcement
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesCFLAGS += $(CCVERBOSE)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesCERRWARN += -_gcc=-Wno-parentheses
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesCERRWARN += -_gcc=-Wno-unused-label
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesCERRWARN += -_gcc=-Wno-uninitialized
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# we depend on the sata module
ac7985784d08a3655291f24f711812b4d8b1cbcffuankgLDFLAGS += -dy -N misc/sata
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# For now, disable these lint checks; maintainers should endeavor
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# to investigate and remove these for maximum lint coverage.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Please do not carry these forward to new Makefiles.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Default build targets.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes.KEEP_STATE:
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesdef: $(DEF_DEPS)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesall: $(ALL_DEPS)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesclean: $(CLEAN_DEPS)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesclobber: $(CLOBBER_DEPS)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholeslint: $(LINT_DEPS)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
ac7985784d08a3655291f24f711812b4d8b1cbcffuankgmodlintlib: $(MODLINTLIB_DEPS)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesclean.lint: $(CLEAN_LINT_DEPS)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesinstall: $(INSTALL_DEPS)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes# Include common targets.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesinclude $(UTSBASE)/intel/Makefile.targ
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg#
0662ed52e814f8f08ef0e09956413a792584eddffuankg# Defines for local commands.
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes#
ac7985784d08a3655291f24f711812b4d8b1cbcffuankgWARLOCK = warlock
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesWLCC = wlcc
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesTOUCH = touch
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesTEST = test
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesAHCI_FILES = $(MODULE).ll
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesSD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesSATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesSCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholesCMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
0662ed52e814f8f08ef0e09956413a792584eddffuankgwarlock: $(WARLOCK_OK)
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes$(WARLOCK_OK): $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) warlock_ddi.files \
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes sata.files scsi.files sd.files cmlb.files
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes $(WARLOCK) -c $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) \
0662ed52e814f8f08ef0e09956413a792584eddffuankg $(SD_FILES) \
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes $(SCSI_FILES) \
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes $(CMLB_FILES) \
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes $(SATA_FILES) \
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes -l ../warlock/ddi_dki_impl.ll
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes $(TOUCH) $@
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes%.ll: $(UTSBASE)/common/io/sata/adapters/ahci/%.c
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes $(WLCC) $(CPPFLAGS) -D DEBUG -o $@ $<
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
0662ed52e814f8f08ef0e09956413a792584eddffuankgsata.files:
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes @cd ../sata; pwd; $(MAKE) warlock
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
ac7985784d08a3655291f24f711812b4d8b1cbcffuankgscsi.files:
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes @cd ../scsi; pwd; $(MAKE) warlock
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholessd.files:
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg @cd ../sd; pwd; $(MAKE) warlock_alone
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholescmlb.files:
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes @cd ../cmlb; pwd; $(MAKE) warlock
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholeswarlock_ddi.files:
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes @cd ../warlock; pwd; $(MAKE) warlock
d3fc1a9aec53a772142e2909441b213f3ae8102abnicholes