xref: /titanic_41/usr/src/uts/sun4u/nxge/Makefile (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
16f45ec7bSml29623#
26f45ec7bSml29623# CDDL HEADER START
36f45ec7bSml29623#
46f45ec7bSml29623# The contents of this file are subject to the terms of the
56f45ec7bSml29623# Common Development and Distribution License (the "License").
66f45ec7bSml29623# You may not use this file except in compliance with the License.
76f45ec7bSml29623#
86f45ec7bSml29623# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
96f45ec7bSml29623# or http://www.opensolaris.org/os/licensing.
106f45ec7bSml29623# See the License for the specific language governing permissions
116f45ec7bSml29623# and limitations under the License.
126f45ec7bSml29623#
136f45ec7bSml29623# When distributing Covered Code, include this CDDL HEADER in each
146f45ec7bSml29623# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
156f45ec7bSml29623# If applicable, add the following below this CDDL HEADER, with the
166f45ec7bSml29623# fields enclosed by brackets "[]" replaced with your own identifying
176f45ec7bSml29623# information: Portions Copyright [yyyy] [name of copyright owner]
186f45ec7bSml29623#
196f45ec7bSml29623# CDDL HEADER END
206f45ec7bSml29623#
21*7014882cSRichard Lowe
226f45ec7bSml29623#
236f45ec7bSml29623# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
246f45ec7bSml29623# Use is subject to license terms.
256f45ec7bSml29623#
26*7014882cSRichard Lowe
276f45ec7bSml29623#
286f45ec7bSml29623#	This makefile drives the production of the Sun
296f45ec7bSml29623#	10G/1G Ethernet leaf driver kernel module.
306f45ec7bSml29623#
31*7014882cSRichard Lowe
326f45ec7bSml29623#
336f45ec7bSml29623#	Path to the base of the uts directory tree (usually /usr/src/uts).
346f45ec7bSml29623#
356f45ec7bSml29623UTSBASE	= ../..
366f45ec7bSml29623
376f45ec7bSml29623#
386f45ec7bSml29623#	Define the module and object file sets.
396f45ec7bSml29623#
406f45ec7bSml29623MODULE		= nxge
416f45ec7bSml29623NXGE_OBJECTS =	$(NXGE_OBJS) $(NXGE_NPI_OBJS)
426f45ec7bSml29623OBJECTS		=  $(NXGE_OBJECTS:%=$(OBJS_DIR)/%)
436f45ec7bSml29623LINTS		= $(NXGE_OBJECTS:%.o=$(LINTS_DIR)/%.ln)
446f45ec7bSml29623ROOTMODULE	= $(ROOT_PSM_DRV_DIR)/$(MODULE)
456f45ec7bSml29623CONF_SRCDIR	= $(UTSBASE)/common/io/nxge
466f45ec7bSml29623
476f45ec7bSml29623#
486f45ec7bSml29623#	Include common rules.
496f45ec7bSml29623#
506f45ec7bSml29623include $(UTSBASE)/sun4u/Makefile.sun4u
516f45ec7bSml29623
526f45ec7bSml29623#
536f45ec7bSml29623#	Override defaults to build a unique, local modstubs.o.
546f45ec7bSml29623#
556f45ec7bSml29623MODSTUBS_DIR	= $(OBJS_DIR)
566f45ec7bSml29623
576f45ec7bSml29623CLEANFILES	+= $(MODSTUBS_O)
586f45ec7bSml29623
596f45ec7bSml29623#
606f45ec7bSml29623#	Define targets
616f45ec7bSml29623#
626f45ec7bSml29623ALL_TARGET	= $(BINARY)
636f45ec7bSml29623LINT_TARGET	= $(MODULE).lint
646f45ec7bSml29623INSTALL_TARGET	= $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
656f45ec7bSml29623
666f45ec7bSml29623#
676f45ec7bSml29623#
686f45ec7bSml29623# Turn on doubleword alignment for 64 bit registers
696f45ec7bSml29623#
706f45ec7bSml29623CFLAGS	+= -dalign
716f45ec7bSml29623#
726f45ec7bSml29623# Include nxge specific header files
736f45ec7bSml29623#
746f45ec7bSml29623INC_PATH	+= -I$(UTSBASE)/common
756f45ec7bSml29623INC_PATH	+= -I$(UTSBASE)/common/io/nxge/npi
766f45ec7bSml29623INC_PATH	+= -I$(UTSBASE)/common/sys/nxge
776f45ec7bSml29623#
786f45ec7bSml29623#
796f45ec7bSml29623# lint pass one enforcement
806f45ec7bSml29623#
816f45ec7bSml29623CFLAGS += -DSOLARIS
826f45ec7bSml29623#
836f45ec7bSml29623LINTFLAGS += -DSOLARIS
846f45ec7bSml29623#
856f45ec7bSml29623# STREAMS, DDI API limitations and other ON header file definitions such as ethernet.h
866f45ec7bSml29623# force us to turn off these lint checks.
876f45ec7bSml29623#
886f45ec7bSml29623LINTTAGS	+= -erroff=E_BAD_PTR_CAST_ALIGN
896f45ec7bSml29623LINTTAGS	+= -erroff=E_PTRDIFF_OVERFLOW
90*7014882cSRichard Lowe
91*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-label
92*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
93*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-switch
94*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
95*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-type-limits
96*7014882cSRichard Lowe
976f45ec7bSml29623#
986f45ec7bSml29623#	Driver depends on mac & IP
996f45ec7bSml29623#
1006f45ec7bSml29623LDFLAGS		+= -dy -N misc/mac -N drv/ip
1016f45ec7bSml29623
1026f45ec7bSml29623#
1036f45ec7bSml29623#	Default build targets.
1046f45ec7bSml29623#
1056f45ec7bSml29623.KEEP_STATE:
1066f45ec7bSml29623
1076f45ec7bSml29623def:		$(DEF_DEPS)
1086f45ec7bSml29623
1096f45ec7bSml29623all:		$(ALL_DEPS)
1106f45ec7bSml29623
1116f45ec7bSml29623clean:		$(CLEAN_DEPS)
1126f45ec7bSml29623
1136f45ec7bSml29623clobber:	$(CLOBBER_DEPS)
1146f45ec7bSml29623
1156f45ec7bSml29623lint:		$(LINT_DEPS)
1166f45ec7bSml29623
1176f45ec7bSml29623modlintlib:	$(MODLINTLIB_DEPS)
1186f45ec7bSml29623
1196f45ec7bSml29623clean.lint:	$(CLEAN_LINT_DEPS)
1206f45ec7bSml29623
1216f45ec7bSml29623install:	$(INSTALL_DEPS)
1226f45ec7bSml29623
1236f45ec7bSml29623#
1246f45ec7bSml29623#	Include common targets.
1256f45ec7bSml29623#
1266f45ec7bSml29623include $(UTSBASE)/sun4u/Makefile.targ
127