Makefile revision d553bafd8687032230dfa65449d7e52c251c5293
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# CDDL HEADER START
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# The contents of this file are subject to the terms of the
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# Common Development and Distribution License (the "License").
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# You may not use this file except in compliance with the License.
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# or http://www.opensolaris.org/os/licensing.
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# See the License for the specific language governing permissions
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# and limitations under the License.
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# When distributing Covered Code, include this CDDL HEADER in each
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# If applicable, add the following below this CDDL HEADER, with the
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# fields enclosed by brackets "[]" replaced with your own identifying
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# information: Portions Copyright [yyyy] [name of copyright owner]
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# CDDL HEADER END
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# Use is subject to license terms.
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# This makefile drives the production of the TPM driver kernel
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# module.
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys IngersollUTSBASE = $(SRC)/uts
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# Define the module and object file sets.
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys IngersollMODULE = tpm
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys IngersollOBJECTS = $(TPM_OBJS:%=$(OBJS_DIR)/%)
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys IngersollLINTS = $(TPM_OBJS:%.o=$(LINTS_DIR)/%.ln)
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys IngersollROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE)
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys IngersollCONF_SRCDIR = $(UTSBASE)/common/io/tpm
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# Include common rules.
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# For now, TPM only delivers on x86/64 platforms, so only build
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# with the Intel rules.
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersollinclude $(UTSBASE)/intel/Makefile.intel
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# Define targets
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys IngersollALL_TARGET = $(BINARY) $(SRC_CONFILE)
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys IngersollLINT_TARGET = $(MODULE).lint
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys IngersollINSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE)
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# Dependency
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys IngersollLDFLAGS += -dy
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
d553bafd8687032230dfa65449d7e52c251c5293Wyllys IngersollCFLAGS += -xCC
d553bafd8687032230dfa65449d7e52c251c5293Wyllys Ingersoll
d553bafd8687032230dfa65449d7e52c251c5293Wyllys Ingersoll# This is for everything except /usr/include/tss/
d553bafd8687032230dfa65449d7e52c251c5293Wyllys IngersollCPPFLAGS += -I$(ROOT)/usr/include
d553bafd8687032230dfa65449d7e52c251c5293Wyllys Ingersoll
d553bafd8687032230dfa65449d7e52c251c5293Wyllys Ingersoll# This is for /usr/include/tss/, which is not built in the ON consolidation
d553bafd8687032230dfa65449d7e52c251c5293Wyllys IngersollCPPFLAGS += -I/usr/include
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll# Default build targets.
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll#
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll.KEEP_STATE:
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersolldef: $(DEF_DEPS)
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersollall: $(ALL_DEPS)
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersollclean: $(CLEAN_DEPS)
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersollclobber: $(CLOBBER_DEPS)
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersolllint: $(LINT_DEPS)
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersollmodlintlib: $(MODLINTLIB_DEPS)
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersollclean.lint: $(CLEAN_LINT_DEPS)
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersollinstall: $(INSTALL_DEPS)
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersollinclude $(UTSBASE)/intel/Makefile.targ
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll
47e946e784719ae402ace34695f67b0e6e76ae5cWyllys Ingersoll$(OBJECTS): $(OBJS_DIR)