| 1 |
# ============================================================================== |
| 2 |
# Copyright (c) 2017-2021 Michael Baeuerle |
| 3 |
# |
| 4 |
# All rights reserved. |
| 5 |
# |
| 6 |
# Permission is hereby granted, free of charge, to any person obtaining |
| 7 |
# a copy of this software and associated documentation files (the |
| 8 |
# "Software"), to deal in the Software without restriction, including |
| 9 |
# without limitation the rights to use, copy, modify, merge, publish, |
| 10 |
# distribute, and/or sell copies of the Software, and to permit persons |
| 11 |
# to whom the Software is furnished to do so, provided that the above |
| 12 |
# copyright notice(s) and this permission notice appear in all copies of |
| 13 |
# the Software and that both the above copyright notice(s) and this |
| 14 |
# permission notice appear in supporting documentation. |
| 15 |
# |
| 16 |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 17 |
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 18 |
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT |
| 19 |
# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
| 20 |
# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY |
| 21 |
# SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER |
| 22 |
# RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF |
| 23 |
# CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN |
| 24 |
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 25 |
# |
| 26 |
# Except as contained in this notice, the name of a copyright holder |
| 27 |
# shall not be used in advertising or otherwise to promote the sale, use |
| 28 |
# or other dealings in this Software without prior written authorization |
| 29 |
# of the copyright holder. |
| 30 |
# |
| 31 |
# SPDX-License-Identifier: ICU |
| 32 |
|
| 33 |
|
| 34 |
# ============================================================================== |
| 35 |
# Rules for automake |
| 36 |
|
| 37 |
ACLOCAL_AMFLAGS = -I m4 |
| 38 |
AM_CPPFLAGS = -I$(top_srcdir)/include -D_POSIX_C_SOURCE=200112L |
| 39 |
|
| 40 |
|
| 41 |
# ============================================================================== |
| 42 |
# Rules to build test programs |
| 43 |
|
| 44 |
check_PROGRAMS = shatest canlocktest canlocktest_multi canlocktest_legacy |
| 45 |
CLEANFILES = shatest_check.sh |
| 46 |
|
| 47 |
# This is required because shatest always return 0 status (even if tests failed) |
| 48 |
check_SCRIPTS = shatest_check.sh |
| 49 |
|
| 50 |
# Attention: Linking against the static library is intended here! |
| 51 |
# (The shared library does not export the internal symbols) |
| 52 |
shatest_SOURCES = hkdf.c shatest.c |
| 53 |
shatest_LDADD = ../src/.libs/libcanlock.a |
| 54 |
|
| 55 |
canlocktest_SOURCES = canlocktest.c |
| 56 |
canlocktest_LDADD = ../src/libcanlock.la |
| 57 |
|
| 58 |
canlocktest_multi_SOURCES = canlocktest_multi.c |
| 59 |
canlocktest_multi_LDADD = ../src/libcanlock.la |
| 60 |
|
| 61 |
canlocktest_legacy_SOURCES = canlocktest_legacy.c |
| 62 |
canlocktest_legacy_LDADD = ../src/libcanlock.la |
| 63 |
|
| 64 |
shatest_check.sh: |
| 65 |
$(AM_V_GEN)printf "%s\n" "#! $(SHELL)" >$@ ; \ |
| 66 |
printf "%s\n" '$(GREP) "FAILED" shatest.log && exit 1' >>$@ ; \ |
| 67 |
printf "%s\n" "exit 0" >>$@ ; \ |
| 68 |
printf "%s\n" "# EOF" >>$@ ; \ |
| 69 |
chmod 775 $@ |
| 70 |
|
| 71 |
|
| 72 |
# ============================================================================== |
| 73 |
# Executables to run for "make check" |
| 74 |
|
| 75 |
TESTS = shatest shatest_check.sh canlocktest canlocktest_multi \ |
| 76 |
canlocktest_legacy |
| 77 |
|
| 78 |
|
| 79 |
# EOF |