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