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