Philip Tricca | 64be780 | 2015-08-25 07:14:43 -0700 | [diff] [blame] | 1 | #;**********************************************************************; |
| 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 | |
| 29 | SAMPLE_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 |
| 46 | TPMSOCKETS_SRC = \ |
| 47 | ../../tcti/tpmsockets/tpmsockets.cpp \ |
| 48 | ../../tcti/tpmsockets/tpmsockets.h |
Philip Tricca | 64be780 | 2015-08-25 07:14:43 -0700 | [diff] [blame] | 49 | SYSAPI_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 | |
| 64 | TPMCLIENT_SRC = \ |
| 65 | tpmclient.cpp \ |
| 66 | tpmclient.h \ |
| 67 | $(SAMPLE_SRC) \ |
Philip Tricca | 64be780 | 2015-08-25 07:14:43 -0700 | [diff] [blame] | 68 | $(SYSAPI_SRC) |
| 69 | |
| 70 | INCLUDE_DIRS = -I$(srcdir)/../../sysapi/include -I$(srcdir) \ |
| 71 | -I$(srcdir)/../../tcti/tpmsockets -I$(srcdir)/../../common \ |
| 72 | -I$(srcdir)/../common/sample -I$(srcdir)/../../resourcemgr |
| 73 | |
| 74 | AM_CFLAGS = $(INCLUDE_DIRS) |
| 75 | AM_CXXFLAGS = $(INCLUDE_DIRS) |
| 76 | |
| 77 | LIBTPM = ../../sysapi/libtpm.a |
Philip Tricca | b9a1adf | 2015-08-25 10:35:20 -0700 | [diff] [blame] | 78 | LIBCMN = ../../common/libcommon.a |
Philip Tricca | 64be780 | 2015-08-25 07:14:43 -0700 | [diff] [blame] | 79 | |
Philip Tricca | b9a1adf | 2015-08-25 10:35:20 -0700 | [diff] [blame] | 80 | $(LIBCMN): |
Philip Tricca | c41925d | 2015-09-07 10:22:37 -0700 | [diff] [blame] | 81 | $(MAKE) -C ../../ common/libcommon.a |
Philip Tricca | 64be780 | 2015-08-25 07:14:43 -0700 | [diff] [blame] | 82 | $(LIBTPM): |
Philip Tricca | 7d3515f | 2015-09-07 10:06:56 -0700 | [diff] [blame] | 83 | $(MAKE) -C ../../ sysapi/libtpm.a |
Philip Tricca | 64be780 | 2015-08-25 07:14:43 -0700 | [diff] [blame] | 84 | |
| 85 | noinst_PROGRAMS = tpmclient |
root | 14b5bab | 2015-09-02 16:24:20 -0400 | [diff] [blame] | 86 | LDADD = sapiclient_tpmsockets.o sapiclient_getcommands.o $(LIBCMN) $(LIBTPM) |
Philip Tricca | 64be780 | 2015-08-25 07:14:43 -0700 | [diff] [blame] | 87 | tpmclient_SOURCES = $(TPMCLIENT_SRC) |
| 88 | |
| 89 | # Build special version of tpmsockets code for test application. |
root | 14b5bab | 2015-09-02 16:24:20 -0400 | [diff] [blame] | 90 | sapiclient_getcommands.o: AM_CFLAGS+=-DSAPI_CLIENT |
| 91 | sapiclient_getcommands.o: ../../common/getcommands.c |
| 92 | $(CC) $(AM_CFLAGS) -c $< -o $@ |
| 93 | |
| 94 | # Build special version of getcommands code for test application. |
Philip Tricca | 64be780 | 2015-08-25 07:14:43 -0700 | [diff] [blame] | 95 | sapiclient_tpmsockets.o: AM_CXXFLAGS+=-DSAPI_CLIENT |
| 96 | sapiclient_tpmsockets.o: ../../tcti/tpmsockets/tpmsockets.cpp |
| 97 | $(CXX) $(AM_CXXFLAGS) -c $< -o $@ |
root | 14b5bab | 2015-09-02 16:24:20 -0400 | [diff] [blame] | 98 | |
| 99 | |