-
Notifications
You must be signed in to change notification settings - Fork 78
/
Makefile.am
120 lines (96 loc) · 3.29 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
AUTOMAKE_OPTIONS = foreign subdir-objects
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = -DDATA_DIR=\"$(datadir)\"
AM_CFLAGS = $(CRYPTO_CFLAGS) $(LIBXML2_CFLAGS) $(WFLAGS)
dist_man_MANS = stoken.1
lib_LTLIBRARIES = libstoken.la
libstoken_la_SOURCES = src/library.c src/securid.c src/sdtid.c \
src/compat.c src/stc-@[email protected]
libstoken_la_CFLAGS = $(AM_CFLAGS) -DLIBSTOKEN_BUILD
libstoken_la_LDFLAGS = -version-number @APIMAJOR@:@APIMINOR@ \
-no-undefined
if HAVE_VSCRIPT_COMPLEX
libstoken_la_LDFLAGS += $(VSCRIPT_LDFLAGS),@srcdir@/libstoken.map
endif
libstoken_la_LIBADD = $(CRYPTO_LIBS) $(LIBXML2_LIBS)
libstoken_la_DEPENDENCIES = libstoken.map
include_HEADERS = src/stoken.h
noinst_HEADERS = src/common.h src/securid.h src/stoken-internal.h \
src/sdtid.h
pkgconfig_DATA = stoken.pc
if USE_JNI
if JNI_STANDALONE
libstoken_la_SOURCES += src/jni.c
libstoken_la_CFLAGS += $(JNI_CFLAGS)
else
lib_LTLIBRARIES += libstoken-wrapper.la
libstoken_wrapper_la_SOURCES = src/jni.c
libstoken_wrapper_la_CFLAGS = $(AM_CFLAGS) $(JNI_CFLAGS)
libstoken_wrapper_la_LIBADD = libstoken.la
endif
endif
bin_PROGRAMS = stoken
stoken_SOURCES = src/cli.c src/common.c
stoken_LDADD = $(LDADD) $(CRYPTO_LIBS) libstoken.la
if ENABLE_GUI
bin_PROGRAMS += stoken-gui
stoken_gui_SOURCES = src/gui.c src/common.c
stoken_gui_CFLAGS = $(AM_CFLAGS) $(GTK_CFLAGS)
stoken_gui_CPPFLAGS = $(AM_CPPFLAGS) -DUIDIR=\"$(uidir)\"
stoken_gui_LDADD = $(LDADD) $(CRYPTO_LIBS) libstoken.la $(GTK_LIBS)
dist_man_MANS += stoken-gui.1
icondir = $(datadir)/pixmaps
dist_icon_DATA = gui/stoken-gui.png
desktopdir = $(datadir)/applications
dist_desktop_DATA = gui/stoken-gui.desktop \
gui/stoken-gui-small.desktop
uidir = $(datadir)/stoken
ui_DATA = gui/tokencode-small.ui \
gui/tokencode-detail.ui \
gui/password-dialog.ui \
gui/pin-dialog.ui
endif
dist_doc_DATA = examples/libstoken-test.c examples/sdtid-test.pl \
README.md
dist_noinst_SCRIPTS = autogen.sh
EXTRA_DIST = .gitignore libstoken.map CHANGES $(ui_DATA)
# package both variants explicitly, because @CRYPTO_BACKEND@ only picks one
EXTRA_DIST += src/stc-nettle.c src/stc-tomcrypt.c
GIT_EXTRA_DIST = examples/ java/ tests/
EXTRA_DIST += $(shell cd "$(top_srcdir)" && \
git ls-tree HEAD -r --name-only -- $(GIT_EXTRA_DIST) 2>/dev/null)
TEST_EXTENSIONS = .pipe
TESTS = tests/export-android-v2.pipe \
tests/export-iphone-password.pipe \
tests/export-read-v3.pipe \
tests/export-sdtid-devid-password.pipe \
tests/export-v3-sdtid.pipe \
tests/tokencode-v2.pipe \
tests/tokencode-v3.pipe \
tests/tokencode-v4.pipe \
tests/tokencode-sdtid.pipe \
tests/mac-align.pipe
PIPE_LOG_COMPILER = $(srcdir)/tests/pipe-wrapper.sh
dist_check_SCRIPTS = $(TESTS) $(PIPE_LOG_COMPILER)
TESTS_ENVIRONMENT = STOKEN=./stoken \
LIBTOOL="${LIBTOOL}" \
TESTDIR="$(srcdir)/tests"
if ENABLE_VALGRIND
TESTS_ENVIRONMENT += VALGRIND="valgrind --error-exitcode=1"
endif
DISTCLEANFILES = *~
.PHONY: winpkg
winpkg: $(bin_PROGRAMS)
rm -rf winpkg
mkdir winpkg
cp .libs/stoken.exe winpkg/
if ENABLE_GUI
cp .libs/stoken-gui.exe winpkg/
cp `./win32deps.pl .libs/stoken-gui.exe` winpkg/
cp gui/*.{ui,png} winpkg/
else
cp .libs/stoken.exe winpkg/
cp `./win32deps.pl .libs/stoken.exe` winpkg/
endif
rm -f winpkg.zip
zip -r winpkg.zip winpkg/