6498N/A# CDDL HEADER START
6498N/A#
6498N/A# The contents of this file are subject to the terms of the
6498N/A# Common Development and Distribution License (the "License").
6498N/A# You may not use this file except in compliance with the License.
6498N/A#
6498N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6498N/A# or http://www.opensolaris.org/os/licensing.
6498N/A# See the License for the specific language governing permissions
6498N/A# and limitations under the License.
6498N/A#
6498N/A# When distributing Covered Code, include this CDDL HEADER in each
6498N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6498N/A# If applicable, add the following below this CDDL HEADER, with the
6498N/A# fields enclosed by brackets "[]" replaced with your own identifying
6498N/A# information: Portions Copyright [yyyy] [name of copyright owner]
6498N/A#
6498N/A# CDDL HEADER END
6498N/A#
6498N/A
6498N/A#
6498N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
6498N/A# Use is subject to license terms.
6498N/A#
6498N/A
6498N/A#
6498N/A# uts/sparc/ahci/Makefile
6498N/A#
6498N/A# This makefile drives the production of the
6498N/A# "/kernel/drv/ahci" kernel module.
6498N/A#
6498N/A# sparc architecture dependent
6498N/A#
6498N/A
6498N/A#
6498N/A# Path to the base of the uts directory tree (usually /usr/src/uts).
6498N/A#
6498N/AUTSBASE = ../..
6498N/A
6498N/A#
6498N/A# Define the module and object file sets.
6498N/A#
6498N/AMODULE = ahci
6498N/AOBJECTS = $(AHCI_OBJS:%=$(OBJS_DIR)/%)
6498N/ALINTS = $(AHCI_OBJS:%.o=$(LINTS_DIR)/%.ln)
6498N/AWARLOCK_OUT = $(AHCI_OBJS:%.o=%.ll)
6498N/AWARLOCK_OK = $(MODULE).ok
6498N/AROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
6498N/ACONF_SRCDIR = $(UTSBASE)/common/io/sata/adapters/ahci
6498N/AWLCMD_DIR = $(UTSBASE)/common/io/warlock
6498N/A
6498N/A#
6498N/A# Include common rules.
6498N/A#
6498N/Ainclude $(UTSBASE)/sparc/Makefile.sparc
6498N/A
6498N/A#
6498N/A# Define targets
6498N/A#
6498N/AALL_TARGET = $(BINARY)
6498N/ALINT_TARGET = $(MODULE).lint
6498N/AINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
6498N/A
6498N/A#
6498N/A# Overrides.
6498N/A#
6498N/ADEBUG_FLGS =
6498N/ADEBUG_DEFS += $(DEBUG_FLGS)
6498N/A
6498N/A#
6498N/A# lint pass one enforcement
6498N/A#
6498N/ACFLAGS += $(CCVERBOSE)
6498N/A
6498N/ACERRWARN += -_gcc=-Wno-parentheses
6498N/ACERRWARN += -_gcc=-Wno-unused-label
6498N/ACERRWARN += -_gcc=-Wno-uninitialized
6498N/A
6498N/A#
6498N/A# Default build targets.
6498N/A#
6498N/A.KEEP_STATE:
6498N/A
6498N/Adef: $(DEF_DEPS)
6498N/A
6498N/Aall: $(ALL_DEPS)
6498N/A
6498N/Aclean: $(CLEAN_DEPS)
6498N/A $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
6498N/A
6498N/Aclobber: $(CLOBBER_DEPS)
6498N/A $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
6498N/A
6498N/Alint: $(LINT_DEPS)
6498N/A
6498N/Amodlintlib: $(MODLINTLIB_DEPS)
clean.lint: $(CLEAN_LINT_DEPS)
install: $(INSTALL_DEPS)
#
# Include common targets.
#
include $(UTSBASE)/sparc/Makefile.targ
#
# Defines for local commands.
#
WARLOCK = warlock
WLCC = wlcc
TOUCH = touch
TEST = test
SD_FILES = $(SD_OBJS:%.o=../sd/%.ll)
SATA_FILES = $(SATA_OBJS:%.o=-l ../sata/%.ll)
SCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
CMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
warlock: $(WARLOCK_OK)
$(WARLOCK_OK): $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) warlock_ddi.files \
sata.files scsi.files sd.files cmlb.files
$(WARLOCK) -c $(WLCMD_DIR)/ahci.wlcmd $(WARLOCK_OUT) \
$(SD_FILES) \
$(SCSI_FILES) \
$(CMLB_FILES) \
$(SATA_FILES) \
-l ../warlock/ddi_dki_impl.ll
$(TOUCH) $@
%.ll: $(UTSBASE)/common/io/sata/adapters/ahci/%.c
$(WLCC) $(CPPFLAGS) -D DEBUG -D __sparcv9 -o $@ $<
sata.files:
@cd ../sata; pwd; $(MAKE) warlock
scsi.files:
@cd ../scsi; pwd; $(MAKE) warlock
sd.files:
@cd ../sd; pwd; $(MAKE) warlock_alone
cmlb.files:
@cd ../cmlb; pwd; $(MAKE) warlock
warlock_ddi.files:
@cd ../warlock; pwd; $(MAKE) warlock