xref: /titanic_44/usr/src/uts/sparc/xge/Makefile (revision 8347601bcb0a439f6e50fc36b4039a73d08700e1)
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#
23a23fd118Syl150051# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24a23fd118Syl150051# Use is subject to license terms.
25a23fd118Syl150051#
26a23fd118Syl150051# ident	"%Z%%M%	%I%	%E% SMI"
27a23fd118Syl150051#
28a23fd118Syl150051#	This makefile drives the production of the Neterion Xframe
29a23fd118Syl150051#	10G Ethernet (XGE) driver module in x86 systems
30a23fd118Syl150051#
31a23fd118Syl150051
32a23fd118Syl150051#
33a23fd118Syl150051#	Paths to the base of the uts directory trees
34a23fd118Syl150051#
35a23fd118Syl150051UTSBASE   = ../..
36a23fd118Syl150051
37a23fd118Syl150051#
38a23fd118Syl150051#	Define the module and object file sets.
39a23fd118Syl150051#
40a23fd118Syl150051MODULE		= xge
41a23fd118Syl150051OBJECTS		= $(XGE_HAL_OBJS:%=$(OBJS_DIR)/%) $(XGE_OBJS:%=$(OBJS_DIR)/%)
42a23fd118Syl150051LINTS		= $(XGE_HAL_OBJS:%.o=$(LINTS_DIR)/%.ln) $(XGE_OBJS:%.o=$(LINTS_DIR)/%.ln)
43a23fd118Syl150051ROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
44a23fd118Syl150051
45a23fd118Syl150051#
46a23fd118Syl150051#	Include common rules.
47a23fd118Syl150051#
48a23fd118Syl150051include $(UTSBASE)/sparc/Makefile.sparc
49a23fd118Syl150051
50a23fd118Syl150051#
51a23fd118Syl150051#	Define targets
52a23fd118Syl150051#
53a23fd118Syl150051ALL_TARGET	= $(BINARY)
54a23fd118Syl150051LINT_TARGET	= $(MODULE).lint
55a23fd118Syl150051INSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
56a23fd118Syl150051
57a23fd118Syl150051#
58a23fd118Syl150051#	GENERAL PURPOUSE HAL FLAGS: Tuning HAL for Solaris specific modes
59a23fd118Syl150051#
60a23fd118Syl150051HAL_CFLAGS	 = -DXGE_HAL_USE_MGMT_AUX
61a23fd118Syl150051
62a23fd118Syl150051#
63a23fd118Syl150051#	TRACE SECTION: Possible values for MODULE, TRACE and ERR masks:
64a23fd118Syl150051#
65a23fd118Syl150051# XGE_COMPONENT_HAL_CONFIG		0x1
66a23fd118Syl150051# XGE_COMPONENT_HAL_FIFO		0x2
67a23fd118Syl150051# XGE_COMPONENT_HAL_RING		0x4
68a23fd118Syl150051# XGE_COMPONENT_HAL_CHANNEL		0x8
69a23fd118Syl150051# XGE_COMPONENT_HAL_DEVICE		0x10
70a23fd118Syl150051# XGE_COMPONENT_HAL_MM			0x20
71a23fd118Syl150051# XGE_COMPONENT_HAL_QUEUE		0x40
72a23fd118Syl150051# XGE_COMPONENT_HAL_STATS		0x100
73a23fd118Syl150051# XGE_COMPONENT_OSDEP			0x1000
74a23fd118Syl150051# XGE_COMPONENT_LL			0x2000
75a23fd118Syl150051# XGE_COMPONENT_TOE			0x4000
76a23fd118Syl150051# XGE_COMPONENT_RDMA			0x8000
77a23fd118Syl150051# XGE_COMPONENT_ALL			0xffffffff
78a23fd118Syl150051#TRACE_CFLAGS = -DXGE_DEBUG_MODULE_MASK=0xffffffff \
79a23fd118Syl150051#		-DXGE_DEBUG_TRACE_MASK=0xffffffff \
80a23fd118Syl150051#		-DXGE_DEBUG_ERR_MASK=0xffffffff
81a23fd118Syl150051TRACE_CFLAGS 	= -DXGE_DEBUG_MODULE_MASK=0x00003010 \
82a23fd118Syl150051		-DXGE_DEBUG_TRACE_MASK=0x00000000  \
83a23fd118Syl150051		-DXGE_DEBUG_ERR_MASK=0x00003010
84a23fd118Syl150051
85*8347601bSyl150051XGE_CFLAGS	= $(HAL_CFLAGS) $(TRACE_CFLAGS) $(CCVERBOSE) \
86a23fd118Syl150051		-I$(UTSBASE)/common/io/xge/hal/include \
87a23fd118Syl150051		-I$(UTSBASE)/common/io/xge/hal/xgehal \
88a23fd118Syl150051		-I$(UTSBASE)/common/io/xge/drv -DSOLARIS
89a23fd118Syl150051
90*8347601bSyl150051CFLAGS		+= $(XGE_CFLAGS) -xO4 -xcrossfile -xc99=%all
91*8347601bSyl150051CFLAGS64	+= $(XGE_CFLAGS) -xO4 -xcrossfile -xc99=%all
92a23fd118Syl150051
93a23fd118Syl150051#
94a23fd118Syl150051#	Driver depends on MAC & IP
95a23fd118Syl150051#
96a23fd118Syl150051LDFLAGS		+=  -dy -N misc/mac -N drv/ip
97a23fd118Syl150051
98a23fd118Syl150051#	Lint flag
99a23fd118Syl150051#
100*8347601bSyl150051LINTFLAGS	+= $(XGE_CFLAGS) -Xc99=%all
101a23fd118Syl150051
102a23fd118Syl150051#
103bb25c06cSjg# For now, disable these lint checks; maintainers should endeavor
104bb25c06cSjg# to investigate and remove these for maximum lint coverage.
105bb25c06cSjg# Please do not carry these forward to new Makefiles.
106bb25c06cSjg#
107bb25c06cSjgLINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
108bb25c06cSjgLINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
109bb25c06cSjgLINTTAGS	+= -erroff=E_STATIC_UNUSED
110bb25c06cSjg
111bb25c06cSjg#
112a23fd118Syl150051#
113a23fd118Syl150051#	Default build targets.
114a23fd118Syl150051#
115a23fd118Syl150051.KEEP_STATE:
116a23fd118Syl150051
117a23fd118Syl150051def:		$(DEF_DEPS)
118a23fd118Syl150051
119a23fd118Syl150051all:		$(ALL_DEPS)
120a23fd118Syl150051
121a23fd118Syl150051clean:		$(CLEAN_DEPS)
122a23fd118Syl150051
123a23fd118Syl150051clobber:	$(CLOBBER_DEPS)
124a23fd118Syl150051
125a23fd118Syl150051lint:		$(LINT_DEPS)
126a23fd118Syl150051
127a23fd118Syl150051modlintlib:	$(MODLINTLIB_DEPS)
128a23fd118Syl150051
129a23fd118Syl150051clean.lint:	$(CLEAN_LINT_DEPS)
130a23fd118Syl150051
131a23fd118Syl150051install:	$(INSTALL_DEPS)
132a23fd118Syl150051
133a23fd118Syl150051#
134a23fd118Syl150051#	Include common targets.
135a23fd118Syl150051#
136a23fd118Syl150051include $(UTSBASE)/sparc/Makefile.targ
137