forked from flowerysong/OpenARC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
129 lines (108 loc) · 3.87 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Copyright (c) 2010-2014, 2016, 2017, The Trusted Domain Project.
# All rights reserved.
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = contrib . test
dist_doc_DATA = LICENSE LICENSE.Sendmail README.md CHANGELOG.md
dist_noinst_SCRIPTS = libtool
DISTCLEANFILES = openarc-@VERSION@.tar.gz libopenarc/symbols.map *.gcno *.gcda
# TODO: get configure.ac to generate --enable-{feature} for all
# non-experimental features and substitute it here e.g @SUPPORTED_FEATURES@.
# Perhaps all features would enable a more comprehensive test coverage map
# though.
DISTCHECK_CONFIGURE_FLAGS=--with-openssl=/usr/local
if DEBUG
AM_CFLAGS = -g
endif
LDADD = libopenarc/libopenarc.la
lib_LTLIBRARIES = libopenarc/libopenarc.la
libopenarc_libopenarc_la_SOURCES = \
libopenarc/base64.c \
libopenarc/base64.h \
libopenarc/arc.c \
libopenarc/arc.h \
libopenarc/arc-canon.c \
libopenarc/arc-canon.h \
libopenarc/arc-dns.c \
libopenarc/arc-dns.h \
libopenarc/arc-internal.h \
libopenarc/arc-keys.c \
libopenarc/arc-keys.h \
libopenarc/arc-tables.c \
libopenarc/arc-tables.h \
libopenarc/arc-types.h \
libopenarc/arc-util.c \
libopenarc/arc-util.h \
util/arc-dstring.c \
util/arc-dstring.h \
util/arc-malloc.h \
util/arc-nametable.c \
util/arc-nametable.h
libopenarc_libopenarc_la_CPPFLAGS = -I$(srcdir)/util $(OPENSSL_CFLAGS) $(LIBIDN2_CFLAGS)
libopenarc_libopenarc_la_LDFLAGS = -no-undefined -version-info $(LIBOPENARC_VERSION_INFO)
libopenarc_libopenarc_la_LIBADD = $(OPENSSL_LIBS) $(LIBIDN2_LIBS)
if !ALL_SYMBOLS
libopenarc_libopenarc_la_DEPENDENCIES = libopenarc/symbols.map
libopenarc_libopenarc_la_LDFLAGS += -export-symbols libopenarc/symbols.map
endif
if RPATH
libopenarc_libopenarc_la_LDFLAGS += -rpath $(libdir)
endif
libopenarc_libopenarc_includedir = $(includedir)/openarc
libopenarc_libopenarc_include_HEADERS = libopenarc/arc.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libopenarc/openarc.pc
libopenarc/symbols.map: $(libopenarc_libopenarc_include_HEADERS)
grep '^extern' $? | \
awk '{ for (c = 1; c <= NF; c++) if ($$c ~ /arc_/) { print $$c; break; } }' | \
sed -e s/\[\*\;\]//g -e s/\[\\\[\\\]\]//g -e s/\(.*// | \
sort -u -o $@
if BUILD_FILTER
dist_doc_DATA += openarc/openarc.conf.sample
man_MANS = openarc/openarc.conf.5 openarc/openarc.8
sbin_PROGRAMS = openarc/openarc
openarc_openarc_SOURCES = \
openarc/config.c \
openarc/config.h \
openarc/openarc.c \
openarc/openarc.h \
openarc/openarc-ar.c \
openarc/openarc-ar.h \
openarc/openarc-config.h \
openarc/openarc-crypto.c \
openarc/openarc-crypto.h \
openarc/openarc-test.c \
openarc/openarc-test.h \
openarc/util.c \
openarc/util.h \
util/arc-dstring.c \
util/arc-dstring.h \
util/arc-malloc.h \
util/arc-nametable.c \
util/arc-nametable.h
openarc_openarc_CC = $(PTHREAD_CC)
openarc_openarc_CFLAGS = $(PTHREAD_CFLAGS)
openarc_openarc_CPPFLAGS = -I$(srcdir)/libopenarc -I$(srcdir)/util $(OPENSSL_CFLAGS) $(LIBIDN2_CFLAGS) $(LIBMILTER_CPPFLAGS) $(LIBJANSSON_CFLAGS)
openarc_openarc_LDFLAGS = $(LIBMILTER_LDFLAGS) $(PTHREAD_CFLAGS)
openarc_openarc_LDADD = libopenarc/libopenarc.la $(LIBMILTER_LIBS) $(OPENSSL_LIBS) $(LIBIDN2_LIBS) $(PTHREAD_LIBS) $(LIBJANSSON_LIBS) $(LIBRESOLV)
noinst_PROGRAMS = openarc/ar-test
openarc_ar_test_SOURCES = \
openarc/openarc-ar.c \
openarc/openarc-ar.h \
openarc/ar-test.c \
util/arc-nametable.c \
util/arc-nametable.h
openarc_ar_test_CPPFLAGS = -I$(srcdir)/libopenarc -I$(srcdir)/util $(LIBJANSSON_CFLAGS)
endif
$(DIST_ARCHIVES).sha1: $(DIST_ARCHIVES)
sha1sum $? > $@
$(DIST_ARCHIVES).sha256: $(DIST_ARCHIVES)
sha256sum $? > $@
release: dist $(DIST_ARCHIVES) $(DIST_ARCHIVES).sha1 $(DIST_ARCHIVES).sha256
dist-hook:
[ -f $(distdir)/libopenarc/arc.h ] && rm -f $(distdir)/libopenarc/arc.h
sed -e '/OPENARC_LIB_VERSION/s/0x[0-9]*/0x@HEX_VERSION@/' < $(srcdir)/libopenarc/arc.h > $(distdir)/libopenarc/arc.h
rpm: dist-gzip
rpmbuild -ta $(distdir).tar.gz
srpm: dist-gzip
rpmbuild -ts $(distdir).tar.gz
.PHONY: push