2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2009-11-30 15:45:35 +01:00
|
|
|
#
|
|
|
|
# hostapd
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2009-11-30 15:45:35 +01:00
|
|
|
|
2015-09-29 09:24:56 +02:00
|
|
|
HOSTAPD_VERSION = 2.5
|
2009-11-30 15:45:35 +01:00
|
|
|
HOSTAPD_SITE = http://hostap.epitest.fi/releases
|
|
|
|
HOSTAPD_SUBDIR = hostapd
|
|
|
|
HOSTAPD_CONFIG = $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/.config
|
2014-12-17 00:17:12 +01:00
|
|
|
HOSTAPD_DEPENDENCIES = host-pkgconf libnl
|
2012-05-14 04:29:59 +02:00
|
|
|
HOSTAPD_CFLAGS = $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnl3/
|
2012-12-03 05:46:08 +01:00
|
|
|
HOSTAPD_LICENSE = GPLv2/BSD-3c
|
|
|
|
HOSTAPD_LICENSE_FILES = README
|
2014-02-27 21:47:11 +01:00
|
|
|
HOSTAPD_CONFIG_SET =
|
|
|
|
|
|
|
|
HOSTAPD_CONFIG_ENABLE = \
|
|
|
|
CONFIG_FULL_DYNAMIC_VLAN \
|
|
|
|
CONFIG_HS20 \
|
|
|
|
CONFIG_IEEE80211AC \
|
|
|
|
CONFIG_IEEE80211N \
|
|
|
|
CONFIG_IEEE80211R \
|
|
|
|
CONFIG_INTERNAL_LIBTOMMATH \
|
|
|
|
CONFIG_INTERWORKING \
|
|
|
|
CONFIG_LIBNL32 \
|
|
|
|
CONFIG_VLAN_NETLINK
|
|
|
|
|
|
|
|
HOSTAPD_CONFIG_DISABLE =
|
2011-07-25 16:26:40 +02:00
|
|
|
|
2013-11-29 15:25:43 +01:00
|
|
|
# libnl-3 needs -lm (for rint) and -lpthread if linking statically
|
|
|
|
# And library order matters hence stick -lnl-3 first since it's appended
|
|
|
|
# in the hostapd Makefiles as in LIBS+=-lnl-3 ... thus failing
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2013-11-29 15:25:43 +01:00
|
|
|
HOSTAPD_LIBS += -lnl-3 -lm -lpthread
|
2011-07-25 16:26:40 +02:00
|
|
|
endif
|
|
|
|
|
2012-12-28 10:47:18 +01:00
|
|
|
# Try to use openssl if it's already available
|
2010-10-06 19:31:33 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
HOSTAPD_DEPENDENCIES += openssl
|
|
|
|
HOSTAPD_LIBS += $(if $(BR2_STATIC_LIBS),-lcrypto -lz)
|
|
|
|
HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=openssl\)/\1/'
|
2010-10-06 19:31:33 +02:00
|
|
|
else
|
2015-03-31 09:21:57 +02:00
|
|
|
HOSTAPD_CONFIG_DISABLE += CONFIG_EAP_PWD
|
|
|
|
HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/'
|
2009-11-30 15:45:35 +01:00
|
|
|
endif
|
2010-09-01 23:44:24 +02:00
|
|
|
|
2015-12-03 17:40:38 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_ACS),y)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_ACS
|
|
|
|
endif
|
|
|
|
|
2010-10-06 19:31:33 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_EAP),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
HOSTAPD_CONFIG_ENABLE += \
|
|
|
|
CONFIG_EAP \
|
|
|
|
CONFIG_RADIUS_SERVER \
|
2014-06-05 16:24:19 +02:00
|
|
|
|
2015-03-31 09:21:57 +02:00
|
|
|
# Enable both TLS v1.1 (CONFIG_TLSV11) and v1.2 (CONFIG_TLSV12)
|
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_TLSV1
|
2010-10-06 19:31:33 +02:00
|
|
|
else
|
2015-03-31 09:21:57 +02:00
|
|
|
HOSTAPD_CONFIG_DISABLE += CONFIG_EAP
|
|
|
|
HOSTAPD_CONFIG_ENABLE += \
|
|
|
|
CONFIG_NO_ACCOUNTING \
|
|
|
|
CONFIG_NO_RADIUS
|
2009-11-30 15:45:35 +01:00
|
|
|
endif
|
2010-09-01 23:44:24 +02:00
|
|
|
|
2009-11-30 15:45:35 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_WPS),y)
|
2015-03-31 09:21:57 +02:00
|
|
|
HOSTAPD_CONFIG_ENABLE += CONFIG_WPS
|
2009-11-30 15:45:35 +01:00
|
|
|
endif
|
2010-09-01 23:44:24 +02:00
|
|
|
|
|
|
|
define HOSTAPD_CONFIGURE_CMDS
|
2012-05-14 04:29:59 +02:00
|
|
|
cp $(@D)/hostapd/defconfig $(HOSTAPD_CONFIG)
|
2014-02-27 21:47:11 +01:00
|
|
|
sed -i $(patsubst %,-e 's/^#\(%\)/\1/',$(HOSTAPD_CONFIG_ENABLE)) \
|
|
|
|
$(patsubst %,-e 's/^\(%\)/#\1/',$(HOSTAPD_CONFIG_DISABLE)) \
|
|
|
|
$(patsubst %,-e '1i%=y',$(HOSTAPD_CONFIG_SET)) \
|
|
|
|
$(patsubst %,-e %,$(HOSTAPD_CONFIG_EDITS)) \
|
|
|
|
$(HOSTAPD_CONFIG)
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
2009-11-30 15:45:35 +01:00
|
|
|
|
2012-05-14 04:29:59 +02:00
|
|
|
define HOSTAPD_BUILD_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) CFLAGS="$(HOSTAPD_CFLAGS)" \
|
2013-11-29 15:25:43 +01:00
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" LIBS="$(HOSTAPD_LIBS)" \
|
2012-05-14 04:29:59 +02:00
|
|
|
$(MAKE) CC="$(TARGET_CC)" -C $(@D)/$(HOSTAPD_SUBDIR)
|
|
|
|
endef
|
|
|
|
|
2010-09-01 23:44:24 +02:00
|
|
|
define HOSTAPD_INSTALL_TARGET_CMDS
|
2010-12-09 10:55:01 +01:00
|
|
|
$(INSTALL) -m 0755 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd \
|
|
|
|
$(TARGET_DIR)/usr/sbin/hostapd
|
|
|
|
$(INSTALL) -m 0755 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd_cli \
|
|
|
|
$(TARGET_DIR)/usr/bin/hostapd_cli
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
2009-11-30 15:45:35 +01:00
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(generic-package))
|