Makefile revision 4c06356b0f0fffb4fc1b6eccc8e5d8e2254a84d6
74e20cfe817b82802b16fac8690dadcda76f54f5nh# CDDL HEADER START
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nh# The contents of this file are subject to the terms of the
74e20cfe817b82802b16fac8690dadcda76f54f5nh# Common Development and Distribution License (the "License").
74e20cfe817b82802b16fac8690dadcda76f54f5nh# You may not use this file except in compliance with the License.
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nh# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
74e20cfe817b82802b16fac8690dadcda76f54f5nh# or http://www.opensolaris.org/os/licensing.
74e20cfe817b82802b16fac8690dadcda76f54f5nh# See the License for the specific language governing permissions
74e20cfe817b82802b16fac8690dadcda76f54f5nh# and limitations under the License.
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nh# When distributing Covered Code, include this CDDL HEADER in each
74e20cfe817b82802b16fac8690dadcda76f54f5nh# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
74e20cfe817b82802b16fac8690dadcda76f54f5nh# If applicable, add the following below this CDDL HEADER, with the
74e20cfe817b82802b16fac8690dadcda76f54f5nh# fields enclosed by brackets "[]" replaced with your own identifying
74e20cfe817b82802b16fac8690dadcda76f54f5nh# information: Portions Copyright [yyyy] [name of copyright owner]
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nh# CDDL HEADER END
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nh# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
74e20cfe817b82802b16fac8690dadcda76f54f5nh# Use is subject to license terms.
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nh# This makefile drives the production of the pmcs driver kernel module.
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nh# intel architecture dependent
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nh
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nh# Paths to the base of the uts directory trees
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nhUTSBASE = ../../../../src/uts
74e20cfe817b82802b16fac8690dadcda76f54f5nh
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nh# Define the module and object file sets.
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nhMODULE = pmcs
74e20cfe817b82802b16fac8690dadcda76f54f5nhOBJECTS = $(PMCS_OBJS:%=$(OBJS_DIR)/%)
74e20cfe817b82802b16fac8690dadcda76f54f5nhLINTS = $(PMCS_OBJS:%.o=$(LINTS_DIR)/%.ln)
74e20cfe817b82802b16fac8690dadcda76f54f5nhROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
74e20cfe817b82802b16fac8690dadcda76f54f5nhCONF_SRCDIR = $(UTSBASE)/common/io/scsi/adapters/pmcs
74e20cfe817b82802b16fac8690dadcda76f54f5nhWARLOCK_OUT = $(PMCS_OBJS:%.o=%.ll)
74e20cfe817b82802b16fac8690dadcda76f54f5nhWARLOCK_OK = $(MODULE).ok
74e20cfe817b82802b16fac8690dadcda76f54f5nhWLCMD_DIR = $(UTSBASE)/common/io/warlock
74e20cfe817b82802b16fac8690dadcda76f54f5nhBLDREVHDR = ../../common/sys/scsi/adapters/pmcs/pmcs_bldrev.h
74e20cfe817b82802b16fac8690dadcda76f54f5nhBLDREVHDR_T = ../../common/sys/scsi/adapters/pmcs/pmcs_bldrev.h.tmp
74e20cfe817b82802b16fac8690dadcda76f54f5nh
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nh# Kernel Module Dependencies
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nhLDFLAGS += -dy -Nmisc/scsi
74e20cfe817b82802b16fac8690dadcda76f54f5nh
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nh# Define targets
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nhALL_TARGET = $(BINARY) $(CONFMOD)
74e20cfe817b82802b16fac8690dadcda76f54f5nhLINT_TARGET = $(MODULE).lint
74e20cfe817b82802b16fac8690dadcda76f54f5nhINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
74e20cfe817b82802b16fac8690dadcda76f54f5nh
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nh# Include common rules.
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nhinclude $(UTSBASE)/intel/Makefile.intel
74e20cfe817b82802b16fac8690dadcda76f54f5nhinclude $(CONF_SRCDIR)/pmcs8001fw.version
74e20cfe817b82802b16fac8690dadcda76f54f5nh
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nh# Add additional flags
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
74e20cfe817b82802b16fac8690dadcda76f54f5nhPMCS_DRV_FLGS = -DMODNAME=\"${MODULE}\"
74e20cfe817b82802b16fac8690dadcda76f54f5nhCPPFLAGS += $(PMCS_DRV_FLGS) \
74e20cfe817b82802b16fac8690dadcda76f54f5nh -DPMCS_FIRMWARE_VERSION=${PMCS_FW_VERSION} \
74e20cfe817b82802b16fac8690dadcda76f54f5nh -DPMCS_FIRMWARE_VERSION_STRING=\"${PMCS_FW_VERSION_STRING}\"
74e20cfe817b82802b16fac8690dadcda76f54f5nh
74e20cfe817b82802b16fac8690dadcda76f54f5nh
74e20cfe817b82802b16fac8690dadcda76f54f5nh#
# Default build targets.
#
.KEEP_STATE:
all: ADDBUILDREV $(ALL_DEPS)
ADDBUILDREV:
@$(ECHO) '#define PMCS_BUILD_VERSION "'`date '+v20%y%m%d'`\"> \
$(BLDREVHDR_T); \
if [ -f $(BLDREVHDR) ]; then \
RD=`$(DIFF) $(BLDREVHDR) $(BLDREVHDR_T) || $(TRUE)`; \
if [ ! -z "$$RD" ]; then \
$(MV) $(BLDREVHDR_T) $(BLDREVHDR); \
fi; \
else \
$(MV) $(BLDREVHDR_T) $(BLDREVHDR); \
fi; \
$(RM) $(BLDREVHDR_T)
def: $(DEF_DEPS)
clean: $(CLEAN_DEPS)
-$(RM) $(BLDREVHDR)
clobber: $(CLOBBER_DEPS)
lint: $(LINT_DEPS)
modlintlib: $(MODLINTLIB_DEPS)
clean.lint: $(CLEAN_LINT_DEPS)
install: ADDBUILDREV $(INSTALL_DEPS)
#
# Include common targets.
#
include $(UTSBASE)/intel/Makefile.targ