blob: 319d3cdd7378fe892c8568e6137b81a2df6be8e9 [file] [log] [blame]
Philip Tricca64be7802015-08-25 07:14:43 -07001#;**********************************************************************;
2#
3# Copyright (c) 2015, Intel Corporation
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are met:
8#
9# 1. Redistributions of source code must retain the above copyright notice,
10# this list of conditions and the following disclaimer.
11#
12# 2. Redistributions in binary form must reproduce the above copyright notice,
13# this list of conditions and the following disclaimer in the documentation
14# and/or other materials provided with the distribution.
15#
16# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
26# THE POSSIBILITY OF SUCH DAMAGE.
27#;**********************************************************************;
28
29SAMPLE_SRC = \
30 ../common/sample/CatSizedByteBuffer.c \
31 ../common/sample/CopySizedBuffer.c \
32 ../common/sample/CreateNullSession.c \
33 ../common/sample/DecryptEncrypt.c \
34 ../common/sample/Entity.c \
35 ../common/sample/kdfa.c \
36 ../common/sample/LoadExternalHMACKey.c \
37 ../common/sample/sample.h \
38 ../common/sample/SessionHmac.c \
39 ../common/sample/SetLocality.c \
40 ../common/sample/StartAuthSession.c \
41 ../common/sample/TpmCalcPHash.c \
42 ../common/sample/TpmHandleToName.c \
43 ../common/sample/TpmHash.c \
44 ../common/sample/TpmHmac.c \
45 ../common/sample/sample.h
46TPMSOCKETS_SRC = \
47 ../../tcti/tpmsockets/tpmsockets.cpp \
48 ../../tcti/tpmsockets/tpmsockets.h
Philip Tricca64be7802015-08-25 07:14:43 -070049SYSAPI_SRC = \
50 ../../sysapi/include/basetypes.h \
51 ../../sysapi/include/endianConv.h \
52 ../../sysapi/include/implementation.h \
53 ../../sysapi/include/tpm20.h \
54 ../../sysapi/include/tpmb.h \
55 ../../sysapi/include/tss2_common.h \
56 ../../sysapi/include/tss2_sys_api_marshalUnmarshal.h \
57 ../../sysapi/include/tss2_sys_api_part3.h \
58 ../../sysapi/include/tss2_sysapi_util.h \
59 ../../sysapi/include/tss2_sys.h \
60 ../../sysapi/include/tss2_tcti.h \
61 ../../sysapi/include/tss2_tcti_util.h \
62 ../../sysapi/include/tss2_tpm2_types.h
63
64TPMCLIENT_SRC = \
65 tpmclient.cpp \
66 tpmclient.h \
67 $(SAMPLE_SRC) \
Philip Tricca64be7802015-08-25 07:14:43 -070068 $(SYSAPI_SRC)
69
70INCLUDE_DIRS = -I$(srcdir)/../../sysapi/include -I$(srcdir) \
71 -I$(srcdir)/../../tcti/tpmsockets -I$(srcdir)/../../common \
72 -I$(srcdir)/../common/sample -I$(srcdir)/../../resourcemgr
73
74AM_CFLAGS = $(INCLUDE_DIRS)
75AM_CXXFLAGS = $(INCLUDE_DIRS)
76
77LIBTPM = ../../sysapi/libtpm.a
Philip Triccab9a1adf2015-08-25 10:35:20 -070078LIBCMN = ../../common/libcommon.a
Philip Tricca64be7802015-08-25 07:14:43 -070079
Philip Triccab9a1adf2015-08-25 10:35:20 -070080$(LIBCMN):
Philip Triccac41925d2015-09-07 10:22:37 -070081 $(MAKE) -C ../../ common/libcommon.a
Philip Tricca64be7802015-08-25 07:14:43 -070082$(LIBTPM):
Philip Tricca7d3515f2015-09-07 10:06:56 -070083 $(MAKE) -C ../../ sysapi/libtpm.a
Philip Tricca64be7802015-08-25 07:14:43 -070084
85noinst_PROGRAMS = tpmclient
root14b5bab2015-09-02 16:24:20 -040086LDADD = sapiclient_tpmsockets.o sapiclient_getcommands.o $(LIBCMN) $(LIBTPM)
Philip Tricca64be7802015-08-25 07:14:43 -070087tpmclient_SOURCES = $(TPMCLIENT_SRC)
88
89# Build special version of tpmsockets code for test application.
root14b5bab2015-09-02 16:24:20 -040090sapiclient_getcommands.o: AM_CFLAGS+=-DSAPI_CLIENT
91sapiclient_getcommands.o: ../../common/getcommands.c
92 $(CC) $(AM_CFLAGS) -c $< -o $@
93
94# Build special version of getcommands code for test application.
Philip Tricca64be7802015-08-25 07:14:43 -070095sapiclient_tpmsockets.o: AM_CXXFLAGS+=-DSAPI_CLIENT
96sapiclient_tpmsockets.o: ../../tcti/tpmsockets/tpmsockets.cpp
97 $(CXX) $(AM_CXXFLAGS) -c $< -o $@
root14b5bab2015-09-02 16:24:20 -040098
99