2010-10-06 19:31:33 +02:00
|
|
|
##############################################################
|
2009-11-30 15:45:35 +01:00
|
|
|
#
|
|
|
|
# hostapd
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2012-05-14 04:29:59 +02:00
|
|
|
HOSTAPD_VERSION = 1.0
|
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
|
2010-04-26 16:54:32 +02:00
|
|
|
HOSTAPD_DEPENDENCIES = libnl
|
2012-05-14 04:29:59 +02:00
|
|
|
HOSTAPD_CFLAGS = $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnl3/
|
2011-07-25 16:26:40 +02:00
|
|
|
HOSTAPD_LDFLAGS = $(TARGET_LDFLAGS)
|
|
|
|
|
|
|
|
# libnl needs -lm (for rint) if linking statically
|
|
|
|
ifeq ($(BR2_PREFER_STATIC_LIB),y)
|
|
|
|
HOSTAPD_LDFLAGS += -lm
|
|
|
|
endif
|
|
|
|
|
2011-04-27 10:26:39 +02:00
|
|
|
define HOSTAPD_LIBNL_CONFIG
|
2012-05-23 04:06:00 +02:00
|
|
|
echo 'CONFIG_LIBNL32=y' >>$(HOSTAPD_CONFIG)
|
2011-04-27 10:26:39 +02:00
|
|
|
endef
|
|
|
|
|
2012-05-23 04:06:00 +02:00
|
|
|
define HOSTAPD_LIBTOMMATH_CONFIG
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_INTERNAL_LIBTOMMATH.*\)/\2/' $(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
|
|
|
# Try to use openssl or gnutls if it's already available
|
2010-10-06 19:31:33 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
|
|
|
HOSTAPD_DEPENDENCIES += openssl
|
|
|
|
define HOSTAPD_TLS_CONFIG
|
2012-05-23 04:06:00 +02:00
|
|
|
$(SED) 's/\(#\)\(CONFIG_TLS=openssl\)/\2/' $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_EAP_PWD.*\)/\2/' $(HOSTAPD_CONFIG)
|
2010-10-06 19:31:33 +02:00
|
|
|
endef
|
|
|
|
else
|
2012-05-14 04:29:59 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_GNUTLS),y)
|
|
|
|
HOSTAPD_DEPENDENCIES += gnutls
|
|
|
|
define HOSTAPD_TLS_CONFIG
|
2012-05-23 04:06:00 +02:00
|
|
|
$(SED) 's/\(#\)\(CONFIG_TLS=\).*/\2gnutls/' $(HOSTAPD_CONFIG)
|
2012-05-14 04:29:59 +02:00
|
|
|
endef
|
|
|
|
else
|
2010-10-06 19:31:33 +02:00
|
|
|
define HOSTAPD_TLS_CONFIG
|
2012-05-23 04:06:00 +02:00
|
|
|
$(SED) 's/\(#\)\(CONFIG_TLS=\).*/\2internal/' $(HOSTAPD_CONFIG)
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
2009-11-30 15:45:35 +01:00
|
|
|
endif
|
2012-05-14 04:29:59 +02:00
|
|
|
endif
|
2010-09-01 23:44:24 +02:00
|
|
|
|
2010-10-06 19:31:33 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_HOSTAPD_EAP),y)
|
|
|
|
define HOSTAPD_EAP_CONFIG
|
2012-05-23 04:06:00 +02:00
|
|
|
$(SED) 's/\(#\)\(CONFIG_EAP_AKA.*\)/\2/' $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_EAP_FAST.*\)/\2/' $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_EAP_GPSK.*\)/\2/' $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_EAP_IKEV2.*\)/\2/' $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_EAP_PAX.*\)/\2/' $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_EAP_PSK.*\)/\2/' $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_EAP_SAKE.*\)/\2/' $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_EAP_SIM.*\)/\2/' $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_EAP_TNC.*\)/\2/' $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_RADIUS_SERVER.*\)/\2/' $(HOSTAPD_CONFIG)
|
2010-10-06 19:31:33 +02:00
|
|
|
endef
|
2012-05-23 04:06:00 +02:00
|
|
|
ifneq ($(BR2_INET_IPV6),y)
|
2010-10-06 19:31:33 +02:00
|
|
|
define HOSTAPD_RADIUS_IPV6_CONFIG
|
2012-05-23 04:06:00 +02:00
|
|
|
$(SED) 's/\(CONFIG_IPV6.*\)/#\1/' $(HOSTAPD_CONFIG)
|
2010-10-06 19:31:33 +02:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
define HOSTAPD_EAP_CONFIG
|
2012-05-23 04:06:00 +02:00
|
|
|
$(SED) 's/^\(CONFIG_EAP.*\)/#\1/' $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_NO_ACCOUNTING.*\)/\2/' $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_NO_RADIUS.*\)/\2/' $(HOSTAPD_CONFIG)
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
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)
|
2010-10-06 19:31:33 +02:00
|
|
|
define HOSTAPD_WPS_CONFIG
|
2012-05-23 04:06:00 +02:00
|
|
|
$(SED) 's/\(#\)\(CONFIG_WPS.*\)/\2/' $(HOSTAPD_CONFIG)
|
2010-09-01 23:44:24 +02:00
|
|
|
endef
|
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)
|
2009-11-30 15:45:35 +01:00
|
|
|
# Misc
|
2012-05-23 04:06:00 +02:00
|
|
|
$(SED) 's/\(#\)\(CONFIG_IEEE80211N.*\)/\2/' $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_IEEE80211R.*\)/\2/' $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_INTERWORKING.*\)/\2/' $(HOSTAPD_CONFIG)
|
|
|
|
$(SED) 's/\(#\)\(CONFIG_FULL_DYNAMIC_VLAN.*\)/\2/' $(HOSTAPD_CONFIG)
|
|
|
|
$(HOSTAPD_LIBTOMMATH_CONFIG)
|
2010-10-06 19:31:33 +02:00
|
|
|
$(HOSTAPD_TLS_CONFIG)
|
|
|
|
$(HOSTAPD_RADIUS_IPV6_CONFIG)
|
|
|
|
$(HOSTAPD_EAP_CONFIG)
|
|
|
|
$(HOSTAPD_WPS_CONFIG)
|
2011-04-27 10:26:39 +02:00
|
|
|
$(HOSTAPD_LIBNL_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)" \
|
|
|
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
|
|
|
$(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-05-14 04:29:59 +02:00
|
|
|
$(eval $(call GENTARGETS))
|