xref: /titanic_44/usr/src/uts/sparc/hxge/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
1dc10a9c2SMichael Speer#
2dc10a9c2SMichael Speer# CDDL HEADER START
3dc10a9c2SMichael Speer#
4dc10a9c2SMichael Speer# The contents of this file are subject to the terms of the
5dc10a9c2SMichael Speer# Common Development and Distribution License (the "License").
6dc10a9c2SMichael Speer# You may not use this file except in compliance with the License.
7dc10a9c2SMichael Speer#
8dc10a9c2SMichael Speer# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9dc10a9c2SMichael Speer# or http://www.opensolaris.org/os/licensing.
10dc10a9c2SMichael Speer# See the License for the specific language governing permissions
11dc10a9c2SMichael Speer# and limitations under the License.
12dc10a9c2SMichael Speer#
13dc10a9c2SMichael Speer# When distributing Covered Code, include this CDDL HEADER in each
14dc10a9c2SMichael Speer# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15dc10a9c2SMichael Speer# If applicable, add the following below this CDDL HEADER, with the
16dc10a9c2SMichael Speer# fields enclosed by brackets "[]" replaced with your own identifying
17dc10a9c2SMichael Speer# information: Portions Copyright [yyyy] [name of copyright owner]
18dc10a9c2SMichael Speer#
19dc10a9c2SMichael Speer# CDDL HEADER END
20dc10a9c2SMichael Speer#
21dc10a9c2SMichael Speer# uts/sparc/hxge/Makefile
22dc10a9c2SMichael Speer#
230dc2366fSVenugopal Iyer# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
24dc10a9c2SMichael Speer# Use is subject to license terms.
25dc10a9c2SMichael Speer#
26dc10a9c2SMichael Speer#	This makefile drives the production of the Sun
27dc10a9c2SMichael Speer#	10G hxge Ethernet leaf driver kernel module.
28dc10a9c2SMichael Speer#
29dc10a9c2SMichael Speer#
30dc10a9c2SMichael Speer#	Path to the base of the uts directory tree (usually /usr/src/uts).
31dc10a9c2SMichael Speer#
32dc10a9c2SMichael SpeerUTSBASE	= ../..
33dc10a9c2SMichael Speer
34dc10a9c2SMichael Speer#
35dc10a9c2SMichael Speer#	Define the module and object file sets.
36dc10a9c2SMichael Speer#
37dc10a9c2SMichael SpeerMODULE		= hxge
38dc10a9c2SMichael SpeerHXGE_OBJECTS =	$(HXGE_OBJS) $(HXGE_HPI_OBJS)
39dc10a9c2SMichael SpeerOBJECTS		=  $(HXGE_OBJECTS:%=$(OBJS_DIR)/%)
40dc10a9c2SMichael SpeerLINTS		= $(HXGE_OBJECTS:%.o=$(LINTS_DIR)/%.ln)
41dc10a9c2SMichael SpeerROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
42dc10a9c2SMichael SpeerCONF_SRCDIR	= $(UTSBASE)/common/io/hxge
43dc10a9c2SMichael Speer
44dc10a9c2SMichael Speer#
45dc10a9c2SMichael Speer#	Include common rules.
46dc10a9c2SMichael Speer#
47dc10a9c2SMichael Speerinclude $(UTSBASE)/sparc/Makefile.sparc
48dc10a9c2SMichael Speer
49dc10a9c2SMichael Speer#
50dc10a9c2SMichael Speer#	Override defaults to build a unique, local modstubs.o.
51dc10a9c2SMichael Speer#
52dc10a9c2SMichael SpeerMODSTUBS_DIR	= $(OBJS_DIR)
53dc10a9c2SMichael Speer
54dc10a9c2SMichael SpeerCLEANFILES	+= $(MODSTUBS_O)
55dc10a9c2SMichael Speer
56dc10a9c2SMichael Speer#
57dc10a9c2SMichael Speer#	Define targets
58dc10a9c2SMichael Speer#
59dc10a9c2SMichael SpeerALL_TARGET	= $(BINARY)
60dc10a9c2SMichael SpeerLINT_TARGET	= $(MODULE).lint
61dc10a9c2SMichael SpeerINSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
62dc10a9c2SMichael Speer
63dc10a9c2SMichael Speer#
64dc10a9c2SMichael Speer#
65dc10a9c2SMichael Speer# Turn on doubleword alignment for 64 bit registers
66dc10a9c2SMichael Speer#
67dc10a9c2SMichael SpeerCFLAGS	+= -dalign
68dc10a9c2SMichael Speer#
69dc10a9c2SMichael Speer# Include hxge specific header files
70dc10a9c2SMichael Speer#
71dc10a9c2SMichael SpeerINC_PATH	+= -I$(UTSBASE)/common/io/hxge
72dc10a9c2SMichael Speer#
73dc10a9c2SMichael Speer#
74dc10a9c2SMichael Speer# lint pass one enforcement
75dc10a9c2SMichael Speer#
76dc10a9c2SMichael SpeerCFLAGS += -DSOLARIS
77dc10a9c2SMichael Speer#
78dc10a9c2SMichael Speer# Debug flags
79dc10a9c2SMichael Speer#
80dc10a9c2SMichael Speer# CFLAGS += -DHXGE_DEBUG -DHPI_DEBUG
81dc10a9c2SMichael Speer#
82dc10a9c2SMichael SpeerLINTFLAGS += -DSOLARIS
83dc10a9c2SMichael Speer#
84dc10a9c2SMichael Speer# STREAMS, DDI API limitations and other ON header file definitions such as ethernet.h
85dc10a9c2SMichael Speer# force us to turn off these lint checks.
86dc10a9c2SMichael Speer#
87dc10a9c2SMichael SpeerLINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
88dc10a9c2SMichael SpeerLINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
89dc10a9c2SMichael SpeerLINTTAGS	+= -erroff=E_FALSE_LOGICAL_EXPR
90*7014882cSRichard Lowe
91*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-label
92*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-switch
93*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
94*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
95*7014882cSRichard Lowe
96dc10a9c2SMichael Speer#
97dc10a9c2SMichael Speer#	Driver depends on mac & IP
98dc10a9c2SMichael Speer#
99dc10a9c2SMichael SpeerLDFLAGS		+= -dy -N misc/mac -N drv/ip
100dc10a9c2SMichael Speer
101dc10a9c2SMichael Speer#
102dc10a9c2SMichael Speer#	Default build targets.
103dc10a9c2SMichael Speer#
104dc10a9c2SMichael Speer.KEEP_STATE:
105dc10a9c2SMichael Speer
106dc10a9c2SMichael Speerdef:		$(DEF_DEPS)
107dc10a9c2SMichael Speer
108dc10a9c2SMichael Speerall:		$(ALL_DEPS)
109dc10a9c2SMichael Speer
110dc10a9c2SMichael Speerclean:		$(CLEAN_DEPS)
111dc10a9c2SMichael Speer
112dc10a9c2SMichael Speerclobber:	$(CLOBBER_DEPS)
113dc10a9c2SMichael Speer
114dc10a9c2SMichael Speerlint:		$(LINT_DEPS)
115dc10a9c2SMichael Speer
116dc10a9c2SMichael Speermodlintlib:	$(MODLINTLIB_DEPS)
117dc10a9c2SMichael Speer
118dc10a9c2SMichael Speerclean.lint:	$(CLEAN_LINT_DEPS)
119dc10a9c2SMichael Speer
120dc10a9c2SMichael Speerinstall:	$(INSTALL_DEPS)
121dc10a9c2SMichael Speer
122dc10a9c2SMichael Speer#
123dc10a9c2SMichael Speer#	Include common targets.
124dc10a9c2SMichael Speer#
125dc10a9c2SMichael Speerinclude $(UTSBASE)/intel/Makefile.targ
126