Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# CDDL HEADER START
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# The contents of this file are subject to the terms of the
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# Common Development and Distribution License (the "License").
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# You may not use this file except in compliance with the License.
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# or http://www.opensolaris.org/os/licensing.
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# See the License for the specific language governing permissions
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# and limitations under the License.
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# When distributing Covered Code, include this CDDL HEADER in each
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# If applicable, add the following below this CDDL HEADER, with the
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# fields enclosed by brackets "[]" replaced with your own identifying
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# information: Portions Copyright [yyyy] [name of copyright owner]
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# CDDL HEADER END
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# This makefile drives the production of the EoIB Nexus driver
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# intel architecture dependent
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# Path to the base of the uts directory tree (usually /usr/src/uts)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanUTSBASE = ../..
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# Define the module and object file sets
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanMODULE = eoib
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanOBJECTS = $(EOIB_OBJS:%=$(OBJS_DIR)/%)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanLINTS = $(EOIB_OBJS:%.o=$(LINTS_DIR)/%.ln)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanWARLOCK_OUT = $(EOIB_OBJS:%.o=%.ll)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanWARLOCK_OK = $(MODULE).ok
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanWLCMD_DIR = $(UTSBASE)/common/io/warlock
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# Include common rules
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalaninclude $(UTSBASE)/intel/Makefile.intel
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# Define targets
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanALL_TARGET = $(BINARY)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanLINT_TARGET = $(MODULE).lint
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# Module specific debug flag
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanCPPFLAGS += -DEIB_DEBUG
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# Lint pass one enforcement
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanCFLAGS += $(CCVERBOSE)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-switch
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-uninitialized
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# Depends on misc/ibtl
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanLDFLAGS += -dy -Nmisc/mac -Nmisc/ibtl -Nmisc/ibcm -Nmisc/ibmf
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# Default build targets
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan.KEEP_STATE:
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalandef: $(DEF_DEPS)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalanall: $(ALL_DEPS)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalanclean: $(CLEAN_DEPS)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalanclobber: $(CLOBBER_DEPS)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalanlint: $(LINT_DEPS)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalanmodlintlib: $(MODLINTLIB_DEPS)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalanclean.lint: $(CLEAN_LINT_DEPS)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalaninstall: $(INSTALL_DEPS)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# Include common targets
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalaninclude $(UTSBASE)/intel/Makefile.targ
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan# Defines for local commands
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan#
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanWARLOCK = warlock
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanWLCC = wlcc
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanTOUCH = touch
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki RajagopalanTEST = test
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalanwarlock: $(WARLOCK_OK)
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/eoib.wlcmd warlock_ddi.files
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(WARLOCK) -c $(WLCMD_DIR)/eoib.wlcmd $(WARLOCK_OUT) \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan -l ../warlock/ddi_dki_impl.ll
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(TOUCH) $@
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan%.ll: $(UTSBASE)/common/io/ib/clients/eoib/eib_adm.c \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/eib_chan.c \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/eib_cmn.c \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/eib_ctl.c \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/eib_data.c \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/eib_fip.c \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/eib_ibt.c \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/eib_log.c \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/eib_mac.c \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/eib_main.c \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/eib_rsrc.c \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/eib_svc.c \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(UTSBASE)/common/io/ib/clients/eoib/eib_vnic.c \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(UTSBASE)/common/sys/ib/clients/eoib/fip.h \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(UTSBASE)/common/sys/ib/clients/eoib/eib.h \
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(UTSBASE)/common/sys/ib/clients/eoib/eib_impl.h
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalanwarlock_ddi.files:
b494511a9cf72b1fc4eb13a0e593f55c624ab829Venki Rajagopalan @cd ../warlock; pwd; $(MAKE) warlock