Makefile revision 7014882c6a3672fd0e5d60200af8643ae53c5928
901b5fb3b3fa409a42ac7e93b7643f373997305bMark Andrews#
499b34cea04a46823d003d4c0520c8b03e8513cbBrian Wellington# CDDL HEADER START
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence#
901b5fb3b3fa409a42ac7e93b7643f373997305bMark Andrews# The contents of this file are subject to the terms of the
901b5fb3b3fa409a42ac7e93b7643f373997305bMark Andrews# Common Development and Distribution License (the "License").
901b5fb3b3fa409a42ac7e93b7643f373997305bMark Andrews# You may not use this file except in compliance with the License.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence#
15a44745412679c30a6d022733925af70a38b715David Lawrence# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15a44745412679c30a6d022733925af70a38b715David Lawrence# or http://www.opensolaris.org/os/licensing.
15a44745412679c30a6d022733925af70a38b715David Lawrence# See the License for the specific language governing permissions
15a44745412679c30a6d022733925af70a38b715David Lawrence# and limitations under the License.
15a44745412679c30a6d022733925af70a38b715David Lawrence#
15a44745412679c30a6d022733925af70a38b715David Lawrence# When distributing Covered Code, include this CDDL HEADER in each
15a44745412679c30a6d022733925af70a38b715David Lawrence# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15a44745412679c30a6d022733925af70a38b715David Lawrence# If applicable, add the following below this CDDL HEADER, with the
901b5fb3b3fa409a42ac7e93b7643f373997305bMark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
901b5fb3b3fa409a42ac7e93b7643f373997305bMark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
4be63b1fd8c18dbeca1648d6cf22fa14f057a469David Lawrence#
4be63b1fd8c18dbeca1648d6cf22fa14f057a469David Lawrence# CDDL HEADER END
4be63b1fd8c18dbeca1648d6cf22fa14f057a469David Lawrence#
499b34cea04a46823d003d4c0520c8b03e8513cbBrian Wellington#
901b5fb3b3fa409a42ac7e93b7643f373997305bMark Andrews# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
12dd8db40b919c65160d2acefb05ed892569c950Andreas Gustafsson#
901b5fb3b3fa409a42ac7e93b7643f373997305bMark Andrews#
05f90cac85760b4edef2962209df49ea019c180fMark Andrews
05f90cac85760b4edef2962209df49ea019c180fMark Andrews#
05f90cac85760b4edef2962209df49ea019c180fMark Andrews# Path to the base of the uts directory tree (usually /usr/src/uts).
05f90cac85760b4edef2962209df49ea019c180fMark Andrews#
05f90cac85760b4edef2962209df49ea019c180fMark AndrewsUTSBASE = ../..
05f90cac85760b4edef2962209df49ea019c180fMark Andrews
05f90cac85760b4edef2962209df49ea019c180fMark Andrews#
05f90cac85760b4edef2962209df49ea019c180fMark Andrews# Define the module and object file sets.
4be63b1fd8c18dbeca1648d6cf22fa14f057a469David Lawrence#
MODULE = ibp
OBJECTS = $(IBD_OBJS:%=$(OBJS_DIR)/%)
LINTS = $(IBD_OBJS:%.o=$(LINTS_DIR)/%.ln)
ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
CONF_SRCDIR = $(UTSBASE)/common/io/ib/clients/ibd
LDFLAGS += -dy -Nmisc/mac -Nmisc/ibtl -Nmisc/ibcm -Nmisc/ibmf -Ndrv/ip \
-Nmisc/dls -Ndrv/dld
WARLOCK_OUT = $(IBD_OBJS:%.o=%.ll)
WARLOCK_OK = $(MODULE).ok
WLCMD_DIR = $(UTSBASE)/common/io/warlock
#
# Include common rules.
#
include $(UTSBASE)/intel/Makefile.intel
#
# Define targets
#
ALL_TARGET = $(BINARY) $(CONFMOD)
LINT_TARGET = $(MODULE).lint
INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
#
# For now, disable these lint checks; maintainers should endeavor
# to investigate and remove these for maximum lint coverage.
# Please do not carry these forward to new Makefiles.
#
LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
CERRWARN += -_gcc=-Wno-uninitialized
CERRWARN += -_gcc=-Wno-switch
#
# Default build targets.
#
.KEEP_STATE:
def: $(DEF_DEPS)
all: $(ALL_DEPS)
clean: $(CLEAN_DEPS)
$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
clobber: $(CLOBBER_DEPS)
$(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
lint: $(LINT_DEPS)
modlintlib: $(MODLINTLIB_DEPS)
clean.lint: $(CLEAN_LINT_DEPS)
install: $(INSTALL_DEPS)
#
# Include common targets.
#
include $(UTSBASE)/intel/Makefile.targ
#
# Defines for local commands.
#
WARLOCK = warlock
WLCC = wlcc
TOUCH = touch
TEST = test
warlock: $(WARLOCK_OK)
$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/ibd.wlcmd warlock_ddi.files
$(WARLOCK) -c $(WLCMD_DIR)/ibd.wlcmd $(WARLOCK_OUT) \
-l ../warlock/ddi_dki_impl.ll
$(TOUCH) $@
%.ll: $(UTSBASE)/common/io/ib/clients/ibd/%.c \
$(UTSBASE)/common/sys/ib/clients/ibd/ibd.h
$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
warlock_ddi.files:
@cd ../warlock; pwd; $(MAKE) warlock