Makefile revision 93c20f2609342fd05f6625f16dfcb9348e7977f2
32N/A#
32N/A# CDDL HEADER START
1339N/A#
32N/A# The contents of this file are subject to the terms of the
32N/A# Common Development and Distribution License (the "License").
919N/A# You may not use this file except in compliance with the License.
919N/A#
919N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
919N/A# or http://www.opensolaris.org/os/licensing.
919N/A# See the License for the specific language governing permissions
919N/A# and limitations under the License.
919N/A#
919N/A# When distributing Covered Code, include this CDDL HEADER in each
919N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
919N/A# If applicable, add the following below this CDDL HEADER, with the
919N/A# fields enclosed by brackets "[]" replaced with your own identifying
919N/A# information: Portions Copyright [yyyy] [name of copyright owner]
919N/A#
919N/A# CDDL HEADER END
919N/A#
919N/A#
919N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
32N/A# Use is subject to license terms.
32N/A#
32N/A# This makefile drives the production of qlc driver kernel module.
32N/A#
493N/A# Path to the base of the uts directory tree (usually /usr/src/uts).
32N/A#
32N/AUTSBASE = ../..
1265N/A
32N/A#
911N/A# Define the module and object file sets.
1265N/A#
1265N/AMODULE = qlc
911N/AOBJECTS = $(QLC_OBJS:%=$(OBJS_DIR)/%)
32N/ALINTS = $(QLC_OBJS:%.o=$(LINTS_DIR)/%.ln)
32N/AROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
32N/ACONF_SRCDIR = $(UTSBASE)/common/io/fibre-channel/fca/qlc
970N/A
970N/A#
970N/A# Include common rules.
970N/A#
970N/Ainclude $(UTSBASE)/Makefile.uts
970N/Ainclude $(UTSBASE)/sparc/Makefile.sparc
1339N/A
1339N/A#
1339N/A# Define targets
32N/A#
32N/AALL_TARGET = $(BINARY) $(CONFMOD) $(ITUMOD)
LINT_TARGET = $(MODULE).lint
INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
#
# header file directories
#
INC_PATH += -I$(ROOT)/usr/include
INC_PATH += -I$(UTSBASE)/common/sys/fibre-channel
INC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/ulp
INC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/fca/qlc
INC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/impl
LDFLAGS += -dy -Nmisc/fctl
#
# Lint tags
#
LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
LINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
FWTABLE = ql_fw_table.c
FWIMAGES = 2200
FWIMAGES += 2300
FWIMAGES += 2400
FWIMAGES += 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)/sparc/Makefile.targ