Will Arthur | ca8e7f3 | 2015-08-03 15:35:19 -0400 | [diff] [blame] | 1 | #;**********************************************************************; |
Philip Tricca | 49635f4 | 2018-03-10 19:19:58 -0800 | [diff] [blame] | 2 | # Copyright (c) 2015 - 2018 Intel Corporation |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 3 | # Copyright (c) 2018 Fraunhofer SIT sponsored by Infineon Technologies AG |
Will Arthur | ca8e7f3 | 2015-08-03 15:35:19 -0400 | [diff] [blame] | 4 | # All rights reserved. |
| 5 | # |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 6 | # Redistribution and use in source and binary forms, with or without |
Will Arthur | ca8e7f3 | 2015-08-03 15:35:19 -0400 | [diff] [blame] | 7 | # modification, are permitted provided that the following conditions are met: |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 8 | # |
| 9 | # 1. Redistributions of source code must retain the above copyright notice, |
Will Arthur | ca8e7f3 | 2015-08-03 15:35:19 -0400 | [diff] [blame] | 10 | # this list of conditions and the following disclaimer. |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 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 |
Will Arthur | ca8e7f3 | 2015-08-03 15:35:19 -0400 | [diff] [blame] | 14 | # and/or other materials provided with the distribution. |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 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 |
Will Arthur | ca8e7f3 | 2015-08-03 15:35:19 -0400 | [diff] [blame] | 26 | # THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | #;**********************************************************************; |
Andreas Fuchs | 2968c71 | 2018-02-01 18:22:47 +0100 | [diff] [blame] | 28 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 29 | ### Initialize global variables used throughout the file ### |
Philip Tricca | d5a6ff4 | 2018-03-13 18:19:42 -0700 | [diff] [blame] | 30 | INCLUDE_DIRS = -I$(srcdir)/src -I$(srcdir)/include/tss2 |
Philip Tricca | a509a68 | 2015-09-14 15:34:52 -0700 | [diff] [blame] | 31 | ACLOCAL_AMFLAGS = -I m4 |
Andreas Fuchs | 61cb7fb | 2017-11-22 10:23:01 +0100 | [diff] [blame] | 32 | AM_CFLAGS = $(INCLUDE_DIRS) $(EXTRA_CFLAGS) $(CODE_COVERAGE_CFLAGS) |
| 33 | AM_LDFLAGS = $(EXTRA_LDFLAGS) $(CODE_COVERAGE_LIBS) |
Philip Tricca | a509a68 | 2015-09-14 15:34:52 -0700 | [diff] [blame] | 34 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 35 | # Initialize empty variables to be extended throughout |
| 36 | lib_LTLIBRARIES = |
| 37 | noinst_LTLIBRARIES = |
| 38 | EXTRA_DIST = |
| 39 | CLEANFILES = |
| 40 | MOSTLYCLEANFILES = |
Andreas Fuchs | a0eda36 | 2018-03-28 11:56:42 +0200 | [diff] [blame] | 41 | noinst_PROGRAMS = |
Philip Tricca | 4334dee | 2016-08-09 19:56:28 -0700 | [diff] [blame] | 42 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 43 | ### Add ax_* rules ### |
| 44 | # ax_code_coverage |
| 45 | @CODE_COVERAGE_RULES@ |
Juergen Repp | ff821bd | 2017-12-11 15:21:42 +0100 | [diff] [blame] | 46 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 47 | # ax_doxygen |
| 48 | @DX_RULES@ |
| 49 | MOSTLYCLEANFILES += $(DX_CLEANFILES) |
Philip Tricca | 99d4142 | 2017-06-18 15:11:50 -0700 | [diff] [blame] | 50 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 51 | ### Include make files ### |
| 52 | # Add source code files from bootstrap |
| 53 | include src_vars.mk |
Andreas Fuchs | 24fb130 | 2017-11-22 10:21:18 +0100 | [diff] [blame] | 54 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 55 | # Add test definitions |
| 56 | include Makefile-test.am |
hp | 43ac71d | 2016-12-02 11:16:45 -0800 | [diff] [blame] | 57 | |
dantpm | d0899fe | 2018-04-06 14:26:05 -0700 | [diff] [blame] | 58 | ### Distribution files ### |
Javier Martinez Canillas | 0075f88 | 2018-04-13 12:49:37 +0200 | [diff] [blame] | 59 | # Add udev rule |
Javier Martinez Canillas | 0075f88 | 2018-04-13 12:49:37 +0200 | [diff] [blame] | 60 | udevrules_DATA = dist/tpm-udev.rules |
Javier Martinez Canillas | 0075f88 | 2018-04-13 12:49:37 +0200 | [diff] [blame] | 61 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 62 | # Adding user and developer information |
| 63 | EXTRA_DIST += \ |
Philip Tricca | c0841fc | 2017-12-08 12:10:20 -0800 | [diff] [blame] | 64 | CHANGELOG.md \ |
| 65 | CONTRIBUTING.md \ |
| 66 | INSTALL.md \ |
| 67 | LICENSE \ |
| 68 | README.md \ |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 69 | RELEASE.md |
Philip Tricca | 2bd4adb | 2015-09-25 00:14:16 -0700 | [diff] [blame] | 70 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 71 | # Generate the AUTHORS file from git log |
| 72 | AUTHORS : |
| 73 | $(AM_V_GEN)git log --format='%aN <%aE>' | grep -v 'users.noreply.github.com' | sort | \ |
| 74 | uniq -c | sort -nr | sed 's/^\s*//' | cut -d" " -f2- > $@ |
| 75 | EXTRA_DIST += AUTHORS |
| 76 | CLEANFILES += AUTHORS |
Philip Tricca | b194be9 | 2016-03-15 13:27:09 -0700 | [diff] [blame] | 77 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 78 | # pkg-config setup. pc-file declarations happen in the corresponding modules |
| 79 | pkgconfigdir = $(libdir)/pkgconfig |
| 80 | nodist_pkgconfig_DATA = |
| 81 | CLEANFILES += $(nodist_pkgconfig_DATA) |
Philip Tricca | e0a93d1 | 2017-06-29 08:42:34 -0700 | [diff] [blame] | 82 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 83 | %.pc : %.pc.in |
| 84 | $(AM_V_GEN)$(call make_parent_dir,$@) && \ |
| 85 | sed -e "s,[@]VERSION[@],$(PACKAGE_VERSION),g; \ |
| 86 | s,[@]libdir[@],$(libdir),g; \ |
| 87 | s,[@]includedir[@],$(includedir),g;" $^ > $@ |
Philip Tricca | 6f634c4 | 2016-07-23 12:32:15 -0700 | [diff] [blame] | 88 | |
Philip Tricca | 8ffd3c4 | 2018-03-09 16:27:24 -0800 | [diff] [blame] | 89 | # Base TSS2 headers |
| 90 | tss2dir = $(includedir)/tss2 |
| 91 | tss2_HEADERS = \ |
| 92 | $(srcdir)/include/tss2/tss2_common.h \ |
| 93 | $(srcdir)/include/tss2/tss2_tcti.h \ |
Philip Tricca | 910f17c | 2018-03-15 12:38:37 -0700 | [diff] [blame] | 94 | $(srcdir)/include/tss2/tss2_tpm2_types.h |
Philip Tricca | 8ffd3c4 | 2018-03-09 16:27:24 -0800 | [diff] [blame] | 95 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 96 | ### Internal utility library |
| 97 | libutil = libutil.la |
| 98 | noinst_LTLIBRARIES += $(libutil) |
Philip Tricca | a003ae6 | 2018-02-19 10:32:46 -0800 | [diff] [blame] | 99 | libutil_la_CFLAGS = $(AM_CFLAGS) |
Philip Tricca | 57360da | 2018-03-15 17:22:10 -0700 | [diff] [blame] | 100 | libutil_la_SOURCES = $(UTIL_SRC) |
Philip Tricca | a003ae6 | 2018-02-19 10:32:46 -0800 | [diff] [blame] | 101 | |
dantpm | d0899fe | 2018-04-06 14:26:05 -0700 | [diff] [blame] | 102 | ### TCG TSS Marshaling/Unmarshaling spec library ### |
Philip Tricca | ee73062 | 2018-03-10 16:40:41 -0800 | [diff] [blame] | 103 | libtss2_mu = src/tss2-mu/libtss2-mu.la |
Philip Tricca | 8ffd3c4 | 2018-03-09 16:27:24 -0800 | [diff] [blame] | 104 | tss2_HEADERS += $(srcdir)/include/tss2/tss2_mu.h |
Philip Tricca | ee73062 | 2018-03-10 16:40:41 -0800 | [diff] [blame] | 105 | lib_LTLIBRARIES += $(libtss2_mu) |
| 106 | nodist_pkgconfig_DATA += lib/tss2-mu.pc |
| 107 | EXTRA_DIST += lib/tss2-mu.map lib/tss2-mu.pc.in |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 108 | |
David R. Bild | 1e49b4c | 2017-11-28 18:09:42 -0600 | [diff] [blame] | 109 | if HAVE_LD_VERSION_SCRIPT |
Philip Tricca | ee73062 | 2018-03-10 16:40:41 -0800 | [diff] [blame] | 110 | src_tss2_mu_libtss2_mu_la_LDFLAGS = -Wl,--version-script=$(srcdir)/lib/tss2-mu.map |
David R. Bild | 1e49b4c | 2017-11-28 18:09:42 -0600 | [diff] [blame] | 111 | endif # HAVE_LD_VERSION_SCRIPT |
Philip Tricca | ee73062 | 2018-03-10 16:40:41 -0800 | [diff] [blame] | 112 | src_tss2_mu_libtss2_mu_la_LIBADD = $(libutil) |
| 113 | src_tss2_mu_libtss2_mu_la_SOURCES = $(TSS2_MU_SRC) |
Philip Tricca | 7360972 | 2017-02-10 10:50:06 -0800 | [diff] [blame] | 114 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 115 | ### TCG TSS TCTI spec libraries ### |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 116 | # tcti device library |
Philip Tricca | b8584ac | 2018-03-10 17:02:30 -0800 | [diff] [blame] | 117 | libtss2_tcti_device = src/tss2-tcti/libtss2-tcti-device.la |
Philip Tricca | 8ffd3c4 | 2018-03-09 16:27:24 -0800 | [diff] [blame] | 118 | tss2_HEADERS += $(srcdir)/include/tss2/tss2_tcti_device.h |
Philip Tricca | b8584ac | 2018-03-10 17:02:30 -0800 | [diff] [blame] | 119 | lib_LTLIBRARIES += $(libtss2_tcti_device) |
| 120 | nodist_pkgconfig_DATA += lib/tss2-tcti-device.pc |
| 121 | EXTRA_DIST += lib/tss2-tcti-device.map lib/tss2-tcti-device.pc.in |
Juergen Repp | ff821bd | 2017-12-11 15:21:42 +0100 | [diff] [blame] | 122 | |
Philip Tricca | b8584ac | 2018-03-10 17:02:30 -0800 | [diff] [blame] | 123 | src_tss2_tcti_libtss2_tcti_device_la_CFLAGS = $(AM_CFLAGS) |
David R. Bild | 1e49b4c | 2017-11-28 18:09:42 -0600 | [diff] [blame] | 124 | if HAVE_LD_VERSION_SCRIPT |
Philip Tricca | b8584ac | 2018-03-10 17:02:30 -0800 | [diff] [blame] | 125 | src_tss2_tcti_libtss2_tcti_device_la_LDFLAGS = -Wl,--version-script=$(srcdir)/lib/tss2-tcti-device.map |
David R. Bild | 1e49b4c | 2017-11-28 18:09:42 -0600 | [diff] [blame] | 126 | endif # HAVE_LD_VERSION_SCRIPT |
Philip Tricca | b8584ac | 2018-03-10 17:02:30 -0800 | [diff] [blame] | 127 | src_tss2_tcti_libtss2_tcti_device_la_LIBADD = $(libtss2_mu) $(libutil) |
Philip Tricca | 850bb59 | 2018-04-03 09:29:22 -0700 | [diff] [blame] | 128 | src_tss2_tcti_libtss2_tcti_device_la_SOURCES = \ |
| 129 | src/tss2-tcti/tcti-common.c src/tss2-tcti/tcti-common.h \ |
| 130 | src/tss2-tcti/tcti-device.c src/tss2-tcti/tcti-device.h |
Philip Tricca | 97e869f | 2015-11-03 20:19:44 -0500 | [diff] [blame] | 131 | |
dantpm | d0899fe | 2018-04-06 14:26:05 -0700 | [diff] [blame] | 132 | # tcti library for Microsoft TPM2 simulator |
Philip Tricca | b8584ac | 2018-03-10 17:02:30 -0800 | [diff] [blame] | 133 | libtss2_tcti_mssim = src/tss2-tcti/libtss2-tcti-mssim.la |
Philip Tricca | 8ffd3c4 | 2018-03-09 16:27:24 -0800 | [diff] [blame] | 134 | tss2_HEADERS += $(srcdir)/include/tss2/tss2_tcti_mssim.h |
Philip Tricca | b8584ac | 2018-03-10 17:02:30 -0800 | [diff] [blame] | 135 | lib_LTLIBRARIES += $(libtss2_tcti_mssim) |
| 136 | nodist_pkgconfig_DATA += lib/tss2-tcti-mssim.pc |
| 137 | EXTRA_DIST += lib/tss2-tcti-mssim.map lib/tss2-tcti-mssim.pc.in |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 138 | |
Philip Tricca | b8584ac | 2018-03-10 17:02:30 -0800 | [diff] [blame] | 139 | src_tss2_tcti_libtss2_tcti_mssim_la_CFLAGS = $(AM_CFLAGS) $(URIPARSER_CFLAGS) |
David R. Bild | 1e49b4c | 2017-11-28 18:09:42 -0600 | [diff] [blame] | 140 | if HAVE_LD_VERSION_SCRIPT |
Philip Tricca | b8584ac | 2018-03-10 17:02:30 -0800 | [diff] [blame] | 141 | src_tss2_tcti_libtss2_tcti_mssim_la_LDFLAGS = -Wl,--version-script=$(srcdir)/lib/tss2-tcti-mssim.map |
David R. Bild | 1e49b4c | 2017-11-28 18:09:42 -0600 | [diff] [blame] | 142 | endif # HAVE_LD_VERSION_SCRIPT |
Philip Tricca | b8584ac | 2018-03-10 17:02:30 -0800 | [diff] [blame] | 143 | src_tss2_tcti_libtss2_tcti_mssim_la_LIBADD = $(libtss2_mu) $(URIPARSER_LIBS) $(libutil) |
Philip Tricca | 850bb59 | 2018-04-03 09:29:22 -0700 | [diff] [blame] | 144 | src_tss2_tcti_libtss2_tcti_mssim_la_SOURCES = \ |
| 145 | src/tss2-tcti/tcti-common.c src/tss2-tcti/tcti-common.h \ |
| 146 | src/tss2-tcti/tcti-mssim.c src/tss2-tcti/tcti-mssim.h |
Philip Tricca | a51ca97 | 2015-11-04 00:13:42 -0500 | [diff] [blame] | 147 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 148 | ### TCG TSS SAPI spec library ### |
Philip Tricca | 5f0ab55 | 2018-03-10 18:18:29 -0800 | [diff] [blame] | 149 | libtss2_sys = src/tss2-sys/libtss2-sys.la |
Philip Tricca | 8ffd3c4 | 2018-03-09 16:27:24 -0800 | [diff] [blame] | 150 | tss2_HEADERS += $(srcdir)/include/tss2/tss2_sys.h |
Philip Tricca | 5f0ab55 | 2018-03-10 18:18:29 -0800 | [diff] [blame] | 151 | lib_LTLIBRARIES += $(libtss2_sys) |
| 152 | nodist_pkgconfig_DATA += lib/tss2-sys.pc |
| 153 | EXTRA_DIST += lib/tss2-sys.pc.in |
Philip Tricca | 8ffd3c4 | 2018-03-09 16:27:24 -0800 | [diff] [blame] | 154 | |
Philip Tricca | d5a6ff4 | 2018-03-13 18:19:42 -0700 | [diff] [blame] | 155 | src_tss2_sys_libtss2_sys_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/tss2-sys |
Andreas Fuchs | 28164ad | 2018-03-16 13:33:26 +0100 | [diff] [blame] | 156 | src_tss2_sys_libtss2_sys_la_LIBADD = $(libtss2_mu) $(libutil) |
Philip Tricca | 5f0ab55 | 2018-03-10 18:18:29 -0800 | [diff] [blame] | 157 | src_tss2_sys_libtss2_sys_la_SOURCES = $(TSS2_SYS_SRC) |
hp | 43ac71d | 2016-12-02 11:16:45 -0800 | [diff] [blame] | 158 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 159 | ### TCG TSS ESAPI spec library ### |
Juergen Repp | ff821bd | 2017-12-11 15:21:42 +0100 | [diff] [blame] | 160 | if ESAPI |
Philip Tricca | 49635f4 | 2018-03-10 19:19:58 -0800 | [diff] [blame] | 161 | libtss2_esys = src/tss2-esys/libtss2-esys.la |
Philip Tricca | 8ffd3c4 | 2018-03-09 16:27:24 -0800 | [diff] [blame] | 162 | tss2_HEADERS += $(srcdir)/include/tss2/tss2_esys.h |
Philip Tricca | 49635f4 | 2018-03-10 19:19:58 -0800 | [diff] [blame] | 163 | lib_LTLIBRARIES += $(libtss2_esys) |
| 164 | nodist_pkgconfig_DATA += lib/tss2-esys.pc |
| 165 | EXTRA_DIST += lib/tss2-esys.pc.in |
Philip Tricca | 8ffd3c4 | 2018-03-09 16:27:24 -0800 | [diff] [blame] | 166 | |
Andreas Fuchs | 037c878 | 2018-03-21 18:52:38 +0100 | [diff] [blame] | 167 | src_tss2_esys_libtss2_esys_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/tss2-esys |
Philip Tricca | 49635f4 | 2018-03-10 19:19:58 -0800 | [diff] [blame] | 168 | src_tss2_esys_libtss2_esys_la_LIBADD = $(libtss2_sys) $(libtss2_mu) \ |
Philip Tricca | 5f0ab55 | 2018-03-10 18:18:29 -0800 | [diff] [blame] | 169 | $(libtss2_tcti_device) $(libtss2_tcti_mssim) $(libutil) |
Andreas Fuchs | 037c878 | 2018-03-21 18:52:38 +0100 | [diff] [blame] | 170 | src_tss2_esys_libtss2_esys_la_LDFLAGS = $(AM_LDFLAGS) -ldl -lgcrypt |
Philip Tricca | 49635f4 | 2018-03-10 19:19:58 -0800 | [diff] [blame] | 171 | src_tss2_esys_libtss2_esys_la_SOURCES = $(TSS2_ESYS_SRC) |
Philip Tricca | 0f0516e | 2018-03-05 09:59:12 -0800 | [diff] [blame] | 172 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 173 | endif #ESAPI |
Juergen Repp | ecd44eb | 2018-02-23 13:41:16 +0100 | [diff] [blame] | 174 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 175 | ### Man Pages |
Philip Tricca | addad78 | 2018-03-09 11:42:05 -0800 | [diff] [blame] | 176 | man3_MANS = man/man3/Tss2_Tcti_Device_Init.3 man/man3/Tss2_Tcti_Mssim_Init.3 |
Philip Tricca | b8584ac | 2018-03-10 17:02:30 -0800 | [diff] [blame] | 177 | man7_MANS = man/man7/tss2-tcti-device.7 man/man7/tss2-tcti-mssim.7 |
Philip Tricca | 7ae0154 | 2016-05-05 18:45:03 -0700 | [diff] [blame] | 178 | |
Philip Tricca | fe67168 | 2017-06-04 19:14:31 -0700 | [diff] [blame] | 179 | man/man3/%.3 : man/%.3.in $(srcdir)/man/man-postlude.troff |
Andreas Fuchs | 3c965e7 | 2017-11-24 16:16:20 +0100 | [diff] [blame] | 180 | $(AM_V_GEN)$(call make_man,$@,$<,$(srcdir)/man/man-postlude.troff) |
Philip Tricca | fe67168 | 2017-06-04 19:14:31 -0700 | [diff] [blame] | 181 | |
Philip Tricca | 632c431 | 2017-06-05 11:58:08 -0700 | [diff] [blame] | 182 | man/man7/%.7 : man/%.7.in $(srcdir)/man/man-postlude.troff |
Andreas Fuchs | 3c965e7 | 2017-11-24 16:16:20 +0100 | [diff] [blame] | 183 | $(AM_V_GEN)$(call make_man,$@,$<,$(srcdir)/man/man-postlude.troff) |
Philip Tricca | 632c431 | 2017-06-05 11:58:08 -0700 | [diff] [blame] | 184 | |
Javier Martinez Canillas | 0075f88 | 2018-04-13 12:49:37 +0200 | [diff] [blame] | 185 | EXTRA_DIST += dist/tpm-udev.rules |
| 186 | |
| 187 | if WITH_UDEVRULESPREFIX |
| 188 | install-data-hook: |
| 189 | mv $(DESTDIR)$(udevrulesdir)/tpm-udev.rules $(DESTDIR)$(udevrulesdir)/$(udevrulesprefix)tpm-udev.rules |
| 190 | |
| 191 | uninstall-local: |
| 192 | -rm $(DESTDIR)$(udevrulesdir)/$(udevrulesprefix)tpm-udev.rules |
| 193 | endif |
| 194 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 195 | EXTRA_DIST += \ |
| 196 | man/man-postlude.troff \ |
Philip Tricca | 5a23528 | 2018-02-27 14:59:49 -0800 | [diff] [blame] | 197 | man/Tss2_Tcti_Device_Init.3.in \ |
Philip Tricca | addad78 | 2018-03-09 11:42:05 -0800 | [diff] [blame] | 198 | man/Tss2_Tcti_Mssim_Init.3.in \ |
Philip Tricca | b8584ac | 2018-03-10 17:02:30 -0800 | [diff] [blame] | 199 | man/tss2-tcti-device.7.in \ |
| 200 | man/tss2-tcti-mssim.7.in |
Philip Tricca | 632c431 | 2017-06-05 11:58:08 -0700 | [diff] [blame] | 201 | |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 202 | CLEANFILES += \ |
| 203 | $(man3_MANS) \ |
| 204 | $(man7_MANS) |
| 205 | |
| 206 | ### Helper Functions ### |
Philip Tricca | 632c431 | 2017-06-05 11:58:08 -0700 | [diff] [blame] | 207 | define make_parent_dir |
| 208 | if [ ! -d $(dir $1) ]; then mkdir -p $(dir $1); fi |
| 209 | endef |
Andreas Fuchs | 0dc7c29 | 2018-02-28 20:01:13 +0100 | [diff] [blame] | 210 | |
Philip Tricca | fe67168 | 2017-06-04 19:14:31 -0700 | [diff] [blame] | 211 | # function to transform man .in files to man pages |
| 212 | # $1: target |
| 213 | # $2: .in file |
| 214 | # $3: man postlude file |
| 215 | define make_man |
Andreas Fuchs | 3c965e7 | 2017-11-24 16:16:20 +0100 | [diff] [blame] | 216 | $(call make_parent_dir,$1) && \ |
| 217 | cat $2 $3 > $1 && \ |
Philip Tricca | fe67168 | 2017-06-04 19:14:31 -0700 | [diff] [blame] | 218 | sed -i -e "s,[@]VERSION[@],$(PACKAGE_VERSION),g;" $1 |
| 219 | endef |