1 ################################################################################
5 ################################################################################
8 HOSTAPD_SITE
= http
://hostap.epitest.fi
/releases
9 HOSTAPD_SUBDIR
= hostapd
10 HOSTAPD_CONFIG
= $(HOSTAPD_DIR
)/$(HOSTAPD_SUBDIR
)/.config
11 HOSTAPD_DEPENDENCIES
= host-pkgconf libnl
12 HOSTAPD_CFLAGS
= $(TARGET_CFLAGS
) -I
$(STAGING_DIR
)/usr
/include/libnl3
/
13 HOSTAPD_LICENSE
= BSD-3c
14 HOSTAPD_LICENSE_FILES
= README
17 HOSTAPD_CONFIG_ENABLE
= \
18 CONFIG_FULL_DYNAMIC_VLAN \
23 CONFIG_INTERNAL_LIBTOMMATH \
28 HOSTAPD_CONFIG_DISABLE
=
30 # libnl-3 needs -lm (for rint) and -lpthread if linking statically
31 # And library order matters hence stick -lnl-3 first since it's appended
32 # in the hostapd Makefiles as in LIBS+=-lnl-3 ... thus failing
33 ifeq ($(BR2_STATIC_LIBS
),y
)
34 HOSTAPD_LIBS
+= -lnl-3
-lm
-lpthread
37 # Try to use openssl if it's already available
38 ifeq ($(BR2_PACKAGE_OPENSSL
),y
)
39 HOSTAPD_DEPENDENCIES
+= openssl
40 HOSTAPD_LIBS
+= $(if
$(BR2_STATIC_LIBS
),-lcrypto
-lz
)
41 HOSTAPD_CONFIG_EDITS
+= 's/\#\(CONFIG_TLS=openssl\)/\1/'
43 HOSTAPD_CONFIG_DISABLE
+= CONFIG_EAP_PWD
44 HOSTAPD_CONFIG_EDITS
+= 's/\#\(CONFIG_TLS=\).*/\1internal/'
47 ifeq ($(BR2_PACKAGE_HOSTAPD_ACS
),y
)
48 HOSTAPD_CONFIG_ENABLE
+= CONFIG_ACS
51 ifeq ($(BR2_PACKAGE_HOSTAPD_EAP
),y
)
52 HOSTAPD_CONFIG_ENABLE
+= \
54 CONFIG_RADIUS_SERVER \
56 # Enable both TLS v1.1 (CONFIG_TLSV11) and v1.2 (CONFIG_TLSV12)
57 HOSTAPD_CONFIG_ENABLE
+= CONFIG_TLSV1
59 HOSTAPD_CONFIG_DISABLE
+= CONFIG_EAP
60 HOSTAPD_CONFIG_ENABLE
+= \
61 CONFIG_NO_ACCOUNTING \
65 ifeq ($(BR2_PACKAGE_HOSTAPD_WPS
),y
)
66 HOSTAPD_CONFIG_ENABLE
+= CONFIG_WPS
69 define HOSTAPD_CONFIGURE_CMDS
70 cp
$(@D
)/hostapd
/defconfig
$(HOSTAPD_CONFIG
)
71 sed
-i
$(patsubst %,-e
's/^#\(%\)/\1/',$(HOSTAPD_CONFIG_ENABLE
)) \
72 $(patsubst %,-e
's/^\(%\)/#\1/',$(HOSTAPD_CONFIG_DISABLE
)) \
73 $(patsubst %,-e
'1i%=y',$(HOSTAPD_CONFIG_SET
)) \
74 $(patsubst %,-e
%,$(HOSTAPD_CONFIG_EDITS
)) \
78 define HOSTAPD_BUILD_CMDS
79 $(TARGET_MAKE_ENV
) CFLAGS
="$(HOSTAPD_CFLAGS)" \
80 LDFLAGS
="$(TARGET_LDFLAGS)" LIBS
="$(HOSTAPD_LIBS)" \
81 $(MAKE
) CC
="$(TARGET_CC)" -C
$(@D
)/$(HOSTAPD_SUBDIR
)
84 define HOSTAPD_INSTALL_TARGET_CMDS
85 $(INSTALL
) -m
0755 -D
$(@D
)/$(HOSTAPD_SUBDIR
)/hostapd \
86 $(TARGET_DIR
)/usr
/sbin
/hostapd
87 $(INSTALL
) -m
0755 -D
$(@D
)/$(HOSTAPD_SUBDIR
)/hostapd_cli \
88 $(TARGET_DIR
)/usr
/bin
/hostapd_cli
89 $(INSTALL
) -m
0644 -D
$(@D
)/$(HOSTAPD_SUBDIR
)/hostapd.conf \
90 $(TARGET_DIR
)/etc
/hostapd.conf
93 $(eval
$(generic-package
))