aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile.am
blob: de51d90ed24e514a5838fdcc927ce1faf3527151 (plain) (blame)
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
#
#   OTP Utilities
#   Copyright (C) 2020, 2022 David M. Syzdek <david@syzdek.net>.
#
#   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.
#      * Neither the name of David M. Syzdek nor the
#        names of its contributors may be used to endorse or promote products
#        derived from this software without specific prior written permission.
#
#   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 DAVID M SYZDEK 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.
#
#   @configure_input@
#
#   Makefile.am - automate compiling on a unix platform
#

# Sub directories
SUBDIRS					=
DIST_SUBDIRS				=


# GNU make options
V					= 0


# Global flags
AM_LIBS					=
AM_LDFLAGS				=
AM_CFLAGS				= -O2 $(CFLAGS_WARNINGS)
AM_CXXFLAGS				= -O2 @AM_CXXFLAGS@
AM_OBJCFLAGS				= -O2 @AM_OBJCFLAGS@
AM_CPPFLAGS				= -O2 \
					  -DHAVE_CONFIG_H=1 \
					  -I$(top_builddir)/include \
					  -I$(top_srcdir)/include \
					  -I$(top_srcdir)/src/common \
					  -DSYSCONFDIR="\"$(sysconfdir)\""
ACLOCAL_AMFLAGS				= -I m4 -W all -W error
AM_MAKEINFOFLAGS                        = --no-split
DEFS					=


# automake targets
check_PROGRAMS				=
doc_DATA				= AUTHORS.md \
					  ChangeLog.md \
					  COPYING.md \
					  README.md \
					  TODO.md
include_HEADERS				=
lib_LIBRARIES				=
lib_LTLIBRARIES				=
man_MANS				=
info_TEXINFOS				=
noinst_LTLIBRARIES			=
noinst_LIBRARIES			=
noinst_HEADERS				= include/otputil_compat.h
noinst_PROGRAMS				=
bin_PROGRAMS				=
bin_SCRIPTS				=
pkgdata_DATA				=
sbin_SCRIPTS				=
sbin_PROGRAMS				=
EXTRA_PROGRAMS				= examples/totp-example \
					  src/otp-altdict \
					  src/otputil \
					  tests/otp-data-convert \
					  tests/otp-data-dump \
					  tests/test-dict-otp \
					  tests/test-hotp \
					  tests/test-otp \
					  tests/test-otp-decode \
					  tests/test-otp-encode \
					  tests/test-totp
EXTRA					= include/otputil.h \
					  lib/libotputil.la \
					  lib/libotputil.a


# lists
AM_INSTALLCHECK_STD_OPTIONS_EXEMPT	=
BUILT_SOURCES				=
TESTS					=
XFAIL_TESTS				=
EXTRA_MANS				=
EXTRA_DIST				= $(noinst_HEADERS) \
					  AUTHORS.md \
					  ChangeLog.md \
					  COPYING.md \
					  NEWS.md \
					  README.md \
					  TODO.md \
					  include/otputil.h \
					  include/otputil_compat.h \
					  lib/libotputil/libotputil.sym \
					  lib/libotputil/lrfc6238-totp.h \
					  lib/libotputil/lrfc6238-totp.c \
					  tests/otp-data-generate.sh \
					  tests/otp-dicts/otp-dicts.h \
					  tests/test-otputil-hotp.sh \
					  tests/test-otputil-otp.sh \
					  tests/test-otputil-totp.sh
CLEANFILES				= $(builddir)/a.out   $(srcdir)/a.out \
					  $(builddir)/*/a.out $(srcdir)/*/a.out \
					  config.h.in~ $(srcdir)/config.h.in~ \
					  $(man_MANS) \
					  $(pkgdata_DATA) \
					  $(bin_SCRIPTS) \
					  $(sbin_SCRIPTS) \
					  $(EXTRA_PROGRAMS) \
					  @PACKAGE_TARNAME@-*.tar.* \
					  @PACKAGE_TARNAME@-*.txz \
					  @PACKAGE_TARNAME@-*.zip
DISTCHECK_CONFIGURE_FLAGS		= --enable-strictwarnings \
					  --enable-utilities \
					  --enable-examples \
					  --enable-documentation \
					  --enable-maintainer \
					  CFLAGS="$(CFLAGS)" \
					  CPPFLAGS="$(CPPFLAGS)" \
					  LDFLAGS="$(LDFLAGS)"


# conditional build
if ENABLE_MAINTAINER
   noinst_PROGRAMS			+= src/otp-altdict
   noinst_PROGRAMS			+= tests/otp-data-convert
   noinst_PROGRAMS			+= tests/otp-data-dump
endif
if ENABLE_EXAMPLES
   noinst_PROGRAMS			+= examples/totp-example
endif
if ENABLE_LIBRARIES
   noinst_LIBRARIES			+= lib/libotputil.a
endif
if ENABLE_LTLIBRARIES
   lib_LTLIBRARIES			+= lib/libotputil.la
   include_HEADERS			+= include/otputil.h
endif
if ENABLE_UTILITIES
   bin_PROGRAMS				+= src/otputil
endif
if ENABLE_TESTS
   TESTS				+= tests/test-dict-otp
   TESTS				+= tests/test-otputil-hotp.sh
   TESTS				+= tests/test-otputil-otp.sh
   TESTS				+= tests/test-otputil-totp.sh
   TESTS				+= tests/test-hotp
   TESTS				+= tests/test-otp
   TESTS				+= tests/test-otp-decode
   TESTS				+= tests/test-otp-encode
   TESTS				+= tests/test-totp
endif


# macros for examples/totp-example
examples_totp_example_SOURCES		= examples/totp-example.c


# macros for lib/libotputil.a
lib_libotputil_a_DEPENDENCIES		= Makefile \
					  config.h \
					  $(BINDLE_LIBBINDLE_DEPS)
lib_libotputil_a_CPPFLAGS		= $(AM_CPPFLAGS) -I$(srcdir)/lib/libotputil
lib_libotputil_a_SOURCES		= $(noinst_HEADERS) \
					  $(BINDLE_LIBBINDLE_SRCS) \
					  lib/libotputil/libotputil.h \
					  lib/libotputil/lbv.c \
					  lib/libotputil/lbv.h \
					  lib/libotputil/lcore.c \
					  lib/libotputil/lcore.h \
					  lib/libotputil/lmisc.c \
					  lib/libotputil/lmisc.h \
					  lib/libotputil/lrfc1760-skey.c \
					  lib/libotputil/lrfc1760-skey.h \
					  lib/libotputil/lrfc1760-skey-dict.c \
					  lib/libotputil/lrfc1760-skey-dict.h \
					  lib/libotputil/lrfc2289-otp.c \
					  lib/libotputil/lrfc2289-otp.h \
					  lib/libotputil/lrfc2289-otp-dict.c \
					  lib/libotputil/lrfc2289-otp-dict.h \
					  lib/libotputil/lrfc4226-hotp.c \
					  lib/libotputil/lrfc4226-hotp.h


# macros for lib/libotputil.la
lib_libotputil_la_DEPENDENCIES		= $(lib_libotputil_a_DEPENDENCIES) \
					  lib/libotputil/libotputil.sym
lib_libotputil_la_CPPFLAGS		= $(AM_CPPFLAGS) -I$(srcdir)/lib/libotputil
lib_libotputil_la_LDFLAGS		= -rpath'$(libdir)' \
					  -version-info $(LIB_VERSION_INFO) \
					  $(AM_LDFLAGS) \
					  -export-symbols $(srcdir)/lib/libotputil/libotputil.sym
lib_libotputil_la_SOURCES		= $(lib_libotputil_a_SOURCES)


# macros for src/otp-altdict
src_otp_altdict_DEPENDENCIES		= Makefile $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
src_otp_altdict_LDADD			= $(AM_LIBS) $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
src_otp_altdict_SOURCES			= $(BINDLE_LIBBINDLE_SRCS) src/otp-altdict.c


# macros for src/otputil
src_otputil_DEPENDENCIES		= Makefile $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
src_otputil_LDADD			= $(AM_LIBS) $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
src_otputil_SOURCES			= src/otputil.c \
					  src/otputil.h \
					  src/widget-hotp.c \
					  src/widget-otp.c \
					  src/widget-skey.c \
					  src/widget-totp.c


# macros for tests/otp-data-convert
tests_otp_data_convert_DEPENDENCIES	= Makefile $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_otp_data_convert_LDADD		= $(AM_LIBS) $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_otp_data_convert_SOURCES		= tests/otp-data-convert.c \
					  tests/otp-dicts/otp-md4.c \
					  tests/otp-dicts/otp-md5.c \
					  tests/otp-dicts/otp-sha1.c \
					  tests/otp-dicts/rfc2289-md4.c \
					  tests/otp-dicts/rfc2289-md5.c \
					  tests/otp-dicts/rfc2289-sha1.c


# macros for tests/otp-data-dump
tests_otp_data_dump_DEPENDENCIES	= Makefile $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_otp_data_dump_LDADD		= $(AM_LIBS) $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_otp_data_dump_SOURCES		= tests/otp-data.c \
					  tests/otp-data.h \
					  tests/otp-data-dump.c


# macros for tests/test-dict-otp
tests_test_dict_otp_DEPENDENCIES	= Makefile $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_test_dict_otp_LDADD		= $(AM_LIBS) $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_test_dict_otp_SOURCES		= tests/test-dict-otp.c \
					  tests/otp-dicts/otp-md4.c \
					  tests/otp-dicts/otp-md5.c \
					  tests/otp-dicts/otp-sha1.c \
					  tests/otp-dicts/rfc2289-md4.c \
					  tests/otp-dicts/rfc2289-md5.c \
					  tests/otp-dicts/rfc2289-sha1.c


# macros for tests/test-hotp
tests_test_hotp_DEPENDENCIES		= Makefile $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_test_hotp_LDADD			= $(AM_LIBS) $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_test_hotp_SOURCES			= tests/test-hotp.c


# macros for tests/test-otp
tests_test_otp_DEPENDENCIES		= Makefile $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_test_otp_LDADD			= $(AM_LIBS) $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_test_otp_SOURCES			= tests/test-otp.c \
					  tests/otp-data.c \
					  tests/otp-data.h


# macros for tests/test-otp-decode
tests_test_otp_decode_DEPENDENCIES	= Makefile $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_test_otp_decode_LDADD		= $(AM_LIBS) $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_test_otp_decode_SOURCES		= tests/test-otp-decode.c \
					  tests/otp-data.c \
					  tests/otp-data.h


# macros for tests/test-otp-encode
tests_test_otp_encode_DEPENDENCIES	= Makefile $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_test_otp_encode_LDADD		= $(AM_LIBS) $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_test_otp_encode_SOURCES		= tests/test-otp-encode.c \
					  tests/otp-data.c \
					  tests/otp-data.h


# macros for tests/test-totp
tests_test_totp_DEPENDENCIES		= Makefile $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_test_totp_LDADD			= $(AM_LIBS) $(noinst_LIBRARIES) $(lib_LTLIBRARIES)
tests_test_totp_SOURCES			= tests/test-totp.c


# Makefile includes
GIT_PACKAGE_VERSION_DIR=include
SUBST_EXPRESSIONS =
include contrib/bindletools/build-aux/makefile-subst.am
include contrib/bindletools/build-aux/makefile-version.am
include contrib/bindletools/build-aux/makefile-libbindle.am


# custom targets
.PHONY:

git-clean:
	git fsck --full --unreachable
	git gc --auto --aggressive


# local targets
install-exec-local:

install-data-local:

install-data-hook:

uninstall-local:

uninstall-hook:

clean-local:

distclean-local:
	rm -fR $(srcdir)/autom4te.cache

# end of automake file