xref: /illumos-gate/usr/src/uts/intel/tpm/Makefile (revision b6b206fc7fb36f7b13b01acf70ed6e676e405998)
147e946e7SWyllys Ingersoll#
247e946e7SWyllys Ingersoll# CDDL HEADER START
347e946e7SWyllys Ingersoll#
447e946e7SWyllys Ingersoll# The contents of this file are subject to the terms of the
547e946e7SWyllys Ingersoll# Common Development and Distribution License (the "License").
647e946e7SWyllys Ingersoll# You may not use this file except in compliance with the License.
747e946e7SWyllys Ingersoll#
847e946e7SWyllys Ingersoll# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
947e946e7SWyllys Ingersoll# or http://www.opensolaris.org/os/licensing.
1047e946e7SWyllys Ingersoll# See the License for the specific language governing permissions
1147e946e7SWyllys Ingersoll# and limitations under the License.
1247e946e7SWyllys Ingersoll#
1347e946e7SWyllys Ingersoll# When distributing Covered Code, include this CDDL HEADER in each
1447e946e7SWyllys Ingersoll# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1547e946e7SWyllys Ingersoll# If applicable, add the following below this CDDL HEADER, with the
1647e946e7SWyllys Ingersoll# fields enclosed by brackets "[]" replaced with your own identifying
1747e946e7SWyllys Ingersoll# information: Portions Copyright [yyyy] [name of copyright owner]
1847e946e7SWyllys Ingersoll#
1947e946e7SWyllys Ingersoll# CDDL HEADER END
2047e946e7SWyllys Ingersoll#
2147e946e7SWyllys Ingersoll# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2247e946e7SWyllys Ingersoll# Use is subject to license terms.
2347e946e7SWyllys Ingersoll#
24*b6b206fcSJohn Levon# Copyright (c) 2018, Joyent, Inc.
2547e946e7SWyllys Ingersoll
2647e946e7SWyllys IngersollUTSBASE	= $(SRC)/uts
2747e946e7SWyllys Ingersoll
2847e946e7SWyllys Ingersoll#
2947e946e7SWyllys Ingersoll#	Define the module and object file sets.
3047e946e7SWyllys Ingersoll#
3147e946e7SWyllys IngersollMODULE		= tpm
3247e946e7SWyllys IngersollOBJECTS		= $(TPM_OBJS:%=$(OBJS_DIR)/%)
3347e946e7SWyllys IngersollLINTS		= $(TPM_OBJS:%.o=$(LINTS_DIR)/%.ln)
3447e946e7SWyllys IngersollROOTMODULE	= $(ROOT_DRV_DIR)/$(MODULE)
3547e946e7SWyllys Ingersoll
3647e946e7SWyllys Ingersoll#
3747e946e7SWyllys Ingersoll#	Include common rules.
3847e946e7SWyllys Ingersoll#
3947e946e7SWyllys Ingersoll# For now, TPM only delivers on x86/64 platforms, so only build
4047e946e7SWyllys Ingersoll# with the Intel rules.
4147e946e7SWyllys Ingersoll#
4247e946e7SWyllys Ingersollinclude $(UTSBASE)/intel/Makefile.intel
4347e946e7SWyllys Ingersoll
4447e946e7SWyllys Ingersoll#
4547e946e7SWyllys Ingersoll#	Define targets
4647e946e7SWyllys Ingersoll#
47d25a0be9SWyllys IngersollALL_TARGET	= $(BINARY)
4847e946e7SWyllys IngersollLINT_TARGET	= $(MODULE).lint
49d25a0be9SWyllys IngersollINSTALL_TARGET	= $(BINARY) $(ROOTMODULE)
5047e946e7SWyllys Ingersoll
5147e946e7SWyllys Ingersoll#
5247e946e7SWyllys Ingersoll#	Dependency
5347e946e7SWyllys Ingersoll#
5447e946e7SWyllys IngersollLDFLAGS		+= -dy
5547e946e7SWyllys Ingersoll
56d553bafdSWyllys IngersollCFLAGS		+= -xCC
57d553bafdSWyllys Ingersoll
58d553bafdSWyllys Ingersoll# This is for everything except /usr/include/tss/
59d553bafdSWyllys IngersollCPPFLAGS	+= -I$(ROOT)/usr/include
60d553bafdSWyllys Ingersoll
61d553bafdSWyllys Ingersoll# This is for /usr/include/tss/, which is not built in the ON consolidation
62494f7e12SKeith M WesolowskiCPPFLAGS	+= -I$(ADJUNCT_PROTO)/usr/include
6347e946e7SWyllys Ingersoll
647014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
657014882cSRichard Lowe
66*b6b206fcSJohn Levon# needs work
67*b6b206fcSJohn Levon$(OBJS_DIR)/tpm.o := SMOFF += index_overflow
68*b6b206fcSJohn Levon
6947e946e7SWyllys Ingersoll#
7047e946e7SWyllys Ingersoll#	Default build targets.
7147e946e7SWyllys Ingersoll#
7247e946e7SWyllys Ingersoll.KEEP_STATE:
7347e946e7SWyllys Ingersoll
7447e946e7SWyllys Ingersolldef:		$(DEF_DEPS)
7547e946e7SWyllys Ingersoll
7647e946e7SWyllys Ingersollall:		$(ALL_DEPS)
7747e946e7SWyllys Ingersoll
7847e946e7SWyllys Ingersollclean:		$(CLEAN_DEPS)
7947e946e7SWyllys Ingersoll
8047e946e7SWyllys Ingersollclobber:	$(CLOBBER_DEPS)
8147e946e7SWyllys Ingersoll
8247e946e7SWyllys Ingersolllint:		$(LINT_DEPS)
8347e946e7SWyllys Ingersoll
8447e946e7SWyllys Ingersollmodlintlib:	$(MODLINTLIB_DEPS)
8547e946e7SWyllys Ingersoll
8647e946e7SWyllys Ingersollclean.lint:	$(CLEAN_LINT_DEPS)
8747e946e7SWyllys Ingersoll
8847e946e7SWyllys Ingersollinstall:	$(INSTALL_DEPS)
8947e946e7SWyllys Ingersoll
9047e946e7SWyllys Ingersollinclude $(UTSBASE)/intel/Makefile.targ
9147e946e7SWyllys Ingersoll
9247e946e7SWyllys Ingersoll$(OBJECTS): $(OBJS_DIR)
93