xref: /titanic_50/usr/src/uts/sun4u/nxge/Makefile (revision 6f45ec7b0b964c3be967c4880e8867ac1e7763a5)
1*6f45ec7bSml29623#
2*6f45ec7bSml29623# CDDL HEADER START
3*6f45ec7bSml29623#
4*6f45ec7bSml29623# The contents of this file are subject to the terms of the
5*6f45ec7bSml29623# Common Development and Distribution License (the "License").
6*6f45ec7bSml29623# You may not use this file except in compliance with the License.
7*6f45ec7bSml29623#
8*6f45ec7bSml29623# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*6f45ec7bSml29623# or http://www.opensolaris.org/os/licensing.
10*6f45ec7bSml29623# See the License for the specific language governing permissions
11*6f45ec7bSml29623# and limitations under the License.
12*6f45ec7bSml29623#
13*6f45ec7bSml29623# When distributing Covered Code, include this CDDL HEADER in each
14*6f45ec7bSml29623# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*6f45ec7bSml29623# If applicable, add the following below this CDDL HEADER, with the
16*6f45ec7bSml29623# fields enclosed by brackets "[]" replaced with your own identifying
17*6f45ec7bSml29623# information: Portions Copyright [yyyy] [name of copyright owner]
18*6f45ec7bSml29623#
19*6f45ec7bSml29623# CDDL HEADER END
20*6f45ec7bSml29623#
21*6f45ec7bSml29623# uts/sun4u/nxge/Makefile
22*6f45ec7bSml29623#
23*6f45ec7bSml29623# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24*6f45ec7bSml29623# Use is subject to license terms.
25*6f45ec7bSml29623#
26*6f45ec7bSml29623#
27*6f45ec7bSml29623# ident	"%Z%%M%	%I%	%E% SMI"
28*6f45ec7bSml29623#
29*6f45ec7bSml29623#	This makefile drives the production of the Sun
30*6f45ec7bSml29623#	10G/1G Ethernet leaf driver kernel module.
31*6f45ec7bSml29623#
32*6f45ec7bSml29623#
33*6f45ec7bSml29623#	Path to the base of the uts directory tree (usually /usr/src/uts).
34*6f45ec7bSml29623#
35*6f45ec7bSml29623UTSBASE	= ../..
36*6f45ec7bSml29623
37*6f45ec7bSml29623#
38*6f45ec7bSml29623#	Define the module and object file sets.
39*6f45ec7bSml29623#
40*6f45ec7bSml29623MODULE		= nxge
41*6f45ec7bSml29623NXGE_OBJECTS =	$(NXGE_OBJS) $(NXGE_NPI_OBJS)
42*6f45ec7bSml29623OBJECTS		=  $(NXGE_OBJECTS:%=$(OBJS_DIR)/%)
43*6f45ec7bSml29623LINTS		= $(NXGE_OBJECTS:%.o=$(LINTS_DIR)/%.ln)
44*6f45ec7bSml29623ROOTMODULE	= $(ROOT_PSM_DRV_DIR)/$(MODULE)
45*6f45ec7bSml29623CONF_SRCDIR	= $(UTSBASE)/common/io/nxge
46*6f45ec7bSml29623
47*6f45ec7bSml29623#
48*6f45ec7bSml29623#	Include common rules.
49*6f45ec7bSml29623#
50*6f45ec7bSml29623include $(UTSBASE)/sun4u/Makefile.sun4u
51*6f45ec7bSml29623
52*6f45ec7bSml29623#
53*6f45ec7bSml29623#	Override defaults to build a unique, local modstubs.o.
54*6f45ec7bSml29623#
55*6f45ec7bSml29623MODSTUBS_DIR	= $(OBJS_DIR)
56*6f45ec7bSml29623
57*6f45ec7bSml29623CLEANFILES	+= $(MODSTUBS_O)
58*6f45ec7bSml29623
59*6f45ec7bSml29623#
60*6f45ec7bSml29623#	Define targets
61*6f45ec7bSml29623#
62*6f45ec7bSml29623ALL_TARGET	= $(BINARY)
63*6f45ec7bSml29623LINT_TARGET	= $(MODULE).lint
64*6f45ec7bSml29623INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
65*6f45ec7bSml29623
66*6f45ec7bSml29623#
67*6f45ec7bSml29623#
68*6f45ec7bSml29623# Turn on doubleword alignment for 64 bit registers
69*6f45ec7bSml29623#
70*6f45ec7bSml29623CFLAGS	+= -dalign
71*6f45ec7bSml29623#
72*6f45ec7bSml29623# Include nxge specific header files
73*6f45ec7bSml29623#
74*6f45ec7bSml29623INC_PATH	+= -I$(UTSBASE)/common
75*6f45ec7bSml29623INC_PATH	+= -I$(UTSBASE)/common/io/nxge/npi
76*6f45ec7bSml29623INC_PATH	+= -I$(UTSBASE)/common/sys/nxge
77*6f45ec7bSml29623#
78*6f45ec7bSml29623#
79*6f45ec7bSml29623# lint pass one enforcement
80*6f45ec7bSml29623#
81*6f45ec7bSml29623CFLAGS += -DSOLARIS
82*6f45ec7bSml29623#
83*6f45ec7bSml29623LINTFLAGS += -DSOLARIS
84*6f45ec7bSml29623#
85*6f45ec7bSml29623# STREAMS, DDI API limitations and other ON header file definitions such as ethernet.h
86*6f45ec7bSml29623# force us to turn off these lint checks.
87*6f45ec7bSml29623#
88*6f45ec7bSml29623LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
89*6f45ec7bSml29623LINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
90*6f45ec7bSml29623#
91*6f45ec7bSml29623#	Driver depends on mac & IP
92*6f45ec7bSml29623#
93*6f45ec7bSml29623LDFLAGS		+= -dy -N misc/mac -N drv/ip
94*6f45ec7bSml29623
95*6f45ec7bSml29623#
96*6f45ec7bSml29623#	Default build targets.
97*6f45ec7bSml29623#
98*6f45ec7bSml29623.KEEP_STATE:
99*6f45ec7bSml29623
100*6f45ec7bSml29623def:		$(DEF_DEPS)
101*6f45ec7bSml29623
102*6f45ec7bSml29623all:		$(ALL_DEPS)
103*6f45ec7bSml29623
104*6f45ec7bSml29623clean:		$(CLEAN_DEPS)
105*6f45ec7bSml29623
106*6f45ec7bSml29623clobber:	$(CLOBBER_DEPS)
107*6f45ec7bSml29623
108*6f45ec7bSml29623lint:		$(LINT_DEPS)
109*6f45ec7bSml29623
110*6f45ec7bSml29623modlintlib:	$(MODLINTLIB_DEPS)
111*6f45ec7bSml29623
112*6f45ec7bSml29623clean.lint:	$(CLEAN_LINT_DEPS)
113*6f45ec7bSml29623
114*6f45ec7bSml29623install:	$(INSTALL_DEPS)
115*6f45ec7bSml29623
116*6f45ec7bSml29623#
117*6f45ec7bSml29623#	Include common targets.
118*6f45ec7bSml29623#
119*6f45ec7bSml29623include $(UTSBASE)/sun4u/Makefile.targ
120