Makefile revision 4e942d8cd27c7f8bb80549d7c2564445f19ba4a3
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# CDDL HEADER START
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa# The contents of this file are subject to the terms of the
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa# Common Development and Distribution License (the "License").
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# You may not use this file except in compliance with the License.
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# or http://www.opensolaris.org/os/licensing.
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa# See the License for the specific language governing permissions
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa# and limitations under the License.
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# When distributing Covered Code, include this CDDL HEADER in each
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# If applicable, add the following below this CDDL HEADER, with the
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# fields enclosed by brackets "[]" replaced with your own identifying
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa# information: Portions Copyright [yyyy] [name of copyright owner]
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# CDDL HEADER END
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa# Use is subject to license terms.
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# ident "%Z%%M% %I% %E% SMI"
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# This makefile drives the production of the
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# "/kernel/drv/ahci" kernel module.
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# intel architecture dependent
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa#
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa# Path to the base of the uts directory tree (usually /usr/src/uts).
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaUTSBASE = ../..
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa# Define the module and object file sets.
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaMODULE = ahci
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaOBJECTS = $(AHCI_OBJS:%=$(OBJS_DIR)/%)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaLINTS = $(AHCI_OBJS:%.o=$(LINTS_DIR)/%.ln)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaCONF_SRCDIR = $(UTSBASE)/common/io/sata/adapters/ahci
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaWARLOCK_OUT = $(AHCI_OBJS:%.o=%.ll)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaWARLOCK_OK = $(MODULE).ok
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaWLCMD_DIR = $(UTSBASE)/common/io/warlock
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# Include common rules.
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksainclude $(UTSBASE)/intel/Makefile.intel
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# Define targets
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
db149239590d2a39d399f12cd01609b190ea4763Eugen KuksaALL_TARGET = $(BINARY)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaLINT_TARGET = $(MODULE).lint
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# Overrides.
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaDEBUG_FLGS =
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaDEBUG_DEFS += $(DEBUG_FLGS)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# lint pass one enforcement
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaCFLAGS += $(CCVERBOSE)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# we depend on the sata module
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaLDFLAGS += -dy -N misc/sata
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# For now, disable these lint checks; maintainers should endeavor
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# to investigate and remove these for maximum lint coverage.
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# Please do not carry these forward to new Makefiles.
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
db149239590d2a39d399f12cd01609b190ea4763Eugen KuksaLINTTAGS += -erroff=E_STATIC_UNUSED
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa# Default build targets.
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa.KEEP_STATE:
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksadef: $(DEF_DEPS)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksaall: $(ALL_DEPS)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksaclean: $(CLEAN_DEPS)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksaclobber: $(CLOBBER_DEPS)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
db149239590d2a39d399f12cd01609b190ea4763Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksalint: $(LINT_DEPS)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksamodlintlib: $(MODLINTLIB_DEPS)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksaclean.lint: $(CLEAN_LINT_DEPS)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksainstall: $(INSTALL_DEPS)
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa#
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa# Include common targets.
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksainclude $(UTSBASE)/intel/Makefile.targ
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa# Defines for local commands.
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa#
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaWARLOCK = warlock
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaWLCC = wlcc
23305f217b86a2ebf90a848af9036908e0070542Eugen KuksaTOUCH = touch
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaSCCS = sccs
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaTEST = test
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen KuksaAHCI_FILES = $(MODULE).ll
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen KuksaSD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen KuksaSATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaSCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen KuksaCMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksawarlock: $(WARLOCK_OK)
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa%.wlcmd:
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa cd $(WLCMD_DIR); $(TEST) -f $@ || $(SCCS) get $@
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa$(WARLOCK_OK): ahci.wlcmd $(WARLOCK_OUT) warlock_ddi.files \
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa sata.files scsi.files sd.files cmlb.files
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa $(WARLOCK) -c $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) \
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa $(SD_FILES) \
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa $(SCSI_FILES) \
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa $(CMLB_FILES) \
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa $(SATA_FILES) \
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa -l ../warlock/ddi_dki_impl.ll
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa $(TOUCH) $@
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa%.ll: $(UTSBASE)/common/io/sata/adapters/ahci/%.c
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa $(WLCC) $(CPPFLAGS) -D DEBUG -o $@ $<
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
db149239590d2a39d399f12cd01609b190ea4763Eugen Kuksasata.files:
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa @cd ../sata; pwd; $(MAKE) warlock
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksascsi.files:
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa @cd ../scsi; pwd; $(MAKE) warlock
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksasd.files:
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa @cd ../sd; pwd; $(MAKE) warlock_alone
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksacmlb.files:
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa @cd ../cmlb; pwd; $(MAKE) warlock
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksawarlock_ddi.files:
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa @cd ../warlock; pwd; $(MAKE) warlock
6f834e8d872b867ccae54a7a848e1db3f7857286Eugen Kuksa