/
Makefile.inc
299 lines (269 loc) · 10.4 KB
/
Makefile.inc
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
# Aircrack-ng
#
# Copyright (C) 2019 Joseph Benden <joe@benden.us>
#
# Autotool support was written by: Joseph Benden <joe@benden.us>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
#
# In addition, as a special exception, the copyright holders give
# permission to link the code of portions of this program with the
# OpenSSL library under certain conditions as described in each
# individual source file, and distribute linked combinations
# including the two.
#
# You must obey the GNU General Public License in all respects
# for all of the code used other than OpenSSL.
#
# If you modify file(s) with this exception, you may extend this
# exception to your dnl version of the file(s), but you are not obligated
# to do so.
#
# If you dnl do not wish to do so, delete this exception statement from your
# version.
#
# If you delete this exception statement from all source files in the
# program, then also delete it here.
SRC_CE_WEP = %D%/ce-wep/uniqueiv.c
SRC_CE_WPA = %D%/ce-wpa/crypto_engine.c \
%D%/ce-wpa/memory.c \
%D%/ce-wpa/simd-intrinsics.c \
%D%/ce-wpa/wpapsk.c
SRC_COW = %D%/cowpatty/cowpatty.c
SRC_CRYPTO = %D%/crypto/crypto.c
SRC_PTW = %D%/ptw/aircrack-ptw-lib.c
SRC_LIBAC = %D%/libac/adt/avl_tree.c \
%D%/libac/adt/circular_buffer.c \
%D%/libac/adt/circular_queue.c \
%D%/libac/cpu/simd_cpuid.c \
%D%/libac/cpu/trampoline.c \
%D%/libac/support/fragments.c \
%D%/libac/support/common.c \
%D%/libac/support/communications.c \
%D%/libac/support/crypto_engine_loader.c \
%D%/libac/support/mcs_index_rates.c \
%D%/libac/tui/console.c \
%D%/libac/utf8/verifyssid.c
if LIBGCRYPT
SRC_CRYPTO += %D%/crypto/sha1-git.c
endif
if X86
SRC_CRYPTO += %D%/crypto/sha1-sse2.S
endif
libaccrypto_la_SOURCES = $(SRC_CRYPTO)
libaccrypto_la_CFLAGS = $(COMMON_CFLAGS) $(PCRE_CFLAGS)
libaccrypto_la_LIBADD = $(PCRE_LIBS) $(LIBAIRCRACK_OSDEP_LIBS) $(CRYPTO_LIBS)
libcowpatty_la_SOURCES = $(SRC_COW)
libcowpatty_la_CFLAGS = $(COMMON_CFLAGS) $(LIBCOW_CFLAGS)
if !STATIC_CRYPTO
libcowpatty_la_LIBADD = $(COMMON_LDADD)
endif
libptw_la_SOURCES = $(SRC_PTW)
libptw_la_CFLAGS = $(COMMON_CFLAGS)
if !STATIC_CRYPTO
libptw_la_LIBADD = $(COMMON_LDADD)
endif
########################################################################
# Aircrack Support Library #
########################################################################
if ARM
TRAMPOLINE = %D%/libac/cpu/trampoline_arm.c
endif
if PPC
TRAMPOLINE = %D%/libac/cpu/trampoline_ppc.c
endif
if X86
TRAMPOLINE = %D%/libac/cpu/trampoline_x86.c
endif
if !ARM
if !PPC
if !X86
TRAMPOLINE = %D%/libac/cpu/trampoline_stubs.c
endif
endif
endif
if HAVE_HWLOC
CPUSET = %D%/libac/cpu/cpuset_hwloc.c
endif
if !HAVE_HWLOC
CPUSET = %D%/libac/cpu/cpuset_pthread.c
endif
libaircrack_la_SOURCES = $(SRC_LIBAC) $(TRAMPOLINE) $(CPUSET)
libaircrack_la_CFLAGS = $(COMMON_CFLAGS) $(PCRE_CFLAGS) \
"-DLIBAIRCRACK_CE_WPA_PATH=\"$(LIBAIRCRACK_CE_WPA_PATH)\"" \
"-DABS_TOP_SRCDIR=\"$(abs_top_srcdir)\"" \
"-DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\"" \
"-DLIBDIR=\"$(libdir)\""
libaircrack_la_LIBADD = $(COMMON_LDADD) $(LIBAIRCRACK_OSDEP_LIBS) $(PCRE_LIBS) $(CRYPTO_LIBS)
if CYGWIN
libaircrack_la_LIBADD += -lshlwapi
endif
if STATIC_BUILD
libaircrack_la_CFLAGS += -DSTATIC_BUILD
endif
if HAVE_HWLOC
libaircrack_la_CFLAGS += $(HWLOC_CFLAGS)
if !CYGWIN
if !STATIC_HWLOC
libaircrack_la_LIBADD += $(HWLOC_LIBS)
endif
endif
if CYGWIN
if !STATIC_HWLOC
libaircrack_la_LIBADD += $(HWLOC_LIBS)
endif
endif
endif
########################################################################
# Aircrack Crypto Engine for WEP #
########################################################################
libaircrack_ce_wep_la_SOURCES = $(SRC_CE_WEP)
libaircrack_ce_wep_la_CFLAGS = $(COMMON_CFLAGS)
libaircrack_ce_wep_la_LIBADD = $(CRYPTO_LIBS)
########################################################################
# Aircrack Crypto Engine for WPA #
########################################################################
# Intel/AMD
libaircrack_ce_wpa_x86_avx512_la_SOURCES = $(SRC_CE_WPA)
libaircrack_ce_wpa_x86_avx512_la_CFLAGS = $(x86_avx512_cflags) -DSIMD_CORE -DJOHN_AVX512F $(PTHREAD_CFLAGS) $(CRYPTO_CFLAGS) $(ZLIB_CFLAGS)
libaircrack_ce_wpa_x86_avx512_la_LDFLAGS = -release $(LT_VER) -no-undefined
if !STATIC_CRYPTO
libaircrack_ce_wpa_x86_avx512_la_LIBADD = $(LIBACCRYPTO_LIBS) $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(ZLIB_LIBS)
endif
libaircrack_ce_wpa_x86_avx2_la_SOURCES = $(SRC_CE_WPA)
libaircrack_ce_wpa_x86_avx2_la_CFLAGS = $(x86_avx2_cflags) -DSIMD_CORE -DJOHN_AVX2 $(PTHREAD_CFLAGS) $(CRYPTO_CFLAGS) $(ZLIB_CFLAGS)
libaircrack_ce_wpa_x86_avx2_la_LDFLAGS = -release $(LT_VER) -no-undefined
if !STATIC_CRYPTO
libaircrack_ce_wpa_x86_avx2_la_LIBADD = $(LIBACCRYPTO_LIBS) $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(ZLIB_LIBS)
endif
libaircrack_ce_wpa_x86_avx_la_SOURCES = $(SRC_CE_WPA)
libaircrack_ce_wpa_x86_avx_la_CFLAGS = $(x86_avx_cflags) -DSIMD_CORE -DJOHN_AVX $(PTHREAD_CFLAGS) $(CRYPTO_CFLAGS) $(ZLIB_CFLAGS)
libaircrack_ce_wpa_x86_avx_la_LDFLAGS = -release $(LT_VER) -no-undefined
if !STATIC_CRYPTO
libaircrack_ce_wpa_x86_avx_la_LIBADD = $(LIBACCRYPTO_LIBS) $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(ZLIB_LIBS)
endif
libaircrack_ce_wpa_x86_sse2_la_SOURCES = $(SRC_CE_WPA)
libaircrack_ce_wpa_x86_sse2_la_CFLAGS = $(x86_sse2_cflags) -DSIMD_CORE -DJOHN_SSE2 $(PTHREAD_CFLAGS) $(CRYPTO_CFLAGS) $(ZLIB_CFLAGS)
libaircrack_ce_wpa_x86_sse2_la_LDFLAGS = -release $(LT_VER) -no-undefined
if !STATIC_CRYPTO
libaircrack_ce_wpa_x86_sse2_la_LIBADD = $(LIBACCRYPTO_LIBS) $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(ZLIB_LIBS)
endif
# ARM/AARCH64
libaircrack_ce_wpa_arm_neon_la_SOURCES = $(SRC_CE_WPA)
libaircrack_ce_wpa_arm_neon_la_CFLAGS = $(arm_neon_cflags) -DSIMD_CORE -DHAS_NEON $(PTHREAD_CFLAGS) $(CRYPTO_CFLAGS) $(ZLIB_CFLAGS)
libaircrack_ce_wpa_arm_neon_la_LDFLAGS = -release $(LT_VER) -no-undefined
if !STATIC_CRYPTO
libaircrack_ce_wpa_arm_neon_la_LIBADD = $(LIBACCRYPTO_LIBS) $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(ZLIB_LIBS)
endif
# PowerPC
libaircrack_ce_wpa_ppc_altivec_la_SOURCES = $(SRC_CE_WPA)
libaircrack_ce_wpa_ppc_altivec_la_CFLAGS = $(ppc_altivec_cflags) -DSIMD_CORE -DHAS_ALTIVEC=1 -DJOHN_ALTIVEC $(PTHREAD_CFLAGS) $(CRYPTO_CFLAGS) $(ZLIB_CFLAGS)
libaircrack_ce_wpa_ppc_altivec_la_LDFLAGS = -release $(LT_VER) -no-undefined
if !STATIC_CRYPTO
libaircrack_ce_wpa_ppc_altivec_la_LIBADD = $(LIBACCRYPTO_LIBS) $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(ZLIB_LIBS)
endif
libaircrack_ce_wpa_ppc_power8_la_SOURCES = $(SRC_CE_WPA)
libaircrack_ce_wpa_ppc_power8_la_CFLAGS = $(ppc_altivec_cflags) -DSIMD_CORE -DHAS_ALTIVEC=1 -DJOHN_ALTIVEC -DJOHN_POWER8 $(PTHREAD_CFLAGS) $(CRYPTO_CFLAGS) $(ZLIB_CFLAGS)
libaircrack_ce_wpa_ppc_power8_la_LDFLAGS = -release $(LT_VER) -no-undefined
if !STATIC_CRYPTO
libaircrack_ce_wpa_ppc_power8_la_LIBADD = $(LIBACCRYPTO_LIBS) $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(ZLIB_LIBS)
endif
# Generic library
libaircrack_ce_wpa_la_CFLAGS = $(PTHREAD_CFLAGS) $(CRYPTO_CFLAGS) $(ZLIB_CFLAGS)
libaircrack_ce_wpa_la_SOURCES = $(SRC_CE_WPA)
libaircrack_ce_wpa_la_LDFLAGS = -release $(LT_VER) -no-undefined
if !STATIC_CRYPTO
libaircrack_ce_wpa_la_LIBADD = $(LIBACCRYPTO_LIBS) $(PTHREAD_LIBS) $(CRYPTO_LIBS) $(ZLIB_LIBS)
endif
# Build librarie(s)
lib_LTLIBRARIES += libaircrack-ce-wpa.la
if ARM
if NEON
lib_LTLIBRARIES += libaircrack-ce-wpa-arm-neon.la
endif
endif
if PPC
if ALTIVEC
lib_LTLIBRARIES += libaircrack-ce-wpa-ppc-altivec.la
endif
if POWER8
lib_LTLIBRARIES += libaircrack-ce-wpa-ppc-power8.la
endif
endif
if X86
if AVX512F
lib_LTLIBRARIES += libaircrack-ce-wpa-x86-avx512.la
endif
lib_LTLIBRARIES += libaircrack-ce-wpa-x86-avx2.la libaircrack-ce-wpa-x86-avx.la libaircrack-ce-wpa-x86-sse2.la
endif
noinst_LTLIBRARIES += libaircrack-ce-wep.la libcowpatty.la libaccrypto.la libptw.la libaircrack.la
EXTRA_DIST += %D%/ce-wep/uniqueiv.c \
%D%/ce-wpa/crypto_engine.c \
%D%/ce-wpa/memory.c \
%D%/ce-wpa/simd-intrinsics.c \
%D%/ce-wpa/wpapsk.c \
%D%/cowpatty/cowpatty.c \
%D%/crypto/crypto.c \
%D%/crypto/sha1-git.c \
%D%/crypto/sha1-sse2.S \
%D%/libac/adt/avl_tree.c \
%D%/libac/adt/circular_buffer.c \
%D%/libac/adt/circular_queue.c \
%D%/libac/cpu/cpuset_hwloc.c \
%D%/libac/cpu/cpuset_pthread.c \
%D%/libac/cpu/simd_cpuid.c \
%D%/libac/cpu/trampoline.c \
%D%/libac/cpu/trampoline_arm.c \
%D%/libac/cpu/trampoline_ppc.c \
%D%/libac/cpu/trampoline_stubs.c \
%D%/libac/cpu/trampoline_x86.c \
%D%/libac/support/common.c \
%D%/libac/support/communications.c \
%D%/libac/support/crypto_engine_loader.c \
%D%/libac/support/fragments.c \
%D%/libac/support/mcs_index_rates.c \
%D%/libac/tui/console.c \
%D%/libac/utf8/verifyssid.c \
%D%/osdep/aircrack_ng_airpcap.h \
%D%/osdep/airpcap.c \
%D%/osdep/common.c \
%D%/osdep/crctable_osdep.h \
%D%/osdep/cygwin.c \
%D%/osdep/cygwin.h \
%D%/osdep/cygwin_tap.c \
%D%/osdep/darwin.c \
%D%/osdep/darwin_tap.c \
%D%/osdep/dummy.c \
%D%/osdep/dummy_tap.c \
%D%/osdep/file.c \
%D%/osdep/freebsd.c \
%D%/osdep/freebsd_tap.c \
%D%/osdep/linux.c \
%D%/osdep/linux_tap.c \
%D%/osdep/netbsd.c \
%D%/osdep/netbsd_tap.c \
%D%/osdep/network.c \
%D%/osdep/openbsd.c \
%D%/osdep/openbsd_tap.c \
%D%/osdep/osdep.c \
%D%/osdep/tap-win32/common.h \
%D%/ptw/aircrack-ptw-lib.c \
%D%/radiotap/parse.c \
%D%/radiotap/platform.h \
%D%/radiotap/radiotap.c \
%D%/radiotap/radiotap.h \
%D%/radiotap/radiotap_iter.h
include %D%/radiotap/Makefile.inc
include %D%/osdep/Makefile.inc