1*3dec9fcdSqs148142# 2*3dec9fcdSqs148142# CDDL HEADER START 3*3dec9fcdSqs148142# 4*3dec9fcdSqs148142# The contents of this file are subject to the terms of the 5*3dec9fcdSqs148142# Common Development and Distribution License (the "License"). 6*3dec9fcdSqs148142# You may not use this file except in compliance with the License. 7*3dec9fcdSqs148142# 8*3dec9fcdSqs148142# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*3dec9fcdSqs148142# or http://www.opensolaris.org/os/licensing. 10*3dec9fcdSqs148142# See the License for the specific language governing permissions 11*3dec9fcdSqs148142# and limitations under the License. 12*3dec9fcdSqs148142# 13*3dec9fcdSqs148142# When distributing Covered Code, include this CDDL HEADER in each 14*3dec9fcdSqs148142# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*3dec9fcdSqs148142# If applicable, add the following below this CDDL HEADER, with the 16*3dec9fcdSqs148142# fields enclosed by brackets "[]" replaced with your own identifying 17*3dec9fcdSqs148142# information: Portions Copyright [yyyy] [name of copyright owner] 18*3dec9fcdSqs148142# 19*3dec9fcdSqs148142# CDDL HEADER END 20*3dec9fcdSqs148142# 21*3dec9fcdSqs148142# uts/intel/hxge/Makefile 22*3dec9fcdSqs148142# 23*3dec9fcdSqs148142# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24*3dec9fcdSqs148142# Use is subject to license terms. 25*3dec9fcdSqs148142# 26*3dec9fcdSqs148142# 27*3dec9fcdSqs148142# ident "%Z%%M% %I% %E% SMI" 28*3dec9fcdSqs148142# 29*3dec9fcdSqs148142# This makefile drives the production of the Sun 30*3dec9fcdSqs148142# 10G hxge Ethernet leaf driver kernel module. 31*3dec9fcdSqs148142# 32*3dec9fcdSqs148142# 33*3dec9fcdSqs148142# Path to the base of the uts directory tree (usually /usr/src/uts). 34*3dec9fcdSqs148142# 35*3dec9fcdSqs148142UTSBASE = ../.. 36*3dec9fcdSqs148142 37*3dec9fcdSqs148142# 38*3dec9fcdSqs148142# Define the module and object file sets. 39*3dec9fcdSqs148142# 40*3dec9fcdSqs148142MODULE = hxge 41*3dec9fcdSqs148142HXGE_OBJECTS = $(HXGE_OBJS) $(HXGE_HPI_OBJS) 42*3dec9fcdSqs148142OBJECTS = $(HXGE_OBJECTS:%=$(OBJS_DIR)/%) 43*3dec9fcdSqs148142LINTS = $(HXGE_OBJECTS:%.o=$(LINTS_DIR)/%.ln) 44*3dec9fcdSqs148142ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 45*3dec9fcdSqs148142CONF_SRCDIR = $(UTSBASE)/common/io/hxge 46*3dec9fcdSqs148142 47*3dec9fcdSqs148142# 48*3dec9fcdSqs148142# Include common rules. 49*3dec9fcdSqs148142# 50*3dec9fcdSqs148142include $(UTSBASE)/intel/Makefile.intel 51*3dec9fcdSqs148142 52*3dec9fcdSqs148142# 53*3dec9fcdSqs148142# Override defaults to build a unique, local modstubs.o. 54*3dec9fcdSqs148142# 55*3dec9fcdSqs148142MODSTUBS_DIR = $(OBJS_DIR) 56*3dec9fcdSqs148142 57*3dec9fcdSqs148142CLEANFILES += $(MODSTUBS_O) 58*3dec9fcdSqs148142 59*3dec9fcdSqs148142# 60*3dec9fcdSqs148142# Define targets 61*3dec9fcdSqs148142# 62*3dec9fcdSqs148142ALL_TARGET = $(BINARY) 63*3dec9fcdSqs148142LINT_TARGET = $(MODULE).lint 64*3dec9fcdSqs148142INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 65*3dec9fcdSqs148142 66*3dec9fcdSqs148142# 67*3dec9fcdSqs148142# 68*3dec9fcdSqs148142# Turn on doubleword alignment for 64 bit registers 69*3dec9fcdSqs148142# 70*3dec9fcdSqs148142CFLAGS += -dalign 71*3dec9fcdSqs148142# 72*3dec9fcdSqs148142# Include hxge specific header files 73*3dec9fcdSqs148142# 74*3dec9fcdSqs148142INC_PATH += -I$(UTSBASE)/common 75*3dec9fcdSqs148142INC_PATH += -I$(UTSBASE)/common/io/hxge 76*3dec9fcdSqs148142# 77*3dec9fcdSqs148142# 78*3dec9fcdSqs148142# lint pass one enforcement 79*3dec9fcdSqs148142# 80*3dec9fcdSqs148142CFLAGS += -DSOLARIS 81*3dec9fcdSqs148142# 82*3dec9fcdSqs148142# Debug flags 83*3dec9fcdSqs148142# 84*3dec9fcdSqs148142# CFLAGS += -DHXGE_DEBUG -DHPI_DEBUG 85*3dec9fcdSqs148142# 86*3dec9fcdSqs148142# 64 bit only 87*3dec9fcdSqs148142# 88*3dec9fcdSqs148142ALL_BUILDS = $(ALL_BUILDS64) 89*3dec9fcdSqs148142DEF_BUILDS = $(DEF_BUILDS64) 90*3dec9fcdSqs148142CLEANLINTFILES += $(LINT64_FILES) 91*3dec9fcdSqs148142# 92*3dec9fcdSqs148142LINTFLAGS += -DSOLARIS 93*3dec9fcdSqs148142# 94*3dec9fcdSqs148142# STREAMS, DDI API limitations and other ON header file definitions such as ethernet.h 95*3dec9fcdSqs148142# force us to turn off these lint checks. 96*3dec9fcdSqs148142# 97*3dec9fcdSqs148142LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 98*3dec9fcdSqs148142LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW 99*3dec9fcdSqs148142LINTTAGS += -erroff=E_FALSE_LOGICAL_EXPR 100*3dec9fcdSqs148142# 101*3dec9fcdSqs148142# Driver depends on mac & IP 102*3dec9fcdSqs148142# 103*3dec9fcdSqs148142LDFLAGS += -dy -N misc/mac -N drv/ip 104*3dec9fcdSqs148142 105*3dec9fcdSqs148142# 106*3dec9fcdSqs148142# Default build targets. 107*3dec9fcdSqs148142# 108*3dec9fcdSqs148142.KEEP_STATE: 109*3dec9fcdSqs148142 110*3dec9fcdSqs148142def: $(DEF_DEPS) 111*3dec9fcdSqs148142 112*3dec9fcdSqs148142all: $(ALL_DEPS) 113*3dec9fcdSqs148142 114*3dec9fcdSqs148142clean: $(CLEAN_DEPS) 115*3dec9fcdSqs148142 116*3dec9fcdSqs148142clobber: $(CLOBBER_DEPS) 117*3dec9fcdSqs148142 118*3dec9fcdSqs148142lint: $(LINT_DEPS) 119*3dec9fcdSqs148142 120*3dec9fcdSqs148142modlintlib: $(MODLINTLIB_DEPS) 121*3dec9fcdSqs148142 122*3dec9fcdSqs148142clean.lint: $(CLEAN_LINT_DEPS) 123*3dec9fcdSqs148142 124*3dec9fcdSqs148142install: $(INSTALL_DEPS) 125*3dec9fcdSqs148142 126*3dec9fcdSqs148142# 127*3dec9fcdSqs148142# Include common targets. 128*3dec9fcdSqs148142# 129*3dec9fcdSqs148142include $(UTSBASE)/intel/Makefile.targ 130