1# Aircrack-ng 2# 3# Copyright (C) 2018 Joseph Benden <joe@benden.us> 4# 5# Autotool support was written by: Joseph Benden <joe@benden.us> 6# 7# This program is free software; you can redistribute it and/or modify 8# it under the terms of the GNU General Public License as published by 9# the Free Software Foundation; either version 2 of the License, or 10# (at your option) any later version. 11# 12# This program is distributed in the hope that it will be useful, 13# but WITHOUT ANY WARRANTY; without even the implied warranty of 14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15# GNU General Public License for more details. 16# 17# You should have received a copy of the GNU General Public License 18# along with this program; if not, write to the Free Software 19# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 20# 21# In addition, as a special exception, the copyright holders give 22# permission to link the code of portions of this program with the 23# OpenSSL library under certain conditions as described in each 24# individual source file, and distribute linked combinations 25# including the two. 26# 27# You must obey the GNU General Public License in all respects 28# for all of the code used other than OpenSSL. 29# 30# If you modify file(s) with this exception, you may extend this 31# exception to your dnl version of the file(s), but you are not obligated 32# to do so. 33# 34# If you dnl do not wish to do so, delete this exception statement from your 35# version. 36# 37# If you delete this exception statement from all source files in the 38# program, then also delete it here. 39 40AM_CPPFLAGS = -I$(top_srcdir) \ 41 -I$(top_srcdir)/src/include \ 42 -I$(top_srcdir)/src \ 43 $(CRYPTO_INCLUDES) 44 45AM_TESTS_ENVIRONMENT= \ 46 TEST_SRCDIR="$(abs_srcdir)" \ 47 TEST_BUILDDIR="$(abs_builddir)" \ 48 CMOCKA_MESSAGE_OUTPUT=TAP 49 50LIBAIRCRACK_CRYPTO_PATH = $(abs_top_builddir)/src/aircrack-crypto/ 51 52LIBAC = ../../src/libaclib.la 53LIBAC_LIBS = -L../../src -laclib 54 55LIBAIRCRACK_CRYPTO = ../../src/aircrack-crypto/libaircrack-crypto.la 56LIBAIRCRACK_CRYPTO_LIBS = -L../../src/aircrack-crypto -laircrack-crypto 57 58LIBAIRCRACK_UTIL = ../../src/aircrack-util/libaircrack-util.la 59LIBAIRCRACK_UTIL_LIBS = -L../../src/aircrack-util -laircrack-util 60 61COMMON_CFLAGS = $(PTHREAD_CFLAGS) \ 62 $(CRYPTO_CFLAGS) \ 63 $(ZLIB_CFLAGS) \ 64 $(CMOCKA_CFLAGS) 65COMMON_LDADD = $(PTHREAD_LIBS) \ 66 $(CRYPTO_LIBS) \ 67 $(ZLIB_LIBS) \ 68 $(CMOCKA_LIBS) 69 70test_calc_one_pmk_SOURCES = test-calc-one-pmk.c \ 71 $(LIBAIRCRACK_CRYPTO) 72test_calc_one_pmk_CFLAGS = $(COMMON_CFLAGS) 73test_calc_one_pmk_LDFLAGS = -rdynamic 74test_calc_one_pmk_LDADD = $(LIBAIRCRACK_CRYPTO_LIBS) \ 75 $(COMMON_LDADD) 76 77test_circular_buffer_SOURCES = test-circular-buffer.c \ 78 $(LIBAIRCRACK_UTIL) 79test_circular_buffer_CFLAGS = $(COMMON_CFLAGS) 80test_circular_buffer_LDFLAGS = -rdynamic 81test_circular_buffer_LDADD = $(LIBAIRCRACK_UTIL_LIBS) $(COMMON_LDADD) 82 83test_circular_queue_SOURCES = test-circular-queue.c \ 84 $(LIBAIRCRACK_UTIL) 85test_circular_queue_CFLAGS = $(COMMON_CFLAGS) 86test_circular_queue_LDFLAGS = -rdynamic 87test_circular_queue_LDADD = $(LIBAIRCRACK_UTIL_LIBS) $(COMMON_LDADD) 88 89test_string_has_suffix_SOURCES = test-string-has-suffix.c \ 90 $(LIBAIRCRACK_UTIL) 91test_string_has_suffix_CFLAGS = $(COMMON_CFLAGS) 92test_string_has_suffix_LDFLAGS = -rdynamic 93test_string_has_suffix_LDADD = $(LIBAIRCRACK_UTIL_LIBS) $(COMMON_LDADD) 94 95test_wpapsk_SOURCES = test-wpapsk.c \ 96 $(LIBAIRCRACK_UTIL) 97test_wpapsk_CFLAGS = "-DLIBAIRCRACK_CRYPTO_PATH=\"$(LIBAIRCRACK_CRYPTO_PATH)\"" \ 98 "-DABS_TOP_SRCDIR=\"$(abs_top_srcdir)\"" \ 99 "-DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\"" \ 100 "-DLIBDIR=\"$(libdir)\"" \ 101 $(COMMON_CFLAGS) 102test_wpapsk_LDFLAGS = -rdynamic 103test_wpapsk_LDADD = $(LIBAIRCRACK_CRYPTO_LIBS) \ 104 $(LIBAIRCRACK_UTIL_LIBS) \ 105 $(COMMON_LDADD) 106 107test_wpapsk_cmac_SOURCES = test-wpapsk-cmac.c \ 108 $(LIBAIRCRACK_UTIL) 109test_wpapsk_cmac_CFLAGS = "-DLIBAIRCRACK_CRYPTO_PATH=\"$(LIBAIRCRACK_CRYPTO_PATH)\"" \ 110 "-DABS_TOP_SRCDIR=\"$(abs_top_srcdir)\"" \ 111 "-DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\"" \ 112 "-DLIBDIR=\"$(libdir)\"" \ 113 $(COMMON_CFLAGS) 114test_wpapsk_cmac_LDFLAGS = -rdynamic 115test_wpapsk_cmac_LDADD = $(LIBAIRCRACK_UTIL_LIBS) \ 116 $(COMMON_LDADD) 117 118TESTS = test-calc-one-pmk test-circular-buffer test-circular-queue test-string-has-suffix 119 120if !STATIC_BUILD 121TESTS += test-wpapsk 122TESTS += test-wpapsk-cmac 123endif 124 125check_PROGRAMS = test-calc-one-pmk test-circular-buffer test-circular-queue test-string-has-suffix 126 127if !STATIC_BUILD 128check_PROGRAMS += test-wpapsk 129check_PROGRAMS += test-wpapsk-cmac 130endif 131 132 133@CODE_COVERAGE_RULES@ 134 135@VALGRIND_CHECK_RULES@ 136