"Fossies" - the Fresh Open Source Software Archive

Member "buildroot-2021.05/package/hostapd/hostapd.mk" (6 Jun 2021, 4759 Bytes) of package /linux/privat/buildroot-2021.05.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Make source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes reports for "hostapd.mk": 2021.05-rc3_vs_2021.05 or 2021.02.2_vs_2021.05.

    1 ################################################################################
    2 #
    3 # hostapd
    4 #
    5 ################################################################################
    6 
    7 HOSTAPD_VERSION = 2.9
    8 HOSTAPD_SITE = http://w1.fi/releases
    9 HOSTAPD_SUBDIR = hostapd
   10 HOSTAPD_CONFIG = $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/.config
   11 HOSTAPD_PATCH = \
   12     https://w1.fi/security/2020-1/0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch \
   13     https://w1.fi/security/2020-1/0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch \
   14     https://w1.fi/security/2020-1/0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch \
   15     https://w1.fi/security/2021-1/0001-P2P-Fix-a-corner-case-in-peer-addition-based-on-PD-R.patch
   16 HOSTAPD_DEPENDENCIES = host-pkgconf
   17 HOSTAPD_CFLAGS = $(TARGET_CFLAGS)
   18 HOSTAPD_LICENSE = BSD-3-Clause
   19 HOSTAPD_LICENSE_FILES = README
   20 
   21 # 0001-AP-Silently-ignore-management-frame-from-unexpected-.patch
   22 HOSTAPD_IGNORE_CVES += CVE-2019-16275
   23 
   24 # 0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch
   25 HOSTAPD_IGNORE_CVES += CVE-2020-12695
   26 
   27 # 0002-ASN.1-Validate-DigestAlgorithmIdentifier-parameters.patch
   28 HOSTAPD_IGNORE_CVES += CVE-2021-30004
   29 
   30 # 0001-P2P-Fix-a-corner-case-in-peer-addition-based-on-PD-R.patch
   31 HOSTAPD_IGNORE_CVES += CVE-2021-27803
   32 
   33 HOSTAPD_CPE_ID_VENDOR = w1.fi
   34 HOSTAPD_CONFIG_SET =
   35 
   36 HOSTAPD_CONFIG_ENABLE = \
   37     CONFIG_INTERNAL_LIBTOMMATH \
   38     CONFIG_DEBUG_FILE \
   39     CONFIG_DEBUG_SYSLOG
   40 
   41 HOSTAPD_CONFIG_DISABLE =
   42 
   43 # Try to use openssl if it's already available
   44 ifeq ($(BR2_PACKAGE_LIBOPENSSL),y)
   45 HOSTAPD_DEPENDENCIES += host-pkgconf libopenssl
   46 HOSTAPD_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs openssl`
   47 HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=openssl\)/\1/'
   48 else
   49 HOSTAPD_CONFIG_DISABLE += CONFIG_EAP_PWD CONFIG_EAP_TEAP
   50 HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/'
   51 endif
   52 
   53 ifeq ($(BR2_PACKAGE_HOSTAPD_DRIVER_HOSTAP),)
   54 HOSTAPD_CONFIG_DISABLE += CONFIG_DRIVER_HOSTAP
   55 endif
   56 
   57 ifeq ($(BR2_PACKAGE_HOSTAPD_DRIVER_NL80211),)
   58 HOSTAPD_CONFIG_DISABLE += CONFIG_DRIVER_NL80211
   59 endif
   60 
   61 ifeq ($(BR2_PACKAGE_HOSTAPD_DRIVER_WIRED),y)
   62 HOSTAPD_CONFIG_ENABLE += CONFIG_DRIVER_WIRED
   63 endif
   64 
   65 ifeq ($(BR2_PACKAGE_HOSTAPD_DRIVER_NONE),y)
   66 HOSTAPD_CONFIG_ENABLE += CONFIG_DRIVER_NONE
   67 endif
   68 
   69 # Add options for wireless drivers
   70 ifeq ($(BR2_PACKAGE_HOSTAPD_HAS_WIFI_DRIVERS),y)
   71 HOSTAPD_CONFIG_ENABLE += \
   72     CONFIG_HS20 \
   73     CONFIG_IEEE80211AC \
   74     CONFIG_IEEE80211N \
   75     CONFIG_IEEE80211R \
   76     CONFIG_INTERWORKING
   77 endif
   78 
   79 ifeq ($(BR2_PACKAGE_HOSTAPD_ACS),y)
   80 HOSTAPD_CONFIG_ENABLE += CONFIG_ACS
   81 endif
   82 
   83 ifeq ($(BR2_PACKAGE_HOSTAPD_EAP),y)
   84 HOSTAPD_CONFIG_ENABLE += \
   85     CONFIG_EAP \
   86     CONFIG_RADIUS_SERVER
   87 
   88 # Enable both TLS v1.1 (CONFIG_TLSV11) and v1.2 (CONFIG_TLSV12)
   89 HOSTAPD_CONFIG_ENABLE += CONFIG_TLSV1
   90 else
   91 HOSTAPD_CONFIG_DISABLE += CONFIG_EAP
   92 HOSTAPD_CONFIG_ENABLE += \
   93     CONFIG_NO_ACCOUNTING \
   94     CONFIG_NO_RADIUS
   95 endif
   96 
   97 ifeq ($(BR2_PACKAGE_HOSTAPD_WPS),y)
   98 HOSTAPD_CONFIG_ENABLE += CONFIG_WPS
   99 endif
  100 
  101 ifeq ($(BR2_PACKAGE_HOSTAPD_WPA3),y)
  102 HOSTAPD_CONFIG_SET += \
  103     CONFIG_DPP \
  104     CONFIG_SAE
  105 HOSTAPD_CONFIG_ENABLE += \
  106     CONFIG_OWE
  107 else
  108 HOSTAPD_CONFIG_DISABLE += \
  109     CONFIG_OWE
  110 endif
  111 
  112 ifeq ($(BR2_PACKAGE_HOSTAPD_VLAN),)
  113 HOSTAPD_CONFIG_ENABLE += CONFIG_NO_VLAN
  114 endif
  115 
  116 ifeq ($(BR2_PACKAGE_HOSTAPD_VLAN_DYNAMIC),y)
  117 HOSTAPD_CONFIG_ENABLE += CONFIG_FULL_DYNAMIC_VLAN
  118 HOSTAPD_CONFIG_SET += NEED_LINUX_IOCTL
  119 endif
  120 
  121 ifeq ($(BR2_PACKAGE_HOSTAPD_VLAN_NETLINK),y)
  122 HOSTAPD_CONFIG_ENABLE += CONFIG_VLAN_NETLINK
  123 endif
  124 
  125 # Options for building with libnl
  126 ifeq ($(BR2_PACKAGE_LIBNL),y)
  127 HOSTAPD_DEPENDENCIES += libnl
  128 HOSTAPD_CFLAGS += -I$(STAGING_DIR)/usr/include/libnl3/
  129 HOSTAPD_CONFIG_ENABLE += CONFIG_LIBNL32
  130 # libnl-3 needs -lm (for rint) and -lpthread if linking statically
  131 # And library order matters hence stick -lnl-3 first since it's appended
  132 # in the hostapd Makefiles as in LIBS+=-lnl-3 ... thus failing
  133 ifeq ($(BR2_STATIC_LIBS),y)
  134 HOSTAPD_LIBS += -lnl-3 -lm -lpthread
  135 endif
  136 endif
  137 
  138 define HOSTAPD_CONFIGURE_CMDS
  139     cp $(@D)/hostapd/defconfig $(HOSTAPD_CONFIG)
  140     sed -i $(patsubst %,-e 's/^#\(%\)/\1/',$(HOSTAPD_CONFIG_ENABLE)) \
  141         $(patsubst %,-e 's/^\(%\)/#\1/',$(HOSTAPD_CONFIG_DISABLE)) \
  142         $(patsubst %,-e '1i%=y',$(HOSTAPD_CONFIG_SET)) \
  143         $(patsubst %,-e %,$(HOSTAPD_CONFIG_EDITS)) \
  144         $(HOSTAPD_CONFIG)
  145 endef
  146 
  147 define HOSTAPD_BUILD_CMDS
  148     $(TARGET_MAKE_ENV) CFLAGS="$(HOSTAPD_CFLAGS)" \
  149         LDFLAGS="$(TARGET_LDFLAGS)" LIBS="$(HOSTAPD_LIBS)" \
  150         $(MAKE) CC="$(TARGET_CC)" -C $(@D)/$(HOSTAPD_SUBDIR)
  151 endef
  152 
  153 define HOSTAPD_INSTALL_TARGET_CMDS
  154     $(INSTALL) -m 0755 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd \
  155         $(TARGET_DIR)/usr/sbin/hostapd
  156     $(INSTALL) -m 0755 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd_cli \
  157         $(TARGET_DIR)/usr/bin/hostapd_cli
  158     $(INSTALL) -m 0644 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd.conf \
  159         $(TARGET_DIR)/etc/hostapd.conf
  160 endef
  161 
  162 $(eval $(generic-package))