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# 23da14cebeSEric Cheng# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24a23fd118Syl150051# Use is subject to license terms. 25a23fd118Syl150051# 26efe51d0cSJohn Levon# Copyright 2019 Joyent, Inc. 27efe51d0cSJohn Levon# 28a23fd118Syl150051 29a23fd118Syl150051# 30a23fd118Syl150051# Paths to the base of the uts directory trees 31a23fd118Syl150051# 32a23fd118Syl150051UTSBASE = ../.. 33a23fd118Syl150051 34a23fd118Syl150051# 35a23fd118Syl150051# Define the module and object file sets. 36a23fd118Syl150051# 37a23fd118Syl150051MODULE = xge 38a23fd118Syl150051OBJECTS = $(XGE_HAL_OBJS:%=$(OBJS_DIR)/%) $(XGE_OBJS:%=$(OBJS_DIR)/%) 39a23fd118Syl150051ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 40a23fd118Syl150051 41a23fd118Syl150051# 42a23fd118Syl150051# Include common rules. 43a23fd118Syl150051# 44a23fd118Syl150051include $(UTSBASE)/intel/Makefile.intel 45a23fd118Syl150051 46a23fd118Syl150051# 47a23fd118Syl150051# Define targets 48a23fd118Syl150051# 49a23fd118Syl150051ALL_TARGET = $(BINARY) 50a23fd118Syl150051INSTALL_TARGET = $(BINARY) $(ROOTMODULE) 51a23fd118Syl150051 52a23fd118Syl150051# 53a23fd118Syl150051# GENERAL PURPOUSE HAL FLAGS: Tuning HAL for Solaris specific modes 54a23fd118Syl150051# 55a23fd118Syl150051HAL_CFLAGS = -DXGE_HAL_USE_MGMT_AUX 56a23fd118Syl150051 57a23fd118Syl150051# 58a23fd118Syl150051# TRACE SECTION: Possible values for MODULE, TRACE and ERR masks: 59a23fd118Syl150051# 60a23fd118Syl150051# XGE_COMPONENT_HAL_CONFIG 0x1 61a23fd118Syl150051# XGE_COMPONENT_HAL_FIFO 0x2 62a23fd118Syl150051# XGE_COMPONENT_HAL_RING 0x4 63a23fd118Syl150051# XGE_COMPONENT_HAL_CHANNEL 0x8 64a23fd118Syl150051# XGE_COMPONENT_HAL_DEVICE 0x10 65a23fd118Syl150051# XGE_COMPONENT_HAL_MM 0x20 66a23fd118Syl150051# XGE_COMPONENT_HAL_QUEUE 0x40 67a23fd118Syl150051# XGE_COMPONENT_HAL_STATS 0x100 68a23fd118Syl150051# XGE_COMPONENT_OSDEP 0x1000 69a23fd118Syl150051# XGE_COMPONENT_LL 0x2000 70a23fd118Syl150051# XGE_COMPONENT_TOE 0x4000 71a23fd118Syl150051# XGE_COMPONENT_RDMA 0x8000 72a23fd118Syl150051# XGE_COMPONENT_ALL 0xffffffff 73a23fd118Syl150051#TRACE_CFLAGS = -DXGE_DEBUG_MODULE_MASK=0xffffffff \ 74a23fd118Syl150051# -DXGE_DEBUG_TRACE_MASK=0xffffffff \ 75a23fd118Syl150051# -DXGE_DEBUG_ERR_MASK=0xffffffff 76a23fd118Syl150051TRACE_CFLAGS = -DXGE_DEBUG_MODULE_MASK=0x00003010 \ 77a23fd118Syl150051 -DXGE_DEBUG_TRACE_MASK=0x00000000 \ 78a23fd118Syl150051 -DXGE_DEBUG_ERR_MASK=0x00003010 79a23fd118Syl150051 808347601bSyl150051XGE_CFLAGS = $(HAL_CFLAGS) $(TRACE_CFLAGS) $(CCVERBOSE) \ 81a23fd118Syl150051 -I$(UTSBASE)/common/io/xge/hal/include \ 82a23fd118Syl150051 -I$(UTSBASE)/common/io/xge/hal/xgehal \ 83a23fd118Syl150051 -I$(UTSBASE)/common/io/xge/drv -DSOLARIS 84a23fd118Syl150051 85*d17be682SRichard LoweCFLAGS += $(XGE_CFLAGS) -xO4 86*d17be682SRichard LoweCFLAGS64 += $(XGE_CFLAGS) -xO4 87a23fd118Syl150051 88a23fd118Syl150051# 89a23fd118Syl150051# Driver depends on MAC & IP 90a23fd118Syl150051# 9182d0151aSRichard LoweLDFLAGS += -N misc/mac -N drv/ip 92a23fd118Syl150051 937014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 947014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 957014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-label 967014882cSRichard LoweCERRWARN += -_gcc=-Wno-empty-body 97d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT) 987014882cSRichard Lowe 99b6b206fcSJohn Levon# needs work 100efe51d0cSJohn LevonSMOFF += indenting 101efe51d0cSJohn LevonSMOFF += all_func_returns 102efe51d0cSJohn LevonSMOFF += no_if_block 103efe51d0cSJohn LevonSMOFF += allocating_enough_data 104b6b206fcSJohn Levon 105bb25c06cSjg# 106a23fd118Syl150051# 107a23fd118Syl150051# Default build targets. 108a23fd118Syl150051# 109a23fd118Syl150051.KEEP_STATE: 110a23fd118Syl150051 111a23fd118Syl150051def: $(DEF_DEPS) 112a23fd118Syl150051 113a23fd118Syl150051all: $(ALL_DEPS) 114a23fd118Syl150051 115a23fd118Syl150051clean: $(CLEAN_DEPS) 116a23fd118Syl150051 117a23fd118Syl150051clobber: $(CLOBBER_DEPS) 118a23fd118Syl150051 119a23fd118Syl150051install: $(INSTALL_DEPS) 120a23fd118Syl150051 121a23fd118Syl150051# 122a23fd118Syl150051# Include common targets. 123a23fd118Syl150051# 124a23fd118Syl150051include $(UTSBASE)/intel/Makefile.targ 125