Debian Codegraph @

test/unit/Makefile.inc

raw
1 # Aircrack-ng
2 #
3 # Copyright (C) 2018 Joseph Benden <[email protected]>
4 #
5 # Autotool support was written by: Joseph Benden <[email protected]>
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
40 UNIT_COMMON_CFLAGS = $(PTHREAD_CFLAGS) \
41 $(CRYPTO_CFLAGS) \
42 $(ZLIB_CFLAGS) \
43 $(CMOCKA_CFLAGS)
44
45 UNIT_COMMON_LDADD = $(PTHREAD_LIBS) \
46 $(CRYPTO_LDFLAGS) \
47 $(CRYPTO_LIBS) \
48 $(ZLIB_LIBS) \
49 $(LIBAIRCRACK_LIBS) \
50 $(CMOCKA_LIBS)
51
52 test_calc_one_pmk_SOURCES = %D%/test-calc-one-pmk.c
53 test_calc_one_pmk_CFLAGS = $(UNIT_COMMON_CFLAGS)
54 test_calc_one_pmk_LDFLAGS = -rdynamic
55 test_calc_one_pmk_LDADD = libaccrypto.la $(LIBAIRCRACK_CE_WPA_LIBS) \
56 $(UNIT_COMMON_LDADD)
57
58 test_circular_buffer_SOURCES = %D%/test-circular-buffer.c
59 test_circular_buffer_CFLAGS = $(UNIT_COMMON_CFLAGS)
60 test_circular_buffer_LDFLAGS = -rdynamic
61 test_circular_buffer_LDADD = $(LIBAIRCRACK_LIBS) $(UNIT_COMMON_LDADD)
62
63 test_circular_queue_SOURCES = %D%/test-circular-queue.c
64 test_circular_queue_CFLAGS = $(UNIT_COMMON_CFLAGS)
65 test_circular_queue_LDFLAGS = -rdynamic
66 test_circular_queue_LDADD = $(LIBAIRCRACK_LIBS) $(UNIT_COMMON_LDADD)
67
68 test_string_has_suffix_SOURCES = %D%/test-string-has-suffix.c
69 test_string_has_suffix_CFLAGS = $(UNIT_COMMON_CFLAGS)
70 test_string_has_suffix_LDFLAGS = -rdynamic
71 test_string_has_suffix_LDADD = $(LIBAIRCRACK_LIBS) $(UNIT_COMMON_LDADD)
72
73 test_wpapsk_SOURCES = %D%/test-wpapsk.c
74 test_wpapsk_CFLAGS = "-DLIBAIRCRACK_CE_WPA_PATH=\"$(LIBAIRCRACK_CE_WPA_PATH)\"" \
75 "-DABS_TOP_SRCDIR=\"$(abs_top_srcdir)\"" \
76 "-DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\"" \
77 "-DLIBDIR=\"$(libdir)\"" \
78 $(UNIT_COMMON_CFLAGS)
79 test_wpapsk_LDFLAGS = -rdynamic
80 test_wpapsk_LDADD = libaccrypto.la $(LIBAIRCRACK_CE_WPA_LIBS) \
81 $(LIBAIRCRACK_LIBS) \
82 $(UNIT_COMMON_LDADD)
83
84 test_wpapsk_cmac_SOURCES = %D%/test-wpapsk-cmac.c
85 test_wpapsk_cmac_CFLAGS = "-DLIBAIRCRACK_CE_WPA_PATH=\"$(LIBAIRCRACK_CE_WPA_PATH)\"" \
86 "-DABS_TOP_SRCDIR=\"$(abs_top_srcdir)\"" \
87 "-DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\"" \
88 "-DLIBDIR=\"$(libdir)\"" \
89 $(UNIT_COMMON_CFLAGS)
90 test_wpapsk_cmac_LDFLAGS = -rdynamic
91 test_wpapsk_cmac_LDADD = $(LIBAIRCRACK_LIBS) \
92 $(UNIT_COMMON_LDADD)
93
94 TESTS += test-calc-one-pmk test-circular-buffer test-circular-queue test-string-has-suffix
95
96 if !STATIC_BUILD
97 TESTS += test-wpapsk
98 TESTS += test-wpapsk-cmac
99 endif
100
101 check_PROGRAMS += test-calc-one-pmk test-circular-buffer test-circular-queue test-string-has-suffix
102
103 if !STATIC_BUILD
104 check_PROGRAMS += test-wpapsk
105 check_PROGRAMS += test-wpapsk-cmac
106 endif