Makefile revision 89b43686db1fe9681d80a7cf5662730cb9378cae
4182N/A#
4182N/A# CDDL HEADER START
4182N/A#
4182N/A# The contents of this file are subject to the terms of the
4182N/A# Common Development and Distribution License (the "License").
4182N/A# You may not use this file except in compliance with the License.
4182N/A#
4182N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4182N/A# or http://www.opensolaris.org/os/licensing.
4182N/A# See the License for the specific language governing permissions
4182N/A# and limitations under the License.
4182N/A#
4182N/A# When distributing Covered Code, include this CDDL HEADER in each
4182N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4182N/A# If applicable, add the following below this CDDL HEADER, with the
4182N/A# fields enclosed by brackets "[]" replaced with your own identifying
4182N/A# information: Portions Copyright [yyyy] [name of copyright owner]
4182N/A#
4182N/A# CDDL HEADER END
4182N/A#
4182N/A#
6568N/A# uts/sparc/ssd/Makefile
4182N/A#
4182N/A# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
4182N/A# Use is subject to license terms.
4182N/A# Copyright (c) 2011 Bayard G. Bell. All rights reserved.
4182N/A#
4182N/A
4182N/A#
4182N/A# This makefile drives the production of the ssd driver kernel module.
4182N/A#
4182N/A# sparc architecture dependent
4182N/A#
4182N/A
4182N/A#
4182N/A# Path to the base of the uts directory tree (usually /usr/src/uts).
4182N/A#
4182N/AUTSBASE = ../..
4182N/A
4182N/A#
4182N/A# Define the module and object file sets.
4182N/A#
4182N/AMODULE = ssd
6568N/AOBJECTS = $(SSD_OBJS:%=$(OBJS_DIR)/%)
4182N/ALINTS = $(SSD_OBJS:%.o=$(LINTS_DIR)/%.ln)
4182N/AROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
4182N/ACONF_SRCDIR = $(UTSBASE)/sun/io/scsi/targets
4182N/AWARLOCK_OUT = ssd.ll
4182N/AWARLOCK_OK = $(MODULE).ok
4182N/AWLCMD_DIR = $(UTSBASE)/common/io/warlock
4182N/A
4182N/A#
4182N/A# Include common rules.
4182N/A#
4182N/Ainclude $(UTSBASE)/sparc/Makefile.sparc
4182N/A
4182N/A#
4182N/A# Define targets
4182N/A#
4182N/AALL_TARGET = $(BINARY) $(SRC_CONFILE)
4182N/ALINT_TARGET = $(MODULE).lint
4182N/AINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
4182N/A
4182N/A#
4182N/A# lint pass one enforcement
4182N/A#
6568N/ACFLAGS += $(CCVERBOSE) -D__fibre -dalign
6568N/ALINTFLAGS += -D__fibre
4182N/AWLCCFLAGS = -D__fibre
4182N/A
4182N/A#
4182N/A# For now, disable these lint checks; maintainers should endeavor
4182N/A# to investigate and remove these for maximum lint coverage.
4182N/A# Please do not carry these forward to new Makefiles.
4182N/A#
4182N/ALINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
4182N/ALINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
4182N/ALINTTAGS += -erroff=E_STATIC_UNUSED
4182N/ALINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
4182N/A
4182N/A#
4182N/A# Depends on scsi and cmlb
4182N/A# fcp included for fibre support
4182N/A#
4182N/ALDFLAGS += -dy -N misc/scsi -N misc/cmlb -N drv/fcp
4182N/A
4182N/A#
4182N/A# Default build targets.
4182N/A#
4182N/A.KEEP_STATE:
4182N/A
4182N/Aall: $(ALL_DEPS)
def: $(DEF_DEPS)
clean: $(CLEAN_DEPS)
$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
clobber: $(CLOBBER_DEPS)
$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
lint: $(LINT_DEPS)
modlintlib: $(MODLINTLIB_DEPS)
clean.lint: $(CLEAN_LINT_DEPS)
install: $(INSTALL_DEPS)
#
# Include common targets.
#
include $(UTSBASE)/sparc/Makefile.targ
browser: $(BINARY)
browser := CFLAGS += -xsb
#
# Defines for local commands.
#
WARLOCK = warlock
WLCC = wlcc
TOUCH = touch
TEST = test
#
# Warlock targets
SCSI_FILES = $(SCSI_OBJS:%.o=-l ../scsi/%.ll)
CMLB_FILES = $(CMLB_OBJS:%.o=-l ../cmlb/%.ll)
warlock: warlock_alone
warlock_alone: $(WARLOCK_OK)
scsi_files:
@cd ../scsi; pwd; $(MAKE) warlock
cmlb_files:
@cd ../cmlb; pwd; $(MAKE) warlock
$(WARLOCK_OK): $(WLCMD_DIR)/ssd.wlcmd $(WARLOCK_OUT) scsi.files cmlb_files
$(WARLOCK) -c $(WLCMD_DIR)/ssd.wlcmd $(WARLOCK_OUT) \
$(SCSI_FILES) $(CMLB_FILES) \
-l ../warlock/ddi_dki_impl.ll
$(TOUCH) $@
ssd.ll: $(UTSBASE)/common/io/scsi/targets/sd.c
$(WLCC) $(CPPFLAGS) $(WLCCFLAGS) -DDEBUG -o $@ $(UTSBASE)/common/io/scsi/targets/sd.c
warlock_ddi.files:
@cd ../warlock; pwd; $(MAKE) warlock
scsi.files:
@cd ../scsi; pwd; $(MAKE) warlock