d26d6e63e0
Two fixes in one: - openssl's libcrypto needs -lz, but because aircrack-ng does not use pkg-config, it misses this dependency. The proper fix would be to use pkg-config, like is done for pcre with patch 0001-Makefile-use-pkg-config-to-find-libpcre-it-s-more-cros.patch but adding -lz is much easier. - sqlite needs -lpthread, so -lpthread must be added _after_ -lsqlite, but we currently add it before. So, force -lpthread after -lsqlite when we are doing a static build. Fixes: http://autobuild.buildroot.net/results/1ea/1ea877851e9d2aeeaf9d320bef12321ec2925b5b/ http://autobuild.buildroot.net/results/cdf/cdf0203fc99d5f7e41e508f6d9edb78a0f0ea732/ Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
61 lines
1.8 KiB
Makefile
61 lines
1.8 KiB
Makefile
################################################################################
|
|
#
|
|
# 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_PREFER_STATIC_LIB),-lpthread -lz)
|
|
|
|
# libnl support has issues when building static
|
|
ifeq ($(BR2_PREFER_STATIC_LIB),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_PREFER_STATIC_LIB),LIBPCAP="-lpcap $(shell $(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_PREFER_STATIC_LIB),-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))
|