Will Arthur | ca8e7f3 | 2015-08-03 15:35:19 -0400 | [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 | |
Philip Tricca | e690e08 | 2015-09-07 18:17:35 -0700 | [diff] [blame] | 29 | include src_vars.mk |
| 30 | |
Philip Tricca | a509a68 | 2015-09-14 15:34:52 -0700 | [diff] [blame] | 31 | ACLOCAL_AMFLAGS = -I m4 |
| 32 | |
Philip Tricca | 2bd4adb | 2015-09-25 00:14:16 -0700 | [diff] [blame] | 33 | # stuff to build, what that stuff is, and where/if to install said stuff |
| 34 | sbin_PROGRAMS = $(resourcemgr) |
| 35 | noinst_PROGRAMS = $(tpmclient) $(tpmtest) |
Philip Tricca | a51ca97 | 2015-11-04 00:13:42 -0500 | [diff] [blame] | 36 | lib_LTLIBRARIES = $(libtpm2sapi) $(libtpm2tctidev) $(libtpm2tctisock) |
Philip Tricca | 7d3515f | 2015-09-07 10:06:56 -0700 | [diff] [blame] | 37 | |
Philip Tricca | 2bd4adb | 2015-09-25 00:14:16 -0700 | [diff] [blame] | 38 | # headers and where to install them |
| 39 | libtpm2sapidir = $(includedir)/tpm2sapi |
Philip Tricca | e2c1679 | 2016-01-05 12:07:22 -0800 | [diff] [blame^] | 40 | libtpm2sapi_HEADERS = $(srcdir)/include/tpm2sapi/*.h |
Philip Tricca | 97e869f | 2015-11-03 20:19:44 -0500 | [diff] [blame] | 41 | libtpm2tctidir = $(includedir)/tpm2tcti |
Philip Tricca | e2c1679 | 2016-01-05 12:07:22 -0800 | [diff] [blame^] | 42 | libtpm2tcti_HEADERS = $(srcdir)/include/tpm2tcti/*.h |
Philip Tricca | 2bd4adb | 2015-09-25 00:14:16 -0700 | [diff] [blame] | 43 | |
| 44 | # how to build stuff |
Philip Tricca | 0069247 | 2015-09-16 13:09:54 -0700 | [diff] [blame] | 45 | resourcemgr_resourcemgr_CFLAGS = $(RESOURCEMGR_INC) $(PTHREAD_CFLAGS) |
| 46 | resourcemgr_resourcemgr_CXXFLAGS = $(RESOURCEMGR_INC) $(PTHREAD_CFLAGS) |
Will-nuc | 8619aca | 2015-12-10 17:20:26 -0500 | [diff] [blame] | 47 | resourcemgr_resourcemgr_LDADD = $(libtpm2sapi) |
Philip Tricca | 0069247 | 2015-09-16 13:09:54 -0700 | [diff] [blame] | 48 | resourcemgr_resourcemgr_LDFLAGS = $(PTHREAD_LDFLAGS) |
Philip Tricca | 2bd4adb | 2015-09-25 00:14:16 -0700 | [diff] [blame] | 49 | resourcemgr_resourcemgr_SOURCES = $(RESOURCEMGR_C) $(TPMSOCKETS_CXX) \ |
Will-nuc | 8619aca | 2015-12-10 17:20:26 -0500 | [diff] [blame] | 50 | $(COMMON_C) $(COMMONTCTI_C) $(LOCALTPM_C) |
Philip Tricca | 10d1aa2 | 2015-09-07 10:55:58 -0700 | [diff] [blame] | 51 | |
Philip Tricca | e2c1679 | 2016-01-05 12:07:22 -0800 | [diff] [blame^] | 52 | sysapi_libtpm2sapi_la_CFLAGS = -I$(srcdir)/include/tpm2sapi |
Philip Tricca | 2bd4adb | 2015-09-25 00:14:16 -0700 | [diff] [blame] | 53 | sysapi_libtpm2sapi_la_SOURCES = $(SYSAPI_C) $(SYSAPIUTIL_C) |
Philip Tricca | 7d3515f | 2015-09-07 10:06:56 -0700 | [diff] [blame] | 54 | |
Philip Tricca | e2c1679 | 2016-01-05 12:07:22 -0800 | [diff] [blame^] | 55 | tcti_libtpm2tctidev_la_CFLAGS = -DSAPI_CLIENT $(TCTIDEV_INC) |
Will-nuc | f2ea1f1 | 2015-11-25 16:29:57 -0500 | [diff] [blame] | 56 | tcti_libtpm2tctidev_la_SOURCES = common/debug.c $(LOCALTPM_C) $(COMMONTCTI_C) |
Philip Tricca | 97e869f | 2015-11-03 20:19:44 -0500 | [diff] [blame] | 57 | |
Philip Tricca | e2c1679 | 2016-01-05 12:07:22 -0800 | [diff] [blame^] | 58 | tcti_libtpm2tctisock_la_CFLAGS = -DSAPI_CLIENT $(TCTISOCK_INC) |
Philip Tricca | a51ca97 | 2015-11-04 00:13:42 -0500 | [diff] [blame] | 59 | tcti_libtpm2tctisock_la_CXXFLAGS = -DSAPI_CLIENT $(TCTISOCK_INC) |
Will-nuc | f2ea1f1 | 2015-11-25 16:29:57 -0500 | [diff] [blame] | 60 | tcti_libtpm2tctisock_la_SOURCES = common/debug.c $(TPMSOCKETS_CXX) $(COMMONTCTI_C) |
Philip Tricca | a51ca97 | 2015-11-04 00:13:42 -0500 | [diff] [blame] | 61 | |
Philip Tricca | 38de202 | 2015-09-07 11:46:28 -0700 | [diff] [blame] | 62 | test_tpmclient_tpmclient_CFLAGS = -DSAPI_CLIENT $(TPMCLIENT_INC) |
Will-nuc | 8619aca | 2015-12-10 17:20:26 -0500 | [diff] [blame] | 63 | test_tpmclient_tpmclient_CXXFLAGS = -DSAPI_CLIENT $(TPMCLIENT_INC) $(COMMONTCTI_INC) $(TCTIDEV_INC) |
| 64 | test_tpmclient_tpmclient_LDADD = $(libtpm2sapi) $(libtpm2tctisock) $(libtpm2tctidev) |
Philip Tricca | a51ca97 | 2015-11-04 00:13:42 -0500 | [diff] [blame] | 65 | test_tpmclient_tpmclient_SOURCES = $(TPMCLIENT_CXX) $(COMMON_C) $(SAMPLE_C) |
Philip Tricca | 38de202 | 2015-09-07 11:46:28 -0700 | [diff] [blame] | 66 | |
Gang Wei | e960069 | 2015-09-10 14:07:14 +0800 | [diff] [blame] | 67 | test_tpmtest_tpmtest_CFLAGS = -DSAPI_CLIENT $(TPMTEST_INC) |
| 68 | test_tpmtest_tpmtest_CXXFLAGS = -DSAPI_CLIENT $(TPMTEST_INC) |
Philip Tricca | a51ca97 | 2015-11-04 00:13:42 -0500 | [diff] [blame] | 69 | test_tpmtest_tpmtest_LDADD = $(libtpm2sapi) $(libtpm2tctisock) |
| 70 | test_tpmtest_tpmtest_SOURCES = $(TPMTEST_CXX) $(COMMON_C) $(SAMPLE_C) |
Gang Wei | e960069 | 2015-09-10 14:07:14 +0800 | [diff] [blame] | 71 | |
Philip Tricca | 2bd4adb | 2015-09-25 00:14:16 -0700 | [diff] [blame] | 72 | # simple variables |
Philip Tricca | e2c1679 | 2016-01-05 12:07:22 -0800 | [diff] [blame^] | 73 | RESOURCEMGR_INC = -I$(srcdir)/include/tpm2sapi -I$(srcdir)/common \ |
| 74 | -I$(srcdir)/include/tpm2tcti \ |
Will-nuc | f2ea1f1 | 2015-11-25 16:29:57 -0500 | [diff] [blame] | 75 | -I$(srcdir)/resourcemgr -I$(srcdir)/test/tpmclient \ |
| 76 | -I$(srcdir)/tcti/commonTcti |
Philip Tricca | 2bd4adb | 2015-09-25 00:14:16 -0700 | [diff] [blame] | 77 | RESOURCEMGR_C = resourcemgr/resourcemgr.c |
Philip Tricca | 10d1aa2 | 2015-09-07 10:55:58 -0700 | [diff] [blame] | 78 | |
Philip Tricca | e2c1679 | 2016-01-05 12:07:22 -0800 | [diff] [blame^] | 79 | COMMONTCTI_INC = -I$(srcdir)/include/tpm2sapi -I$(srcdir)/common \ |
| 80 | -I$(srcdir)/include/tpm2tcti -I$(srcdir)/tcti/commonTcti |
Will-nuc | 8d4f967 | 2015-11-25 16:48:20 -0500 | [diff] [blame] | 81 | |
Philip Tricca | e2c1679 | 2016-01-05 12:07:22 -0800 | [diff] [blame^] | 82 | TCTIDEV_INC = -I$(srcdir)/tcti/localtpm $(COMMONTCTI_INC) |
Will-nuc | f2ea1f1 | 2015-11-25 16:29:57 -0500 | [diff] [blame] | 83 | |
Philip Tricca | e2c1679 | 2016-01-05 12:07:22 -0800 | [diff] [blame^] | 84 | TCTISOCK_INC = -I$(srcdir)/tcti/tpmsockets $(COMMONTCTI_INC) |
Philip Tricca | 97e869f | 2015-11-03 20:19:44 -0500 | [diff] [blame] | 85 | |
Philip Tricca | e2c1679 | 2016-01-05 12:07:22 -0800 | [diff] [blame^] | 86 | TPMCLIENT_INC = -I$(srcdir)/include/tpm2sapi -I$(srcdir)/include/tpm2tcti \ |
Philip Tricca | 2bd4adb | 2015-09-25 00:14:16 -0700 | [diff] [blame] | 87 | -I$(srcdir)/test/tpmclient -I$(srcdir)/common \ |
Philip Tricca | e2c1679 | 2016-01-05 12:07:22 -0800 | [diff] [blame^] | 88 | -I$(srcdir)/test/common/sample -I$(srcdir)/resourcemgr |
Philip Tricca | 2bd4adb | 2015-09-25 00:14:16 -0700 | [diff] [blame] | 89 | TPMCLIENT_CXX = test/tpmclient/tpmclient.cpp |
Philip Tricca | e690e08 | 2015-09-07 18:17:35 -0700 | [diff] [blame] | 90 | |
Philip Tricca | e2c1679 | 2016-01-05 12:07:22 -0800 | [diff] [blame^] | 91 | TPMTEST_INC = -I$(srcdir)/include/tpm2sapi -I$(srcdir)/include/tpm2tcti \ |
Philip Tricca | 2bd4adb | 2015-09-25 00:14:16 -0700 | [diff] [blame] | 92 | -I$(srcdir)/test/tpmclient -I$(srcdir)/common \ |
Gang Wei | e960069 | 2015-09-10 14:07:14 +0800 | [diff] [blame] | 93 | -I$(srcdir)/test/common/sample -I$(srcdir)/resourcemgr |
Philip Tricca | 2bd4adb | 2015-09-25 00:14:16 -0700 | [diff] [blame] | 94 | TPMTEST_CXX = test/tpmtest/tpmtest.cpp |
| 95 | |
| 96 | libtpm2sapi = sysapi/libtpm2sapi.la |
Philip Tricca | 97e869f | 2015-11-03 20:19:44 -0500 | [diff] [blame] | 97 | libtpm2tctidev = tcti/libtpm2tctidev.la |
Philip Tricca | a51ca97 | 2015-11-04 00:13:42 -0500 | [diff] [blame] | 98 | libtpm2tctisock = tcti/libtpm2tctisock.la |
Philip Tricca | 2bd4adb | 2015-09-25 00:14:16 -0700 | [diff] [blame] | 99 | resourcemgr = resourcemgr/resourcemgr |
| 100 | tpmclient = test/tpmclient/tpmclient |
| 101 | tpmtest = test/tpmtest/tpmtest |