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