diff options
Diffstat (limited to 'package/hostapd/hostapd.mk')
-rw-r--r-- | package/hostapd/hostapd.mk | 93 |
1 files changed, 45 insertions, 48 deletions
diff --git a/package/hostapd/hostapd.mk b/package/hostapd/hostapd.mk index 26ebf1de0..c7c59ecc3 100644 --- a/package/hostapd/hostapd.mk +++ b/package/hostapd/hostapd.mk @@ -4,11 +4,12 @@ # ############################################################# -HOSTAPD_VERSION = 0.7.3 +HOSTAPD_VERSION = 1.0 HOSTAPD_SITE = http://hostap.epitest.fi/releases HOSTAPD_SUBDIR = hostapd HOSTAPD_CONFIG = $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/.config HOSTAPD_DEPENDENCIES = libnl +HOSTAPD_CFLAGS = $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnl3/ HOSTAPD_LDFLAGS = $(TARGET_LDFLAGS) # libnl needs -lm (for rint) if linking statically @@ -17,78 +18,73 @@ HOSTAPD_LDFLAGS += -lm endif define HOSTAPD_LIBNL_CONFIG - echo "CONFIG_LIBNL20=y" >>$(HOSTAPD_CONFIG) - echo "CFLAGS += -I$(STAGING_DIR)/usr/include/libnl3/" >>$(HOSTAPD_CONFIG) + echo 'CONFIG_LIBNL32=y' >>$(HOSTAPD_CONFIG) endef -define HOSTAPD_CRYPTO_CONFIG - echo "CONFIG_CRYPTO=internal" >>$(HOSTAPD_CONFIG) - echo "CONFIG_INTERNAL_LIBTOMMATH=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_INTERNAL_LIBTOMMATH_FAST=y" >>$(HOSTAPD_CONFIG) +define HOSTAPD_LIBTOMMATH_CONFIG + $(SED) 's/\(#\)\(CONFIG_INTERNAL_LIBTOMMATH.*\)/\2/' $(HOSTAPD_CONFIG) endef -# Try to use openssl for TLS if it's already available -# gnutls is also supported for TLS +# Try to use openssl or gnutls if it's already available ifeq ($(BR2_PACKAGE_OPENSSL),y) HOSTAPD_DEPENDENCIES += openssl define HOSTAPD_TLS_CONFIG - echo "CONFIG_TLS=openssl" >>$(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_TLS=openssl\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_EAP_PWD.*\)/\2/' $(HOSTAPD_CONFIG) endef else +ifeq ($(BR2_PACKAGE_GNUTLS),y) + HOSTAPD_DEPENDENCIES += gnutls define HOSTAPD_TLS_CONFIG - echo "CONFIG_TLS=internal" >>$(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_TLS=\).*/\2gnutls/' $(HOSTAPD_CONFIG) endef +else +define HOSTAPD_TLS_CONFIG + $(SED) 's/\(#\)\(CONFIG_TLS=\).*/\2internal/' $(HOSTAPD_CONFIG) +endef +endif endif ifeq ($(BR2_PACKAGE_HOSTAPD_EAP),y) define HOSTAPD_EAP_CONFIG - $(SED) "s/CONFIG_EAP_MSCHAPV2=y//" $(HOSTAPD_CONFIG) - $(SED) "s/CONFIG_EAP_PEAP=y//" $(HOSTAPD_CONFIG) - $(SED) "s/CONFIG_EAP_TLS=y//" $(HOSTAPD_CONFIG) - $(SED) "s/CONFIG_EAP_TTLS=y//" $(HOSTAPD_CONFIG) - echo "CONFIG_EAP_AKA=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_EAP_AKA_PRIME=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_EAP_GPSK=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_EAP_GPSK_SHA256=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_EAP_PAX=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_EAP_PSK=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_EAP_SAKE=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_EAP_SIM=y" >>$(HOSTAPD_CONFIG) - echo "CONFIG_RADIUS_SERVER=y" >>$(HOSTAPD_CONFIG) + $(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) endef -ifeq ($(BR2_INET_IPV6),y) +ifneq ($(BR2_INET_IPV6),y) define HOSTAPD_RADIUS_IPV6_CONFIG - $(SED) "s/^#CONFIG_IPV6/CONFIG_IPV6/" $(HOSTAPD_CONFIG) + $(SED) 's/\(CONFIG_IPV6.*\)/#\1/' $(HOSTAPD_CONFIG) endef endif else define HOSTAPD_EAP_CONFIG - $(SED) "s/^CONFIG_EAP/#CONFIG_EAP/g" $(HOSTAPD_CONFIG) - $(SED) "s/^#CONFIG_NO_ACCOUNTING/CONFIG_NO_ACCOUNTING/" $(HOSTAPD_CONFIG) - $(SED) "s/^#CONFIG_NO_RADIUS/CONFIG_NO_RADIUS/" $(HOSTAPD_CONFIG) + $(SED) 's/^\(CONFIG_EAP.*\)/#\1/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_NO_ACCOUNTING.*\)/\2/' $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_NO_RADIUS.*\)/\2/' $(HOSTAPD_CONFIG) endef endif ifeq ($(BR2_PACKAGE_HOSTAPD_WPS),y) define HOSTAPD_WPS_CONFIG - $(SED) "s/^#CONFIG_WPS/CONFIG_WPS/g" $(HOSTAPD_CONFIG) + $(SED) 's/\(#\)\(CONFIG_WPS.*\)/\2/' $(HOSTAPD_CONFIG) endef endif define HOSTAPD_CONFIGURE_CMDS - cp $(@D)/$(HOSTAPD_SUBDIR)/defconfig $(HOSTAPD_CONFIG) - $(SED) "s/\/local//" $(@D)/$(HOSTAPD_SUBDIR)/Makefile - echo "CFLAGS += $(TARGET_CFLAGS)" >>$(HOSTAPD_CONFIG) - echo "LDFLAGS += $(HOSTAPD_LDFLAGS)" >>$(HOSTAPD_CONFIG) - echo "CC = $(TARGET_CC)" >>$(HOSTAPD_CONFIG) -# Drivers - $(SED) "s/^#CONFIG_DRIVER_WIRED/CONFIG_DRIVER_WIRED/" $(HOSTAPD_CONFIG) - $(SED) "s/^#CONFIG_DRIVER_NL80211/CONFIG_DRIVER_NL80211/" $(HOSTAPD_CONFIG) + cp $(@D)/hostapd/defconfig $(HOSTAPD_CONFIG) # Misc - $(SED) "s/^CONFIG_IPV6/#CONFIG_IPV6/" $(HOSTAPD_CONFIG) - $(SED) "s/^#CONFIG_IEEE80211N/CONFIG_IEEE80211N/" $(HOSTAPD_CONFIG) - $(SED) "s/^#CONFIG_IEEE80211R/CONFIG_IEEE80211R/" $(HOSTAPD_CONFIG) - $(HOSTAPD_CRYPTO_CONFIG) + $(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) $(HOSTAPD_TLS_CONFIG) $(HOSTAPD_RADIUS_IPV6_CONFIG) $(HOSTAPD_EAP_CONFIG) @@ -96,6 +92,12 @@ define HOSTAPD_CONFIGURE_CMDS $(HOSTAPD_LIBNL_CONFIG) endef +define HOSTAPD_BUILD_CMDS + $(TARGET_MAKE_ENV) CFLAGS="$(HOSTAPD_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + $(MAKE) CC="$(TARGET_CC)" -C $(@D)/$(HOSTAPD_SUBDIR) +endef + define HOSTAPD_INSTALL_TARGET_CMDS $(INSTALL) -m 0755 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd \ $(TARGET_DIR)/usr/sbin/hostapd @@ -103,9 +105,4 @@ define HOSTAPD_INSTALL_TARGET_CMDS $(TARGET_DIR)/usr/bin/hostapd_cli endef -define HOSTAPD_UNINSTALL_TARGET_CMDS - rm -f $(TARGET_DIR)/usr/sbin/hostapd - rm -f $(TARGET_DIR)/usr/bin/hostapd -endef - -$(eval $(call AUTOTARGETS)) +$(eval $(call GENTARGETS)) |