xref: /freebsd/sys/modules/qlnx/qlnxr/Makefile (revision 031beb4e239bfce798af17f5fe8dba8bcaf13d99)
1fa790ea9SDavid C Somayajulu#/*
2fa790ea9SDavid C Somayajulu# * Copyright (c) 2017-2018 Cavium, Inc.
3fa790ea9SDavid C Somayajulu# * All rights reserved.
4fa790ea9SDavid C Somayajulu# *
5fa790ea9SDavid C Somayajulu# *  Redistribution and use in source and binary forms, with or without
6fa790ea9SDavid C Somayajulu# *  modification, are permitted provided that the following conditions
7fa790ea9SDavid C Somayajulu# *  are met:
8fa790ea9SDavid C Somayajulu# *
9fa790ea9SDavid C Somayajulu# *  1. Redistributions of source code must retain the above copyright
10fa790ea9SDavid C Somayajulu# *     notice, this list of conditions and the following disclaimer.
11fa790ea9SDavid C Somayajulu# *  2. Redistributions in binary form must reproduce the above copyright
12fa790ea9SDavid C Somayajulu# *     notice, this list of conditions and the following disclaimer in the
13fa790ea9SDavid C Somayajulu# *     documentation and/or other materials provided with the distribution.
14fa790ea9SDavid C Somayajulu# *
15fa790ea9SDavid C Somayajulu# *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16fa790ea9SDavid C Somayajulu# *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17fa790ea9SDavid C Somayajulu# *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18fa790ea9SDavid C Somayajulu# *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19fa790ea9SDavid C Somayajulu# *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20fa790ea9SDavid C Somayajulu# *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21fa790ea9SDavid C Somayajulu# *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22fa790ea9SDavid C Somayajulu# *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23fa790ea9SDavid C Somayajulu# *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24fa790ea9SDavid C Somayajulu# *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25fa790ea9SDavid C Somayajulu# *  POSSIBILITY OF SUCH DAMAGE.
26fa790ea9SDavid C Somayajulu# */
27fa790ea9SDavid C Somayajulu#/*
28fa790ea9SDavid C Somayajulu# * File : Makefile
29fa790ea9SDavid C Somayajulu# * Author : David C Somayajulu, Cavium, Inc., San Jose, CA 95131.
30fa790ea9SDavid C Somayajulu# */
31fa790ea9SDavid C Somayajulu#
32fa790ea9SDavid C Somayajulu#
33fa790ea9SDavid C Somayajulu
34fa790ea9SDavid C Somayajulu#.PATH:  ${.CURDIR}
35fa790ea9SDavid C Somayajulu#OFEDDIR= /usr/src/sys
36fa790ea9SDavid C Somayajulu#ETHDRVR=${.CURDIR}/../qlnxe
37fa790ea9SDavid C Somayajulu
38fa790ea9SDavid C Somayajulu.PATH: ${SRCTOP}/sys/dev/qlnx/qlnxr
39fa790ea9SDavid C SomayajuluOFEDDIR=${SRCTOP}/sys
40fa790ea9SDavid C SomayajuluETHDRVR=${SRCTOP}/sys/dev/qlnx/qlnxe
41fa790ea9SDavid C Somayajulu
42fa790ea9SDavid C SomayajuluKMOD=   qlnxr
4315fe2513SKonstantin BelousovSRCS=   \
44fa790ea9SDavid C Somayajulu        qlnxr_os.c\
45fa790ea9SDavid C Somayajulu	qlnxr_cm.c\
46fa790ea9SDavid C Somayajulu	qlnxr_verbs.c
4715fe2513SKonstantin BelousovSRCS+=	${LINUXKPI_GENSRCS}
4815fe2513SKonstantin BelousovSRCS+=	opt_inet.h opt_inet6.h
49fa790ea9SDavid C Somayajulu
50fa790ea9SDavid C Somayajulu.include <bsd.kmod.mk>
51fa790ea9SDavid C Somayajulu
52fa790ea9SDavid C SomayajuluCFLAGS+= -I${.CURDIR}
53fa790ea9SDavid C SomayajuluCFLAGS+= -I${ETHDRVR}
54fa790ea9SDavid C SomayajuluCFLAGS+= -I${OFEDDIR}/ofed/include
55fa790ea9SDavid C SomayajuluCFLAGS+= -I${OFEDDIR}/ofed/include/uapi
56*514fb387SBjoern A. ZeebCFLAGS+= ${LINUXKPI_INCLUDES}
57fa790ea9SDavid C Somayajulu
58fa790ea9SDavid C SomayajuluCFLAGS+= -DLINUX_TYPES_DEFINED
59fa790ea9SDavid C SomayajuluCFLAGS+= -DCONFIG_INFINIBAND_USER_MEM
60fa790ea9SDavid C SomayajuluCFLAGS+= -DINET6 -DINET
61fa790ea9SDavid C Somayajulu#CFLAGS+= -DDEFINE_NO_IP_BASED_GIDS
62fa790ea9SDavid C Somayajulu
63fa790ea9SDavid C SomayajuluCWARNEXTRA += -Wno-cast-qual
64fa790ea9SDavid C SomayajuluCWARNEXTRA += -Wno-unused-function
65f4d8b4f8SConrad Meyer.if ${COMPILER_TYPE} == "clang"
66fa790ea9SDavid C SomayajuluCWARNEXTRA += -Wno-gnu-variable-sized-type-not-at-end
67f4d8b4f8SConrad Meyer.endif
68fa790ea9SDavid C SomayajuluCWARNEXTRA += -Wno-missing-prototypes
69f4d8b4f8SConrad MeyerCWARNEXTRA += ${NO_WCONSTANT_CONVERSION}
70fa790ea9SDavid C SomayajuluCWARNEXTRA += -Wno-format
71fa790ea9SDavid C Somayajulu
72f4d8b4f8SConrad MeyerCWARNEXTRA += ${NO_WSHIFT_COUNT_OVERFLOW}
73fa790ea9SDavid C SomayajuluCWARNEXTRA += -Wno-empty-body
74fa790ea9SDavid C Somayajulu
75fa790ea9SDavid C SomayajuluCFLAGS += -DQLNX_DEBUG
76fa790ea9SDavid C SomayajuluCFLAGS += -DECORE_PACKAGE
77fa790ea9SDavid C SomayajuluCFLAGS += -DCONFIG_ECORE_L2
78fa790ea9SDavid C SomayajuluCFLAGS += -DCONFIG_ECORE_LL2
79fa790ea9SDavid C SomayajuluCFLAGS += -DCONFIG_ECORE_ROCE
80fa790ea9SDavid C SomayajuluCFLAGS += -DCONFIG_ECORE_IWARP
81fa790ea9SDavid C SomayajuluCFLAGS += -DCONFIG_ECORE_RDMA
82fa790ea9SDavid C SomayajuluCFLAGS += -DECORE_CONFIG_DIRECT_HWFN
83fa790ea9SDavid C SomayajuluCFLAGS += -g -fno-inline
84fa790ea9SDavid C SomayajuluCFLAGS += -DQLNX_RDMA
85fa790ea9SDavid C Somayajulu
86fa790ea9SDavid C SomayajuluCFLAGS+= -Wno-cast-qual -Wno-pointer-arith
87fa790ea9SDavid C Somayajulu
88