Makefile revision c39526b769298791ff5b0b6c5e761f49aabaeb4e
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# CDDL HEADER START
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# The contents of this file are subject to the terms of the
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# Common Development and Distribution License (the "License").
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# You may not use this file except in compliance with the License.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# or http://www.opensolaris.org/os/licensing.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# See the License for the specific language governing permissions
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# and limitations under the License.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# When distributing Covered Code, include this CDDL HEADER in each
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# If applicable, add the following below this CDDL HEADER, with the
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# fields enclosed by brackets "[]" replaced with your own identifying
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# information: Portions Copyright [yyyy] [name of copyright owner]
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# CDDL HEADER END
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# Path to the base of the uts directory tree (usually /usr/src/uts).
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarUTSBASE = ../..
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# Define the module and object file sets.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarMODULE = sol_ofs
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarOBJECTS = $(SOL_OFS_OBJS:%=$(OBJS_DIR)/%)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarLINTS = $(SOL_OFS_OBJS:%.o=$(LINTS_DIR)/%.ln)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarROOTMODULE = $(ROOT_MISC_DIR)/$(MODULE)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarLDFLAGS += -dy -Nmisc/ibtl -Nmisc/ibcm
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarWARLOCK_OUT = $(SOL_OFS:%.o=%.ll)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarWARLOCK_OK = $(MODULE).ok
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarWLCMD_DIR = $(UTSBASE)/common/io/warlock
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# Include common rules.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarinclude $(UTSBASE)/sparc/Makefile.sparc
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# Define targets
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarALL_TARGET = $(BINARY)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarLINT_TARGET = $(MODULE).lint
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarINSTALL_TARGET = $(BINARY) $(ROOTMODULE)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# For now, disable these lint checks; maintainers should endeavor
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# to investigate and remove these for maximum lint coverage.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# Please do not carry these forward to new Makefiles.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarLINTTAGS += -erroff=E_STATIC_UNUSED
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarLINTTAGS += -erroff=E_CONST_TRUNCATED_BY_ASSIGN
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# Default build targets.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar.KEEP_STATE:
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikardef: $(DEF_DEPS)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarall: $(ALL_DEPS)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarclean: $(CLEAN_DEPS)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarclobber: $(CLOBBER_DEPS)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar $(RM) $(WARLOCK_OUT) $(WARLOCK_OK)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarlint: $(LINT_DEPS)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarmodlintlib: $(MODLINTLIB_DEPS)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarclean.lint: $(CLEAN_LINT_DEPS)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarinstall: $(INSTALL_DEPS)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# Include common targets.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarinclude $(UTSBASE)/sparc/Makefile.targ
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# Defines for local commands.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarWARLOCK = warlock
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarWLCC = wlcc
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarTOUCH = touch
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarTEST = test
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarwarlock: $(WARLOCK_OK)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar$(WARLOCK_OK): $(WARLOCK_OUT) $(WLCMD_DIR)/sol_ofs.wlcmd warlock_ddi.files
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar $(WARLOCK) -c $(WLCMD_DIR)/sol_ofs.wlcmd $(WARLOCK_OUT) \
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar -l ../warlock/ddi_dki_impl.ll
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar $(TOUCH) $@
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar%.ll: $(UTSBASE)/common/io/ib/clients/of/sol_ofs/%.c \
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar $(UTSBASE)/common/sys/ib/clients/of/sol_ofs/sol_uverbs.h
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar $(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarwarlock_ddi.files:
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar @cd ../warlock; pwd; $(MAKE) warlock