forked from Yubico/yubikey-personalization
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
123 lines (100 loc) · 4.62 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
# Written by Richard Levitte <[email protected]>.
# Copyright (c) 2008-2012 Yubico AB
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Subdirectories
SUBDIRS= ykcore . tests
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -I$(srcdir)/ykcore -I$(srcdir)/rfc4634
# The library.
ykpers_includedir=$(includedir)/ykpers-1
ykpers_include_HEADERS = ykpers.h ykcore/ykstatus.h ykcore/ykcore.h ykcore/ykdef.h
lib_LTLIBRARIES = libykpers-1.la
libykpers_1_la_SOURCES = ykpers.c ykpbkdf2.h ykpbkdf2.c
libykpers_1_la_SOURCES += rfc4634/hmac.c rfc4634/usha.c rfc4634/sha.h \
rfc4634/sha1.c rfc4634/sha224-256.c rfc4634/sha384-512.c \
rfc4634/sha-private.h
libykpers_1_la_SOURCES += ykpers-1.pc.in libykpers-1.map
libykpers_1_la_LIBADD = $(LTLIBYUBIKEY) ./ykcore/libykcore.la
libykpers_1_la_LDFLAGS = -no-undefined \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
libykpers_1_la_DEPENDENCIES = libykpers-1.map
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = ykpers-1.pc
if HAVE_LD_VERSION_SCRIPT
libykpers_1_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libykpers-1.map
else
libykpers_1_la_LDFLAGS += -export-symbols-regex '^(ykp|yk|ykds)_.*|_yk.*_errno_location'
endif
# The command line tools.
bin_PROGRAMS = ykpersonalize ykchalresp
ykpersonalize_SOURCES = ykpersonalize.c ykpers-args.h ykpers-args.c
ykpersonalize_LDADD = ./libykpers-1.la ./ykcore/libykcore.la
ykchalresp_SOURCES = ykchalresp.c
ykchalresp_LDADD = ./libykpers-1.la ./ykcore/libykcore.la
dist_man1_MANS = ykpersonalize.1 ykchalresp.1
# Dist docs from wiki.
EXTRA_DIST = doc/Compatibility.asciidoc doc/Make-Release.asciidoc doc/Read-Me.asciidoc doc/USB-Hid-Issue.asciidoc doc/Windows-Build.asciidoc
# Dist contrib stuff.
EXTRA_DIST += contrib/README contrib/programming.sh
# Windows rules.
EXTRA_DIST += ykpers4win.mk
udevrulesdir=@udevrulesdir@
dist_udevrules_DATA = \
70-yubikey.rules
# Release
PROJECT = yubikey-personalization
ChangeLog:
cd $(srcdir) && git2cl > ChangeLog
check-doc-dist:
perl -pe "s,^EXTRA_DIST = .*,EXTRA_DIST = `cd $(srcdir) && ls doc/*.asciidoc | grep -v Todo.ascii | xargs echo`," \
< $(srcdir)/Makefile.am > check-doc-dist.tmp
diff -ur $(srcdir)/Makefile.am check-doc-dist.tmp || \
(rm -f check-doc-dist.tmp; echo 'error: please update $(srcdir)/Makefile.am to include all docs'; exit 1)
rm -f check-doc-dist.tmp
release:
@if test -z "$(USER)" || test -z "$(KEYID)"; then \
echo "Try this instead:"; \
echo " make release USER=[GOOGLEUSERNAME] KEYID=[PGPKEYID]"; \
echo "For example:"; \
echo " make release [email protected] KEYID=2117364A"; \
exit 1; \
fi
@head -3 $(srcdir)/NEWS | grep -q "Version $(VERSION) .released `date -I`" || \
(echo 'error: You need to update date/version in $(srcdir)/NEWS, see doc/MakeRelease.wiki.'; exit 1)
rm -f $(srcdir)/ChangeLog
make check-doc-dist ChangeLog distcheck
gpg --detach-sign --default-key $(KEYID) $(PACKAGE)-$(VERSION).tar.gz
gpg --verify $(PACKAGE)-$(VERSION).tar.gz.sig
cd $(srcdir) && git push
cd $(srcdir) && git tag -u $(KEYID)! -m $(VERSION) v$(VERSION)
cd $(srcdir) && git push --tags
mkdir -p ../releases/$(PACKAGE)/ && \
cp -v $(PACKAGE)-$(VERSION).tar.gz* ../releases/$(PACKAGE)/
googlecode_upload.py -s "OpenPGP signature for $(PACKAGE) $(VERSION)." \
-p $(PROJECT) -u $(USER) $(PACKAGE)-$(VERSION).tar.gz.sig
googlecode_upload.py -s "$(PACKAGE) $(VERSION)" \
-p $(PROJECT) -u $(USER) $(PACKAGE)-$(VERSION).tar.gz