Makefile revision bb25c06cca41ca78e5fb87fbb8e81d55beb18c95
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# CDDL HEADER START
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# The contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Common Development and Distribution License (the "License").
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner# You may not use this file except in compliance with the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# or http://www.opensolaris.org/os/licensing.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# When distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# If applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# fields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# information: Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# CDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Use is subject to license terms.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#ident "%Z%%M% %I% %E% SMI"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# This makefile drives the production of the ibnex driver
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# sparc architecture dependent
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Path to the base of the uts directory tree (usually /usr/src/uts).
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinUTSBASE = ../..
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Define the module and object file sets.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinMODULE = ib
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinOBJECTS = $(IB_OBJS:%=$(OBJS_DIR)/%)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLINTS = $(IB_OBJS:%.o=$(LINTS_DIR)/%.ln)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCONF_SRCDIR = $(UTSBASE)/common/io/ib/ibnex
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinWARLOCK_OBJS = $(IB_OBJS:%.o=%.ll)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinWARLOCK_OK = $(MODULE).ok
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Include common rules.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chininclude $(UTSBASE)/sparc/Makefile.sparc
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Define targets
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinALL_TARGET = $(BINARY) $(SRC_CONFILE)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLINT_TARGET = $(MODULE).lint
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Overrides.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinALL_BUILDS = $(ALL_BUILDSONLY64)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinDEF_BUILDS = $(DEF_BUILDSONLY64)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# lint pass one enforcement
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinCFLAGS += $(CCVERBOSE)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# For now, disable these lint checks; maintainers should endeavor
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# to investigate and remove these for maximum lint coverage.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Please do not carry these forward to new Makefiles.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLINTTAGS += -erroff=E_SUSPICIOUS_COMPARISON
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLINTTAGS += -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLINTTAGS += -erroff=E_STATIC_UNUSED
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLINTTAGS += -erroff=E_PTRDIFF_OVERFLOW
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLINTTAGS += -erroff=E_ASSIGN_NARROW_CONV
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# depends on misc/ibtl
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinLDFLAGS += -dy -Nmisc/ibdm -Nmisc/ibtl
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# Default build targets.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin.KEEP_STATE:
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chindef: $(DEF_DEPS)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinall: $(ALL_DEPS)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinclean: $(CLEAN_DEPS); \
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin $(RM) $(WARLOCK_OBJS) $(WARLOCK_OK)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinclobber: $(CLOBBER_DEPS); \
$(RM) $(WARLOCK_OBJS) $(WARLOCK_OK)
lint: $(LINT_DEPS)
modlintlib: $(MODLINTLIB_DEPS) lint32
clean.lint: $(CLEAN_LINT_DEPS)
install: $(INSTALL_DEPS)
#
# Include common targets.
#
include $(UTSBASE)/sparc/Makefile.targ
#
# Defines for local commands.
#
WARLOCK = warlock
WLCC = wlcc
TOUCH = touch
SCCS = sccs
TEST = test
warlock: $(MODULE).ok
%.wlcmd:
$(TEST) -f $@ || $(SCCS) get $@
ib.ok: $(WARLOCK_OBJS) ib.wlcmd ibdm_files warlock_ddi.files
$(WARLOCK) -c ./ib.wlcmd $(WARLOCK_OBJS) \
-l ../ibdm/ibdm.ll -l ../warlock/ddi_dki_impl.ll
$(TOUCH) $@
%.ll: $(UTSBASE)/common/io/ib/ibnex/%.c \
$(UTSBASE)/common/sys/ib/ibnex/ibnex.h \
$(UTSBASE)/common/sys/ib/ibnex/ibnex_devctl.h
$(WLCC) $(CPPFLAGS) -DDEBUG -o $@ $<
ibdm_files :
@cd ../ibdm; pwd; $(MAKE) warlock
warlock_ddi.files:
@cd ../warlock; pwd; $(MAKE) warlock