-
Notifications
You must be signed in to change notification settings - Fork 37
/
Makefile.am
114 lines (96 loc) · 3.37 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# Copyright (C) 2019-2024 Nicola Di Lieto <nicola.dilieto@gmail.com>
#
# This file is part of uacme.
#
# uacme 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 3 of the License, or
# (at your option) any later version.
#
# uacme 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 this program. If not, see <http://www.gnu.org/licenses/>.
ACLOCAL_AMFLAGS=-I build-aux/m4
ARFLAGS=cr
bin_PROGRAMS = uacme
if ENABLE_UALPN
bin_PROGRAMS += ualpn
ualpn_SOURCES = ualpn.c base64.c base64.h log.c log.h sglib.h
ualpn_CPPFLAGS = -DRUNSTATEDIR="\"${runstatedir}\""
-DSYSCONFDIR="\"${sysconfdir}\""
ualpn_CFLAGS = $(WCFLAGS)
if ENABLE_LIBEV
ualpn_SOURCES += libev/ev.h
ualpn_CPPFLAGS += -Ilibev
ualpn_LDADD = libev.a $(UALPN_LDADD)
noinst_LIBRARIES = libev.a
libev_a_SOURCES = libev/ev.c
else
ualpn_LDADD = $(UALPN_LDADD)
endif
endif
uacme_SOURCES = uacme.c base64.c base64.h crypto.c crypto.h \
curlwrap.c curlwrap.h json.c json.h jsmn.h \
msg.c msg.h
uacme_CPPFLAGS = -DRUNSTATEDIR="\"${runstatedir}\"" \
-DSYSCONFDIR="\"${sysconfdir}\"" \
$(CURL_CPPFLAGS)
uacme_CFLAGS = $(CURL_CFLAGS) $(WCFLAGS)
uacme_LDFLAGS = $(CURL_LDFLAGS)
uacme_LDADD = $(CURL_LDADD)
if ENABLE_READFILE
uacme_SOURCES += read-file.c read-file.h
endif
BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version
dist_pkgdata_SCRIPTS = uacme.sh nsupdate.sh
if ENABLE_UALPN
dist_pkgdata_SCRIPTS += ualpn.sh
endif
if ENABLE_DOCS
dist_man1_MANS = uacme.1
dist_html_DATA = docs/uacme.html
if ENABLE_UALPN
dist_man1_MANS += ualpn.1
dist_html_DATA += docs/ualpn.html
ualpn.1: ualpn.1.txt $(top_srcdir)/.version
$(AM_V_GEN)$(A2X) -L -d manpage -f manpage \
-a revision=$(VERSION) \
-a sysconfdir="${sysconfdir}" \
-a runstatedir="${runstatedir}" $<
docs/ualpn.html: ualpn.1.txt $(top_srcdir)/.version
$(AM_V_GEN)$(ASCIIDOC) -d manpage -b html5 -o $@ \
-a revision=$(VERSION) \
-a sysconfdir="${sysconfdir}" \
-a runstatedir="${runstatedir}" $<
endif
uacme.1: uacme.1.txt $(top_srcdir)/.version
$(AM_V_GEN)$(A2X) -L -d manpage -f manpage \
-a revision=$(VERSION) \
-a sysconfdir="${sysconfdir}" \
-a runstatedir="${runstatedir}" $<
docs/uacme.html: uacme.1.txt $(top_srcdir)/.version
$(AM_V_GEN)$(ASCIIDOC) -d manpage -b html5 -o $@ \
-a revision=$(VERSION) \
-a sysconfdir="${sysconfdir}" \
-a runstatedir="${runstatedir}" $<
endif
.PHONY: valgrind
valgrind: uacme
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes \
--num-callers=20 --track-fds=yes --log-file=valgrind.log \
$(builddir)/uacme $(VALGRIND_UACME_ARGS)
EXTRA_DIST = GNUmakefile build-aux/git-version-gen uacme.sh nsupdate.sh \
uacme.1.txt uacme.1 docs/uacme.html ualpn.1.txt ualpn.1 \
docs/ualpn.html libev/ev_epoll.c libev/ev_iouring.c \
libev/ev_kqueue.c libev/ev_linuxaio.c libev/ev_poll.c \
libev/ev_port.c libev/ev_select.c libev/ev_vars.h \
libev/ev_wrap.h README.md
CLEANFILES = valgrind.log