summaryrefslogtreecommitdiffstats
path: root/package/aircrack-ng/aircrack-ng.mk
blob: 7e5464d382e66b740b211dcd29bbef3a62e4f75d (plain)
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
################################################################################
#
# aircrack-ng
#
################################################################################

AIRCRACK_NG_VERSION = 1.2-rc1
AIRCRACK_NG_SITE = http://download.aircrack-ng.org
AIRCRACK_NG_LICENSE = GPLv2+
AIRCRACK_NG_LICENSE_FILES = LICENSE
AIRCRACK_NG_DEPENDENCIES = openssl zlib host-pkgconf
# Enable buddy-ng, easside-ng, tkiptun-ng, wesside-ng
AIRCRACK_NG_MAKE_OPTS = unstable=true

# Account for libpthread in static
AIRCRACK_NG_LDFLAGS = $(TARGET_LDFLAGS) \
	$(if $(BR2_STATIC_LIBS),-lpthread -lz)

# libnl support has issues when building static
ifeq ($(BR2_STATIC_LIBS),y)
AIRCRACK_NG_MAKE_OPTS += libnl=false
else
AIRCRACK_NG_MAKE_OPTS += libnl=true
AIRCRACK_NG_DEPENDENCIES += libnl
endif

ifeq ($(BR2_PACKAGE_LIBPCAP),y)
AIRCRACK_NG_DEPENDENCIES += libpcap
AIRCRACK_NG_MAKE_OPTS += HAVE_PCAP=yes \
	$(if $(BR2_STATIC_LIBS),LIBPCAP="-lpcap `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`")
else
AIRCRACK_NG_MAKE_OPTS += HAVE_PCAP=no
endif

ifeq ($(BR2_PACKAGE_PCRE),y)
AIRCRACK_NG_DEPENDENCIES += pcre
AIRCRACK_NG_MAKE_OPTS += pcre=true
else
AIRCRACK_NG_MAKE_OPTS += pcre=false
endif

# Duplicate -lpthread, because it is also needed by sqlite
ifeq ($(BR2_PACKAGE_SQLITE),y)
AIRCRACK_NG_DEPENDENCIES += sqlite
AIRCRACK_NG_MAKE_OPTS += sqlite=true LIBSQL="-lsqlite3 $(if $(BR2_STATIC_LIBS),-lpthread)"
else
AIRCRACK_NG_MAKE_OPTS += sqlite=false
endif

define AIRCRACK_NG_BUILD_CMDS
	$(TARGET_CONFIGURE_OPTS) LDFLAGS="$(AIRCRACK_NG_LDFLAGS)" \
		$(MAKE) -C $(@D) $(AIRCRACK_NG_MAKE_OPTS)
endef

define AIRCRACK_NG_INSTALL_TARGET_CMDS
	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) \
		prefix=/usr $(AIRCRACK_NG_MAKE_OPTS) install
endef

$(eval $(generic-package))
OpenPOWER on IntegriCloud