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