xref: /illumos-gate/usr/src/uts/intel/qede/Makefile (revision 8226594fdd4479be135127f43632f1f995074654)
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
50CCWARNINLINE	=
51
52# 3rd party module
53SMOFF += all_func_returns,indenting,no_if_block,deref_check,testing_index_after_use
54
55# real bug in qede_multicast()
56$(OBJS_DIR)/qede_gld.o := SMOFF += assign_vs_compare
57
58#
59# Unfortunately the default use of -fstack-protector-strong breaks the
60# qede module. For the time being limit its use of stack-protector to
61# the basic form (-fstack-protector).
62#
63STACKPROTECT=basic
64
65ALL_TARGET	= $(BINARY) $(CONFMOD)
66INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
67
68LDFLAGS		+= -N misc/mac
69
70.KEEP_STATE:
71
72def:		$(DEF_DEPS)
73
74all:		$(ALL_DEPS)
75
76clean:		$(CLEAN_DEPS)
77
78clobber:	$(CLOBBER_DEPS)
79
80install:	$(INSTALL_DEPS)
81
82include $(UTSBASE)/intel/Makefile.targ
83