Makefile revision fcf3ce441efd61da9bb2884968af01cb7c1452cc
183N/A#
268N/A# CDDL HEADER START
268N/A#
268N/A# The contents of this file are subject to the terms of the
268N/A# Common Development and Distribution License (the "License").
268N/A# You may not use this file except in compliance with the License.
268N/A#
268N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
268N/A# or http://www.opensolaris.org/os/licensing.
268N/A# See the License for the specific language governing permissions
268N/A# and limitations under the License.
268N/A#
268N/A# When distributing Covered Code, include this CDDL HEADER in each
268N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
268N/A# If applicable, add the following below this CDDL HEADER, with the
268N/A# fields enclosed by brackets "[]" replaced with your own identifying
268N/A# information: Portions Copyright [yyyy] [name of copyright owner]
268N/A#
268N/A# CDDL HEADER END
268N/A#
268N/A#
268N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
268N/A# Use is subject to license terms.
183N/A#
183N/A# ident "@(#)Makefile 1.10 08/07/25 SMI"
183N/A#
183N/A# This makefile drives the production of fcp driver kernel module.
183N/A#
183N/A# i86pc architecture dependent
2080N/A#
183N/A
183N/A#
183N/A# Path to the base of the uts directory tree (usually /usr/src/uts).
183N/A#
183N/AUTSBASE = ../..
183N/A
183N/A#
183N/A# Define the module and object file sets.
183N/A#
183N/AMODULE = qlc
183N/AOBJECTS = $(QLC_OBJS:%=$(OBJS_DIR)/%)
183N/ALINTS = $(QLC_OBJS:%.o=$(LINTS_DIR)/%.ln)
183N/AROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
183N/ACONF_SRCDIR = $(UTSBASE)/common/io/fibre-channel/fca/qlc
183N/A
183N/A#
183N/A# Include common rules.
183N/A#
183N/Ainclude $(UTSBASE)/Makefile.uts
183N/Ainclude $(UTSBASE)/intel/Makefile.intel
183N/A
183N/A#
183N/A# Define targets
268N/A#
183N/AALL_TARGET = $(BINARY) $(CONFMOD) $(ITUMOD)
183N/ALINT_TARGET = $(MODULE).lint
183N/AINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
183N/A
183N/A#
183N/A# header file directories
183N/A#
183N/AINC_PATH += -I$(ROOT)/usr/include
183N/AINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel
183N/AINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/ulp
183N/AINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/fca
183N/AINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/impl
183N/A
183N/ALDFLAGS += -dy -Nmisc/fctl
183N/A
268N/A#
183N/A# Lint tags
183N/A#
183N/ALINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
183N/ALINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
183N/A
183N/AFWTABLE = ql_fw_table.c
183N/AFWIMAGES = 2200
183N/AFWIMAGES += 2300
183N/AFWIMAGES += 2400
183N/AFWIMAGES += 2500
FWIMAGES += 6322
FWMODULES = $(FWIMAGES:%=$(MODULE)_fw_%)
FWMODULES_SRC = $(FWIMAGES:%=$(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_%.c)
#
# Default build targets.
#
.KEEP_STATE:
all: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(ALL_DEPS)
def: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(DEF_DEPS)
clean: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(CLEAN_DEPS)
clobber: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(CLOBBER_DEPS)
lint: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(LINT_DEPS)
modlintlib: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(MODLINTLIB_DEPS)
clean.lint: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(CLEAN_LINT_DEPS)
install: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(INSTALL_DEPS)
$(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c: $(FWMODULES_SRC)
/usr/bin/rm -f $@
echo '#include <ql_apps.h>' >> $@
echo '#include <ql_api.h>' >> $@
echo 'struct fw_table fw_table[] = {' >> $@
grep FW_VERSION_STRING $(FWMODULES_SRC) |\
grep '#define' |\
sed 's/[0-9]"/& },/' |\
sed 's/.*ql_fw_/{ 0x/' |\
sed 's/.c:#define/,/' |\
sed 's/FW_VERSION_STRING//' >> $@
echo '};' >> $@
#
# Include common targets.
#
include $(UTSBASE)/intel/Makefile.targ