xref: /illumos-gate/usr/src/uts/intel/qede/Makefile (revision b12258b69ac245658b0ca5ae070b3ff004186148)
1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
11
12#
13# Copyright 2019 Joyent, Inc.
14#
15
16UTSBASE = ../..
17
18MODULE		= qede
19OBJECTS		= $(QEDE_OBJS:%=$(OBJS_DIR)/%) $(QEDE_GEN_OBJS:%=$(OBJS_DIR)/%)
20ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
21CONF_SRCDIR	= $(UTSBASE)/common/io/qede
22
23include $(UTSBASE)/intel/Makefile.intel
24
25#
26# Common definitions that are used by QLogic.
27#
28CPPFLAGS	+= -D__inline=inline
29CPPFLAGS	+= -D_inline=inline
30CPPFLAGS	+= -DILLUMOS
31CPPFLAGS	+= -DECORE_CONFIG_DIRECT_HWFN
32CPPFLAGS	+= -DCONFIG_ECORE_L2
33
34#
35# Includes that are needed
36#
37CPPFLAGS	+= -I$(UTSBASE)/common/io/qede
38CPPFLAGS	+= -I$(UTSBASE)/common/io/qede/579xx/drivers/ecore
39CPPFLAGS	+= -I$(UTSBASE)/common/io/qede/579xx/drivers/ecore/hsi_repository
40CPPFLAGS	+= -I$(UTSBASE)/common/io/qede/579xx/hsi/
41CPPFLAGS	+= -I$(UTSBASE)/common/io/qede/579xx/hsi/hw
42CPPFLAGS	+= -I$(UTSBASE)/common/io/qede/579xx/hsi/mcp
43
44#
45# Temporarily gag these warnings for the moment. We'll work with
46# upstream to get them clean.
47#
48CERRWARN	+= -_gcc=-Wno-unused-variable
49CERRWARN	+= -_gcc=-Wno-unused-function
50
51# 3rd party module
52SMOFF += all_func_returns,indenting,no_if_block,deref_check,testing_index_after_use
53
54# real bug in qede_multicast()
55$(OBJS_DIR)/qede_gld.o := SMOFF += assign_vs_compare
56
57#
58# Unfortunately the default use of -fstack-protector-strong breaks the
59# qede module. For the time being limit its use of stack-protector to
60# the basic form (-fstack-protector).
61#
62STACKPROTECT=basic
63
64ALL_TARGET	= $(BINARY) $(CONFMOD)
65INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
66
67LDFLAGS		+= -dy -N misc/mac
68
69.KEEP_STATE:
70
71def:		$(DEF_DEPS)
72
73all:		$(ALL_DEPS)
74
75clean:		$(CLEAN_DEPS)
76
77clobber:	$(CLOBBER_DEPS)
78
79lint:
80modlintlib:
81clean.lint:
82
83install:	$(INSTALL_DEPS)
84
85include $(UTSBASE)/intel/Makefile.targ
86