xref: /titanic_44/usr/src/uts/sparc/xge/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
1a23fd118Syl150051#
2a23fd118Syl150051# CDDL HEADER START
3a23fd118Syl150051#
4a23fd118Syl150051# The contents of this file are subject to the terms of the
5a23fd118Syl150051# Common Development and Distribution License (the "License").
6a23fd118Syl150051# You may not use this file except in compliance with the License.
7a23fd118Syl150051#
8a23fd118Syl150051# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9a23fd118Syl150051# or http://www.opensolaris.org/os/licensing.
10a23fd118Syl150051# See the License for the specific language governing permissions
11a23fd118Syl150051# and limitations under the License.
12a23fd118Syl150051#
13a23fd118Syl150051# When distributing Covered Code, include this CDDL HEADER in each
14a23fd118Syl150051# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15a23fd118Syl150051# If applicable, add the following below this CDDL HEADER, with the
16a23fd118Syl150051# fields enclosed by brackets "[]" replaced with your own identifying
17a23fd118Syl150051# information: Portions Copyright [yyyy] [name of copyright owner]
18a23fd118Syl150051#
19a23fd118Syl150051# CDDL HEADER END
20a23fd118Syl150051#
21a23fd118Syl150051
22a23fd118Syl150051#
23da14cebeSEric Cheng# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24a23fd118Syl150051# Use is subject to license terms.
25a23fd118Syl150051#
26a23fd118Syl150051#	This makefile drives the production of the Neterion Xframe
27a23fd118Syl150051#	10G Ethernet (XGE) driver module in x86 systems
28a23fd118Syl150051#
29a23fd118Syl150051
30a23fd118Syl150051#
31a23fd118Syl150051#	Paths to the base of the uts directory trees
32a23fd118Syl150051#
33a23fd118Syl150051UTSBASE   = ../..
34a23fd118Syl150051
35a23fd118Syl150051#
36a23fd118Syl150051#	Define the module and object file sets.
37a23fd118Syl150051#
38a23fd118Syl150051MODULE		= xge
39a23fd118Syl150051OBJECTS		= $(XGE_HAL_OBJS:%=$(OBJS_DIR)/%) $(XGE_OBJS:%=$(OBJS_DIR)/%)
40a23fd118Syl150051LINTS		= $(XGE_HAL_OBJS:%.o=$(LINTS_DIR)/%.ln) $(XGE_OBJS:%.o=$(LINTS_DIR)/%.ln)
41a23fd118Syl150051ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
42a23fd118Syl150051
43a23fd118Syl150051#
44a23fd118Syl150051#	Include common rules.
45a23fd118Syl150051#
46a23fd118Syl150051include $(UTSBASE)/sparc/Makefile.sparc
47a23fd118Syl150051
48a23fd118Syl150051#
49a23fd118Syl150051#	Define targets
50a23fd118Syl150051#
51a23fd118Syl150051ALL_TARGET	= $(BINARY)
52a23fd118Syl150051LINT_TARGET	= $(MODULE).lint
53a23fd118Syl150051INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
54a23fd118Syl150051
55a23fd118Syl150051#
56a23fd118Syl150051#	GENERAL PURPOUSE HAL FLAGS: Tuning HAL for Solaris specific modes
57a23fd118Syl150051#
58a23fd118Syl150051HAL_CFLAGS	 = -DXGE_HAL_USE_MGMT_AUX
59a23fd118Syl150051
60a23fd118Syl150051#
61a23fd118Syl150051#	TRACE SECTION: Possible values for MODULE, TRACE and ERR masks:
62a23fd118Syl150051#
63a23fd118Syl150051# XGE_COMPONENT_HAL_CONFIG		0x1
64a23fd118Syl150051# XGE_COMPONENT_HAL_FIFO		0x2
65a23fd118Syl150051# XGE_COMPONENT_HAL_RING		0x4
66a23fd118Syl150051# XGE_COMPONENT_HAL_CHANNEL		0x8
67a23fd118Syl150051# XGE_COMPONENT_HAL_DEVICE		0x10
68a23fd118Syl150051# XGE_COMPONENT_HAL_MM			0x20
69a23fd118Syl150051# XGE_COMPONENT_HAL_QUEUE		0x40
70a23fd118Syl150051# XGE_COMPONENT_HAL_STATS		0x100
71a23fd118Syl150051# XGE_COMPONENT_OSDEP			0x1000
72a23fd118Syl150051# XGE_COMPONENT_LL			0x2000
73a23fd118Syl150051# XGE_COMPONENT_TOE			0x4000
74a23fd118Syl150051# XGE_COMPONENT_RDMA			0x8000
75a23fd118Syl150051# XGE_COMPONENT_ALL			0xffffffff
76a23fd118Syl150051#TRACE_CFLAGS = -DXGE_DEBUG_MODULE_MASK=0xffffffff \
77a23fd118Syl150051#		-DXGE_DEBUG_TRACE_MASK=0xffffffff \
78a23fd118Syl150051#		-DXGE_DEBUG_ERR_MASK=0xffffffff
79a23fd118Syl150051TRACE_CFLAGS 	= -DXGE_DEBUG_MODULE_MASK=0x00003010 \
80a23fd118Syl150051		-DXGE_DEBUG_TRACE_MASK=0x00000000  \
81a23fd118Syl150051		-DXGE_DEBUG_ERR_MASK=0x00003010
82a23fd118Syl150051
838347601bSyl150051XGE_CFLAGS	= $(HAL_CFLAGS) $(TRACE_CFLAGS) $(CCVERBOSE) \
84a23fd118Syl150051		-I$(UTSBASE)/common/io/xge/hal/include \
85a23fd118Syl150051		-I$(UTSBASE)/common/io/xge/hal/xgehal \
86a23fd118Syl150051		-I$(UTSBASE)/common/io/xge/drv -DSOLARIS
87a23fd118Syl150051
888347601bSyl150051CFLAGS		+= $(XGE_CFLAGS) -xO4 -xcrossfile -xc99=%all
898347601bSyl150051CFLAGS64	+= $(XGE_CFLAGS) -xO4 -xcrossfile -xc99=%all
90a23fd118Syl150051
91a23fd118Syl150051#
92a23fd118Syl150051#	Driver depends on MAC & IP
93a23fd118Syl150051#
94a23fd118Syl150051LDFLAGS		+=  -dy -N misc/mac -N drv/ip
95a23fd118Syl150051
96a23fd118Syl150051#	Lint flag
97a23fd118Syl150051#
988347601bSyl150051LINTFLAGS	+= $(XGE_CFLAGS) -Xc99=%all
99a23fd118Syl150051
100a23fd118Syl150051#
101bb25c06cSjg# For now, disable these lint checks; maintainers should endeavor
102bb25c06cSjg# to investigate and remove these for maximum lint coverage.
103bb25c06cSjg# Please do not carry these forward to new Makefiles.
104bb25c06cSjg#
105bb25c06cSjgLINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
106bb25c06cSjgLINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
107bb25c06cSjgLINTTAGS	+= -erroff=E_STATIC_UNUSED
108bb25c06cSjg
109*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
110*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-variable
111*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-label
112*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-empty-body
113*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
114*7014882cSRichard Lowe
115bb25c06cSjg#
116a23fd118Syl150051#
117a23fd118Syl150051#	Default build targets.
118a23fd118Syl150051#
119a23fd118Syl150051.KEEP_STATE:
120a23fd118Syl150051
121a23fd118Syl150051def:		$(DEF_DEPS)
122a23fd118Syl150051
123a23fd118Syl150051all:		$(ALL_DEPS)
124a23fd118Syl150051
125a23fd118Syl150051clean:		$(CLEAN_DEPS)
126a23fd118Syl150051
127a23fd118Syl150051clobber:	$(CLOBBER_DEPS)
128a23fd118Syl150051
129a23fd118Syl150051lint:		$(LINT_DEPS)
130a23fd118Syl150051
131a23fd118Syl150051modlintlib:	$(MODLINTLIB_DEPS)
132a23fd118Syl150051
133a23fd118Syl150051clean.lint:	$(CLEAN_LINT_DEPS)
134a23fd118Syl150051
135a23fd118Syl150051install:	$(INSTALL_DEPS)
136a23fd118Syl150051
137a23fd118Syl150051#
138a23fd118Syl150051#	Include common targets.
139a23fd118Syl150051#
140a23fd118Syl150051include $(UTSBASE)/sparc/Makefile.targ
141