summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-07-28 22:59:28 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-07-28 23:11:01 (EDT)
commitee4c4798715680d091f1bfcf561ce8d747f5088e (patch)
tree981ce3d4f20411e352aed950ec094f002eabe16e /Makefile.am
Initial commit
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am66
1 files changed, 66 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..4bcc1d1
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,66 @@
+# Process this file with automake to produce an input makefile.
+#
+# Copyright (C) 2017 Patrick McDermott
+#
+# This file is part of wolfssl-util.
+#
+# wolfssl-util is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# wolfssl-util is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with wolfssl-util. If not, see <http://www.gnu.org/licenses/>.
+
+if IN_GIT
+PACKAGE_VERSION_GIT = $$(printf ' (%s)' \
+ "$$({ git describe --tags --dirty 2>/dev/null || \
+ printf '%s-g%s%s' \
+ "$$(git rev-list --count HEAD)" \
+ "$$(git describe --tags --dirty --always)"; \
+ } | sed 's|^.*/||')")
+else
+PACKAGE_VERSION_GIT =
+endif
+
+# PACKAGE_STRING is used in the test suite output and log.
+# PACKAGE_VERSION can't be overridden. Automake ignores it in the IN_GIT
+# conditional (and throws a warning), and setting it to $(PACKAGE_VERSION_GIT)
+# outside the conditional causes PACKAGE_VERSION_GIT to reference itself.
+# VERSION is not set here because it is used by:
+# * Automake's distdir macro
+# * Automake's distdir target (which checks for $(VERSION) in NEWS)
+# * Our release target
+PACKAGE_STRING = $(PACKAGE_NAME) $(PACKAGE_VERSION)$(PACKAGE_VERSION_GIT)
+
+bin_PROGRAMS = wolfssl-util
+
+wolfssl_util_SOURCES =
+wolfssl_util_CFLAGS = \
+ $(WARN_CFLAGS) \
+ $(ASAN_CFLAGS)
+wolfssl_util_CPPFLAGS = \
+ -DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\" \
+ -DBINDIR=\"$(bindir)\" \
+ -DPKGDATADIR=\"$(pkgdatadir)\" \
+ -DLOCALEDIR=\"$(localedir)\" \
+ -DPROGRAM_NAME=\"wolfssl-util\" \
+ $(LIBPNG_CFLAGS)
+wolfssl_util_LDADD = \
+ $(WOLFSSL_LIBS) \
+ $(ASAN_CFLAGS)
+wolfssl_util_LINK = $(LINK) version.c
+EXTRA_wolfssl_util_DEPENDENCIES = version.c
+EXTRA_DIST = build-aux/config.rpath
+CLEANFILES = version.c
+
+version.c: $(wolfssl_util_OBJECTS) $(wolfssl_util_DEPENDENCIES)
+ $(AM_V_GEN)printf 'const char *PACKAGE_VERSION_GIT = "%s";\n' \
+ "$(PACKAGE_VERSION_GIT)" >version.c
+
+include $(top_srcdir)/src/local.mk