xref: /illumos-gate/usr/src/uts/intel/chxge/Makefile (revision b6b206fc7fb36f7b13b01acf70ed6e676e405998)
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#
25# Copyright (c) 2018, Joyent, Inc.
26
27#
28#	This makefile drives the production of the Chelsio N110
29#	10G Ethernet (CH) driver module in x86 systems
30#
31
32#
33#	Paths to the base of the uts directory trees
34#
35UTSBASE   = ../..
36
37#
38#	Define the module and object file sets.
39#
40MODULE		= chxge
41OBJECTS		= $(CH_OBJS:%=$(OBJS_DIR)/%) $(CH_COM_OBJS:%=$(OBJS_DIR)/%)
42LINTS		= $(CH_OBJS:%.o=$(LINTS_DIR)/%.ln) $(CH_COM_OBJS:%.o=$(LINTS_DIR)/%.ln)
43ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
44
45#
46#	Include common rules.
47#
48include $(UTSBASE)/intel/Makefile.intel
49
50#
51#	Define targets
52#
53ALL_TARGET	= $(BINARY)
54LINT_TARGET	= $(MODULE).lint
55INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
56
57CFLAGS		+= -DC99_NOT_SUPPORTED -DCONFIG_CHELSIO_T1_1G \
58		-I$(UTSBASE)/common/io/chxge/ \
59		-I$(UTSBASE)/common/io/chxge/com
60
61CFLAGS		+= -DCONFIG_SMP
62
63CFLAGS		+= -DRX_MAX_COUNT=256
64
65CFLAGS		+= -DCONFIG_CHELSIO_T1_OFFLOAD
66
67CFLAGS		+= -DSUN_KSTATS -DHOST_PAUSE -DTX_CKSUM_FIX -DTX_THREAD_RECLAIM
68
69#	Debug flags
70# CFLAGS		+= -DCH_DEBUG=1 -DPE_DBGOUT_ENABLED=1
71
72#
73#	Driver depends on GLD & IP
74#
75LDFLAGS		+= -dy -N misc/gld -N drv/ip
76
77#	Lint flag
78#
79LINTFLAGS	+= -DC99_NOT_SUPPORTED -DCONFIG_CHELSIO_T1_1G \
80		-I$(UTSBASE)/common/io/chxge/ \
81		-I$(UTSBASE)/common/io/chxge/com
82
83LINTFLAGS	+= -DCONFIG_SMP
84
85LINTFLAGS	+= -DRX_MAX_COUNT=256
86
87LINTFLAGS	+= -DCONFIG_CHELSIO_T1_OFFLOAD
88
89LINTFLAGS	+= -DSUN_KSTATS -DHOST_PAUSE -DTX_CKSUM_FIX -DTX_THREAD_RECLAIM
90
91LINTFLAGS	+= -Xc99=%all
92
93#
94# For now, disable these lint checks; maintainers should endeavor
95# to investigate and remove these for maximum lint coverage.
96# Please do not carry these forward to new Makefiles.
97#
98LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
99LINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
100LINTTAGS	+= -erroff=E_ASSIGN_NARROW_CONV
101LINTTAGS	+= -erroff=E_STATIC_UNUSED
102
103CERRWARN	+= -_gcc=-Wno-unused-label
104CERRWARN	+= -_gcc=-Wno-unused-function
105CERRWARN	+= -_gcc=-Wno-unused-variable
106CERRWARN	+= -_gcc=-Wno-parentheses
107
108SMOFF += indenting,all_func_returns,no_if_block
109
110# needs work
111$(OBJS_DIR)/sge.o := SMOFF += index_overflow
112
113#
114#
115#	Default build targets.
116#
117.KEEP_STATE:
118
119def:		$(DEF_DEPS)
120
121all:		$(ALL_DEPS)
122
123clean:		$(CLEAN_DEPS)
124
125clobber:	$(CLOBBER_DEPS)
126
127lint:		$(LINT_DEPS)
128
129modlintlib:	$(MODLINTLIB_DEPS)
130
131clean.lint:	$(CLEAN_LINT_DEPS)
132
133install:	$(INSTALL_DEPS)
134
135#
136#	Include common targets.
137#
138include $(UTSBASE)/intel/Makefile.targ
139