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# $FreeBSD$ 33fa790ea9SDavid C Somayajulu# 34fa790ea9SDavid C Somayajulu 35fa790ea9SDavid C Somayajulu#.PATH: ${.CURDIR} 36fa790ea9SDavid C Somayajulu#OFEDDIR= /usr/src/sys 37fa790ea9SDavid C Somayajulu#ETHDRVR=${.CURDIR}/../qlnxe 38fa790ea9SDavid C Somayajulu 39fa790ea9SDavid C Somayajulu.PATH: ${SRCTOP}/sys/dev/qlnx/qlnxr 40fa790ea9SDavid C SomayajuluOFEDDIR=${SRCTOP}/sys 41fa790ea9SDavid C SomayajuluETHDRVR=${SRCTOP}/sys/dev/qlnx/qlnxe 42fa790ea9SDavid C Somayajulu 43fa790ea9SDavid C SomayajuluKMOD= qlnxr 4415fe2513SKonstantin BelousovSRCS= \ 45fa790ea9SDavid C Somayajulu qlnxr_os.c\ 46fa790ea9SDavid C Somayajulu qlnxr_cm.c\ 47fa790ea9SDavid C Somayajulu qlnxr_verbs.c 4815fe2513SKonstantin BelousovSRCS+= ${LINUXKPI_GENSRCS} 4915fe2513SKonstantin BelousovSRCS+= opt_inet.h opt_inet6.h 50fa790ea9SDavid C Somayajulu 51fa790ea9SDavid C Somayajulu.include <bsd.kmod.mk> 52fa790ea9SDavid C Somayajulu 53fa790ea9SDavid C SomayajuluCFLAGS+= -I${.CURDIR} 54fa790ea9SDavid C SomayajuluCFLAGS+= -I${ETHDRVR} 55fa790ea9SDavid C SomayajuluCFLAGS+= -I${OFEDDIR}/ofed/include 56fa790ea9SDavid C SomayajuluCFLAGS+= -I${OFEDDIR}/ofed/include/uapi 57*514fb387SBjoern A. ZeebCFLAGS+= ${LINUXKPI_INCLUDES} 58fa790ea9SDavid C Somayajulu 59fa790ea9SDavid C SomayajuluCFLAGS+= -DLINUX_TYPES_DEFINED 60fa790ea9SDavid C SomayajuluCFLAGS+= -DCONFIG_INFINIBAND_USER_MEM 61fa790ea9SDavid C SomayajuluCFLAGS+= -DINET6 -DINET 62fa790ea9SDavid C Somayajulu#CFLAGS+= -DDEFINE_NO_IP_BASED_GIDS 63fa790ea9SDavid C Somayajulu 64fa790ea9SDavid C SomayajuluCWARNEXTRA += -Wno-cast-qual 65fa790ea9SDavid C SomayajuluCWARNEXTRA += -Wno-unused-function 66f4d8b4f8SConrad Meyer.if ${COMPILER_TYPE} == "clang" 67fa790ea9SDavid C SomayajuluCWARNEXTRA += -Wno-gnu-variable-sized-type-not-at-end 68f4d8b4f8SConrad Meyer.endif 69fa790ea9SDavid C SomayajuluCWARNEXTRA += -Wno-missing-prototypes 70f4d8b4f8SConrad MeyerCWARNEXTRA += ${NO_WCONSTANT_CONVERSION} 71fa790ea9SDavid C SomayajuluCWARNEXTRA += -Wno-format 72fa790ea9SDavid C Somayajulu 73f4d8b4f8SConrad MeyerCWARNEXTRA += ${NO_WSHIFT_COUNT_OVERFLOW} 74fa790ea9SDavid C SomayajuluCWARNEXTRA += -Wno-empty-body 75fa790ea9SDavid C Somayajulu 76fa790ea9SDavid C SomayajuluCFLAGS += -DQLNX_DEBUG 77fa790ea9SDavid C SomayajuluCFLAGS += -DECORE_PACKAGE 78fa790ea9SDavid C SomayajuluCFLAGS += -DCONFIG_ECORE_L2 79fa790ea9SDavid C SomayajuluCFLAGS += -DCONFIG_ECORE_LL2 80fa790ea9SDavid C SomayajuluCFLAGS += -DCONFIG_ECORE_ROCE 81fa790ea9SDavid C SomayajuluCFLAGS += -DCONFIG_ECORE_IWARP 82fa790ea9SDavid C SomayajuluCFLAGS += -DCONFIG_ECORE_RDMA 83fa790ea9SDavid C SomayajuluCFLAGS += -DECORE_CONFIG_DIRECT_HWFN 84fa790ea9SDavid C SomayajuluCFLAGS += -g -fno-inline 85fa790ea9SDavid C SomayajuluCFLAGS += -DQLNX_RDMA 86fa790ea9SDavid C Somayajulu 87fa790ea9SDavid C SomayajuluCFLAGS+= -Wno-cast-qual -Wno-pointer-arith 88fa790ea9SDavid C Somayajulu 89