Makefile revision fcf3ce441efd61da9bb2884968af01cb7c1452cc
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# CDDL HEADER START
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# The contents of this file are subject to the terms of the
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Common Development and Distribution License (the "License").
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# You may not use this file except in compliance with the License.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# or http://www.opensolaris.org/os/licensing.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# See the License for the specific language governing permissions
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# and limitations under the License.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# When distributing Covered Code, include this CDDL HEADER in each
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# If applicable, add the following below this CDDL HEADER, with the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# fields enclosed by brackets "[]" replaced with your own identifying
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# CDDL HEADER END
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Use is subject to license terms.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# ident "@(#)Makefile 1.10 08/07/25 SMI"
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# This makefile drives the production of fcp driver kernel module.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# i86pc architecture dependent
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Path to the base of the uts directory tree (usually /usr/src/uts).
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserUTSBASE = ../..
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Define the module and object file sets.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserMODULE = qlc
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserOBJECTS = $(QLC_OBJS:%=$(OBJS_DIR)/%)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserLINTS = $(QLC_OBJS:%.o=$(LINTS_DIR)/%.ln)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONF_SRCDIR = $(UTSBASE)/common/io/fibre-channel/fca/qlc
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Include common rules.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userinclude $(UTSBASE)/Makefile.uts
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userinclude $(UTSBASE)/intel/Makefile.intel
9d557856c2a19ec95ee73245f60a92f8675cf5baTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Define targets
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserALL_TARGET = $(BINARY) $(CONFMOD) $(ITUMOD)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserLINT_TARGET = $(MODULE).lint
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# header file directories
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntINC_PATH += -I$(ROOT)/usr/include
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/ulp
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/fca
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserINC_PATH += -I$(UTSBASE)/common/sys/fibre-channel/impl
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntLDFLAGS += -dy -Nmisc/fctl
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# Lint tags
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserLINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserFWTABLE = ql_fw_table.c
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserFWIMAGES = 2200
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserFWIMAGES += 2300
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserFWIMAGES += 2400
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserFWIMAGES += 2500
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserFWIMAGES += 6322
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserFWMODULES = $(FWIMAGES:%=$(MODULE)_fw_%)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserFWMODULES_SRC = $(FWIMAGES:%=$(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_%.c)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Default build targets.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User.KEEP_STATE:
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userall: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(ALL_DEPS)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userdef: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(DEF_DEPS)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userclean: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(CLEAN_DEPS)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userclobber: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(CLOBBER_DEPS)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userlint: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(LINT_DEPS)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Usermodlintlib: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(MODLINTLIB_DEPS)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userclean.lint: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(CLEAN_LINT_DEPS)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox Userinstall: $(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c $(INSTALL_DEPS)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User$(SRC)/uts/common/io/fibre-channel/fca/qlc/ql_fw_table.c: $(FWMODULES_SRC)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User /usr/bin/rm -f $@
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User echo '#include <ql_apps.h>' >> $@
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt echo '#include <ql_api.h>' >> $@
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User echo 'struct fw_table fw_table[] = {' >> $@
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User grep FW_VERSION_STRING $(FWMODULES_SRC) |\
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User grep '#define' |\
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User sed 's/[0-9]"/& },/' |\
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User sed 's/.*ql_fw_/{ 0x/' |\
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User sed 's/.c:#define/,/' |\
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User sed 's/FW_VERSION_STRING//' >> $@
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User echo '};' >> $@
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Include common targets.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userinclude $(UTSBASE)/intel/Makefile.targ
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User