1*b494511aSVenki Rajagopalan# 2*b494511aSVenki Rajagopalan# CDDL HEADER START 3*b494511aSVenki Rajagopalan# 4*b494511aSVenki Rajagopalan# The contents of this file are subject to the terms of the 5*b494511aSVenki Rajagopalan# Common Development and Distribution License (the "License"). 6*b494511aSVenki Rajagopalan# You may not use this file except in compliance with the License. 7*b494511aSVenki Rajagopalan# 8*b494511aSVenki Rajagopalan# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*b494511aSVenki Rajagopalan# or http://www.opensolaris.org/os/licensing. 10*b494511aSVenki Rajagopalan# See the License for the specific language governing permissions 11*b494511aSVenki Rajagopalan# and limitations under the License. 12*b494511aSVenki Rajagopalan# 13*b494511aSVenki Rajagopalan# When distributing Covered Code, include this CDDL HEADER in each 14*b494511aSVenki Rajagopalan# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*b494511aSVenki Rajagopalan# If applicable, add the following below this CDDL HEADER, with the 16*b494511aSVenki Rajagopalan# fields enclosed by brackets "[]" replaced with your own identifying 17*b494511aSVenki Rajagopalan# information: Portions Copyright [yyyy] [name of copyright owner] 18*b494511aSVenki Rajagopalan# 19*b494511aSVenki Rajagopalan# CDDL HEADER END 20*b494511aSVenki Rajagopalan# 21*b494511aSVenki Rajagopalan 22*b494511aSVenki Rajagopalan# 23*b494511aSVenki Rajagopalan# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 24*b494511aSVenki Rajagopalan# 25*b494511aSVenki Rajagopalan 26*b494511aSVenki Rajagopalan# 27*b494511aSVenki Rajagopalan# This makefile drives the production of the EoIB Nexus driver 28*b494511aSVenki Rajagopalan# 29*b494511aSVenki Rajagopalan# intel architecture dependent 30*b494511aSVenki Rajagopalan# 31*b494511aSVenki Rajagopalan 32*b494511aSVenki Rajagopalan# 33*b494511aSVenki Rajagopalan# Path to the base of the uts directory tree (usually /usr/src/uts) 34*b494511aSVenki Rajagopalan# 35*b494511aSVenki RajagopalanUTSBASE = ../.. 36*b494511aSVenki Rajagopalan 37*b494511aSVenki Rajagopalan# 38*b494511aSVenki Rajagopalan# Define the module and object file sets 39*b494511aSVenki Rajagopalan# 40*b494511aSVenki RajagopalanMODULE = eibnx 41*b494511aSVenki RajagopalanOBJECTS = $(EIBNX_OBJS:%=$(OBJS_DIR)/%) 42*b494511aSVenki RajagopalanLINTS = $(EIBNX_OBJS:%.o=$(LINTS_DIR)/%.ln) 43*b494511aSVenki RajagopalanROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) 44*b494511aSVenki RajagopalanCONF_SRCDIR = $(UTSBASE)/common/io/ib/clients/eoib 45*b494511aSVenki RajagopalanWARLOCK_OUT = $(EIBNX_OBJS:%.o=%.ll) 46*b494511aSVenki RajagopalanWARLOCK_OK = $(MODULE).ok 47*b494511aSVenki RajagopalanWLCMD_DIR = $(UTSBASE)/common/io/warlock 48*b494511aSVenki Rajagopalan 49*b494511aSVenki Rajagopalan# 50*b494511aSVenki Rajagopalan# Include common rules 51*b494511aSVenki Rajagopalan# 52*b494511aSVenki Rajagopalaninclude $(UTSBASE)/intel/Makefile.intel 53*b494511aSVenki Rajagopalan 54*b494511aSVenki Rajagopalan# 55*b494511aSVenki Rajagopalan# Define targets 56*b494511aSVenki Rajagopalan# 57*b494511aSVenki RajagopalanALL_TARGET = $(BINARY) $(SRC_CONFILE) 58*b494511aSVenki RajagopalanLINT_TARGET = $(MODULE).lint 59*b494511aSVenki RajagopalanINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) 60*b494511aSVenki Rajagopalan 61*b494511aSVenki Rajagopalan# Module specific debug flag 62*b494511aSVenki Rajagopalan# 63*b494511aSVenki RajagopalanCPPFLAGS += -DENX_DEBUG 64*b494511aSVenki Rajagopalan 65*b494511aSVenki Rajagopalan# 66*b494511aSVenki Rajagopalan# Lint pass one enforcement 67*b494511aSVenki Rajagopalan# 68*b494511aSVenki RajagopalanCFLAGS += $(CCVERBOSE) 69*b494511aSVenki Rajagopalan 70*b494511aSVenki Rajagopalan# 71*b494511aSVenki Rajagopalan# Depends on misc/ibtl 72*b494511aSVenki Rajagopalan# 73*b494511aSVenki RajagopalanLDFLAGS += -dy -Nmisc/ibcm -Nmisc/ibtl 74*b494511aSVenki Rajagopalan 75*b494511aSVenki Rajagopalan# 76*b494511aSVenki Rajagopalan# The only lint flag we should need 77*b494511aSVenki Rajagopalan# 78*b494511aSVenki RajagopalanLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN 79*b494511aSVenki Rajagopalan 80*b494511aSVenki Rajagopalan# 81*b494511aSVenki Rajagopalan# Default build targets 82*b494511aSVenki Rajagopalan# 83*b494511aSVenki Rajagopalan.KEEP_STATE: 84*b494511aSVenki Rajagopalan 85*b494511aSVenki Rajagopalandef: $(DEF_DEPS) 86*b494511aSVenki Rajagopalan 87*b494511aSVenki Rajagopalanall: $(ALL_DEPS) 88*b494511aSVenki Rajagopalan 89*b494511aSVenki Rajagopalanclean: $(CLEAN_DEPS) 90*b494511aSVenki Rajagopalan $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 91*b494511aSVenki Rajagopalan 92*b494511aSVenki Rajagopalanclobber: $(CLOBBER_DEPS) 93*b494511aSVenki Rajagopalan $(RM) $(WARLOCK_OUT) $(WARLOCK_OK) 94*b494511aSVenki Rajagopalan 95*b494511aSVenki Rajagopalanlint: $(LINT_DEPS) 96*b494511aSVenki Rajagopalan 97*b494511aSVenki Rajagopalanmodlintlib: $(MODLINTLIB_DEPS) 98*b494511aSVenki Rajagopalan 99*b494511aSVenki Rajagopalanclean.lint: $(CLEAN_LINT_DEPS) 100*b494511aSVenki Rajagopalan 101*b494511aSVenki Rajagopalaninstall: $(INSTALL_DEPS) 102*b494511aSVenki Rajagopalan 103*b494511aSVenki Rajagopalan# 104*b494511aSVenki Rajagopalan# Include common targets 105*b494511aSVenki Rajagopalan# 106*b494511aSVenki Rajagopalaninclude $(UTSBASE)/intel/Makefile.targ 107*b494511aSVenki Rajagopalan 108*b494511aSVenki Rajagopalan# 109*b494511aSVenki Rajagopalan# Defines for local commands 110*b494511aSVenki Rajagopalan# 111*b494511aSVenki RajagopalanWARLOCK = warlock 112*b494511aSVenki RajagopalanWLCC = wlcc 113*b494511aSVenki RajagopalanTOUCH = touch 114*b494511aSVenki RajagopalanTEST = test 115*b494511aSVenki Rajagopalan 116*b494511aSVenki Rajagopalanwarlock: $(WARLOCK_OK) 117*b494511aSVenki Rajagopalan 118*b494511aSVenki Rajagopalan$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/eibnx.wlcmd warlock_ddi.files 119*b494511aSVenki Rajagopalan $(WARLOCK) -c $(WLCMD_DIR)/eibnx.wlcmd $(WARLOCK_OUT) \ 120*b494511aSVenki Rajagopalan -l ../warlock/ddi_dki_impl.ll 121*b494511aSVenki Rajagopalan $(TOUCH) $@ 122*b494511aSVenki Rajagopalan 123*b494511aSVenki Rajagopalan%.ll: $(UTSBASE)/common/io/ib/clients/eoib/enx_main.c \ 124*b494511aSVenki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/enx_hdlrs.c \ 125*b494511aSVenki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/enx_ibt.c \ 126*b494511aSVenki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/enx_log.c \ 127*b494511aSVenki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/enx_fip.c \ 128*b494511aSVenki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/enx_misc.c \ 129*b494511aSVenki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/enx_q.c \ 130*b494511aSVenki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/enx_ctl.c \ 131*b494511aSVenki Rajagopalan $(UTSBASE)/common/sys/ib/clients/eoib/fip.h \ 132*b494511aSVenki Rajagopalan $(UTSBASE)/common/sys/ib/clients/eoib/eib.h \ 133*b494511aSVenki Rajagopalan $(UTSBASE)/common/sys/ib/clients/eoib/enx_impl.h 134*b494511aSVenki Rajagopalan $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $< 135*b494511aSVenki Rajagopalan 136*b494511aSVenki Rajagopalanwarlock_ddi.files: 137*b494511aSVenki Rajagopalan @cd ../warlock; pwd; $(MAKE) warlock 138