xref: /illumos-gate/usr/src/uts/intel/chxge/Makefile (revision 6a817834d81cc75ce12d0d393320837b1fec1e85)
1# CDDL HEADER START
2#
3# The contents of this file are subject to the terms of the
4# Common Development and Distribution License (the "License").
5# You may not use this file except in compliance with the License.
6#
7# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8# or http://www.opensolaris.org/os/licensing.
9# See the License for the specific language governing permissions
10# and limitations under the License.
11#
12# When distributing Covered Code, include this CDDL HEADER in each
13# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14# If applicable, add the following below this CDDL HEADER, with the
15# fields enclosed by brackets "[]" replaced with your own identifying
16# information: Portions Copyright [yyyy] [name of copyright owner]
17#
18# CDDL HEADER END
19#
20
21#
22# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24# Copyright 2018 Joyent, Inc.
25#
26# Copyright (c) 2018, Joyent, Inc.
27
28#
29#	This makefile drives the production of the Chelsio N110
30#	10G Ethernet (CH) driver module in x86 systems
31#
32
33#
34#	Paths to the base of the uts directory trees
35#
36UTSBASE   = ../..
37
38#
39#	Define the module and object file sets.
40#
41MODULE		= chxge
42OBJECTS		= $(CH_OBJS:%=$(OBJS_DIR)/%) $(CH_COM_OBJS:%=$(OBJS_DIR)/%)
43LINTS		= $(CH_OBJS:%.o=$(LINTS_DIR)/%.ln) $(CH_COM_OBJS:%.o=$(LINTS_DIR)/%.ln)
44ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
45
46#
47#	Include common rules.
48#
49include $(UTSBASE)/intel/Makefile.intel
50
51#
52#	Define targets
53#
54ALL_TARGET	= $(BINARY)
55LINT_TARGET	= $(MODULE).lint
56INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
57
58CFLAGS		+= -DC99_NOT_SUPPORTED -DCONFIG_CHELSIO_T1_1G \
59		-I$(UTSBASE)/common/io/chxge/ \
60		-I$(UTSBASE)/common/io/chxge/com
61
62CFLAGS		+= -DCONFIG_SMP
63
64CFLAGS		+= -DRX_MAX_COUNT=256
65
66CFLAGS		+= -DCONFIG_CHELSIO_T1_OFFLOAD
67
68CFLAGS		+= -DSUN_KSTATS -DHOST_PAUSE -DTX_CKSUM_FIX -DTX_THREAD_RECLAIM
69
70#	Debug flags
71# CFLAGS		+= -DCH_DEBUG=1 -DPE_DBGOUT_ENABLED=1
72
73#
74#	Driver depends on GLD, IP, and MAC
75#
76LDFLAGS		+= -dy -N misc/gld -N drv/ip -N misc/mac
77
78#	Lint flag
79#
80LINTFLAGS	+= -DC99_NOT_SUPPORTED -DCONFIG_CHELSIO_T1_1G \
81		-I$(UTSBASE)/common/io/chxge/ \
82		-I$(UTSBASE)/common/io/chxge/com
83
84LINTFLAGS	+= -DCONFIG_SMP
85
86LINTFLAGS	+= -DRX_MAX_COUNT=256
87
88LINTFLAGS	+= -DCONFIG_CHELSIO_T1_OFFLOAD
89
90LINTFLAGS	+= -DSUN_KSTATS -DHOST_PAUSE -DTX_CKSUM_FIX -DTX_THREAD_RECLAIM
91
92LINTFLAGS	+= -Xc99=%all
93
94#
95# For now, disable these lint checks; maintainers should endeavor
96# to investigate and remove these for maximum lint coverage.
97# Please do not carry these forward to new Makefiles.
98#
99LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
100LINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
101LINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
102LINTTAGS	+= -erroff=E_STATIC_UNUSED
103
104CERRWARN	+= -_gcc=-Wno-unused-label
105CERRWARN	+= -_gcc=-Wno-unused-function
106CERRWARN	+= -_gcc=-Wno-unused-variable
107CERRWARN	+= -_gcc=-Wno-parentheses
108
109SMOFF += indenting,all_func_returns,no_if_block
110
111# needs work
112$(OBJS_DIR)/sge.o := SMOFF += index_overflow
113
114#
115#
116#	Default build targets.
117#
118.KEEP_STATE:
119
120def:		$(DEF_DEPS)
121
122all:		$(ALL_DEPS)
123
124clean:		$(CLEAN_DEPS)
125
126clobber:	$(CLOBBER_DEPS)
127
128lint:		$(LINT_DEPS)
129
130modlintlib:	$(MODLINTLIB_DEPS)
131
132clean.lint:	$(CLEAN_LINT_DEPS)
133
134install:	$(INSTALL_DEPS)
135
136#
137#	Include common targets.
138#
139include $(UTSBASE)/intel/Makefile.targ
140