Makefile revision 152213
1148913Sobrien# $FreeBSD: head/sys/modules/twa/Makefile 152213 2005-11-08 22:51:43Z vkashyap $
2144966Svkashyap#
3144966Svkashyap# Copyright (c) 2004 Applied Micro Circuits Corporation.
4144966Svkashyap# All rights reserved.
5144966Svkashyap#
6144966Svkashyap# Redistribution and use in source and binary forms, with or without
7144966Svkashyap# modification, are permitted provided that the following conditions
8144966Svkashyap# are met:
9144966Svkashyap# 1. Redistributions of source code must retain the above copyright
10144966Svkashyap#    notice, this list of conditions and the following disclaimer.
11144966Svkashyap# 2. Redistributions in binary form must reproduce the above copyright
12144966Svkashyap#    notice, this list of conditions and the following disclaimer in the
13144966Svkashyap#    documentation and/or other materials provided with the distribution.
14144966Svkashyap#
15144966Svkashyap# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16144966Svkashyap# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17144966Svkashyap# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18144966Svkashyap# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19144966Svkashyap# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20144966Svkashyap# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21144966Svkashyap# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22144966Svkashyap# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23144966Svkashyap# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24144966Svkashyap# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25144966Svkashyap# SUCH DAMAGE.
26152213Svkashyap#
27127600Svkashyap
28152213Svkashyap#
29144966Svkashyap# 3ware driver for 9000 series storage controllers.
30152213Svkashyap#
31144966Svkashyap# Author: Vinod Kashyap
32152213Svkashyap#
33144966Svkashyap
34152213Svkashyap
35152213Svkashyap
36152213Svkashyap#
37128086Svkashyap# In the line following this comment, a value of 0 on the right hand
38128086Svkashyap# side will not cause firmware to be bundled.  Change this value to 1
39128086Svkashyap# to bundle the firmware with the driver, which may be flashed onto
40128086Svkashyap# the controller, if the firmware on the controller is older than the
41128086Svkashyap# one bundled, and needs to be upgraded.  The size of the driver will
42128086Svkashyap# increase significantly (to over 500kB) if this option is selected.
43152213Svkashyap# Typically, the firmware image bundled (in tw_cl_fwimg.c) corresponds
44152213Svkashyap# to the latest controller architecture as of the date of the release.
45152213Svkashyap# If the firmware for an earlier controller architecture needs to be
46152213Svkashyap# flashed, the (older) driver with the appropriate firmware image
47152213Svkashyap# bundled can be downloaded from the 3ware website, used to flash the
48152213Svkashyap# firmware, and then the newer driver can be switched to.  Alternatively,
49152213Svkashyap# the appropriate firmware image (tw_cl_fwimg.c) from the older driver can
50152213Svkashyap# be used to re-build the newer driver.  In this case, the branch
51152213Svkashyap# (TWA_CURRENT_FW_BRANCH_*) and build (TWA_CURRENT_FW_BUILD_*) numbers for
52152213Svkashyap# the bundled firmware need to be appropriately updated in tw_cl_fwif.h
53152213Svkashyap# before building the driver.
54127600Svkashyap#
55128082SscottlTWA_FLASH_FIRMWARE?=0
56127600Svkashyap
57127600SvkashyapKMOD = twa
58148913Sobrien.PATH: ${.CURDIR}/../../dev/${KMOD}
59152213SvkashyapSRCS=  tw_osl_freebsd.c tw_osl_cam.c \
60152213Svkashyap      tw_cl_init.c tw_cl_io.c tw_cl_intr.c tw_cl_misc.c \
61152213Svkashyap      bus_if.h device_if.h pci_if.h opt_scsi.h opt_cam.h opt_twa.h
62127600Svkashyap
63152213Svkashyap# Uncomment the following line to turn on Enclosure Services support.
64152213Svkashyap#CFLAGS+= -DTWA_ENCLOSURE_SUPPORT
65152213Svkashyap
66148913Sobrien#CFLAGS+= -DTWA_DEBUG=0
67148913SobrienCFLAGS+= -I${.CURDIR}/../../dev/${KMOD}
68144966Svkashyap
69128082Sscottl.if $(TWA_FLASH_FIRMWARE) != 0
70148913SobrienCFLAGS+= -DTWA_FLASH_FIRMWARE
71152213SvkashyapSRCS+= tw_cl_fwimg.c
72127600Svkashyap.endif
73127600Svkashyap
74127600Svkashyap.include <bsd.kmod.mk>
75152213Svkashyap
76