Home | History | Annotate | Line # | Download | only in hostapd
Android.mk revision 1.1.1.5
      1  1.1.1.2  christos # Copyright (C) 2008 The Android Open Source Project
      2  1.1.1.2  christos #
      3  1.1.1.2  christos # This software may be distributed under the terms of the BSD license.
      4  1.1.1.2  christos # See README for more details.
      5  1.1.1.2  christos #
      6  1.1.1.2  christos 
      7      1.1  christos LOCAL_PATH := $(call my-dir)
      8      1.1  christos 
      9      1.1  christos WPA_BUILD_HOSTAPD := false
     10  1.1.1.2  christos ifneq ($(BOARD_HOSTAPD_DRIVER),)
     11  1.1.1.2  christos   WPA_BUILD_HOSTAPD := true
     12  1.1.1.2  christos   CONFIG_DRIVER_$(BOARD_HOSTAPD_DRIVER) := y
     13      1.1  christos endif
     14      1.1  christos 
     15  1.1.1.2  christos ifeq ($(WPA_BUILD_HOSTAPD),true)
     16  1.1.1.2  christos 
     17  1.1.1.2  christos include $(LOCAL_PATH)/android.config
     18      1.1  christos 
     19      1.1  christos # To ignore possible wrong network configurations
     20      1.1  christos L_CFLAGS = -DWPA_IGNORE_CONFIG_ERRORS
     21      1.1  christos 
     22  1.1.1.2  christos L_CFLAGS += -DVERSION_STR_POSTFIX=\"-$(PLATFORM_VERSION)\"
     23  1.1.1.2  christos 
     24      1.1  christos # Set Android log name
     25      1.1  christos L_CFLAGS += -DANDROID_LOG_NAME=\"hostapd\"
     26      1.1  christos 
     27  1.1.1.3  christos # Disable unused parameter warnings
     28  1.1.1.3  christos L_CFLAGS += -Wno-unused-parameter
     29  1.1.1.3  christos 
     30  1.1.1.3  christos # Set Android extended P2P functionality
     31  1.1.1.3  christos L_CFLAGS += -DANDROID_P2P
     32  1.1.1.5  christos 
     33  1.1.1.3  christos ifeq ($(BOARD_HOSTAPD_PRIVATE_LIB),)
     34  1.1.1.5  christos L_CFLAGS += -DANDROID_LIB_STUB
     35  1.1.1.3  christos endif
     36  1.1.1.3  christos 
     37  1.1.1.3  christos # Use Android specific directory for control interface sockets
     38  1.1.1.3  christos L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/misc/wifi/sockets\"
     39  1.1.1.3  christos L_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/system/hostapd\"
     40  1.1.1.3  christos 
     41      1.1  christos # To force sizeof(enum) = 4
     42      1.1  christos ifeq ($(TARGET_ARCH),arm)
     43      1.1  christos L_CFLAGS += -mabi=aapcs-linux
     44      1.1  christos endif
     45      1.1  christos 
     46      1.1  christos INCLUDES = $(LOCAL_PATH)
     47      1.1  christos INCLUDES += $(LOCAL_PATH)/src
     48      1.1  christos INCLUDES += $(LOCAL_PATH)/src/utils
     49  1.1.1.3  christos INCLUDES += system/security/keystore/include
     50      1.1  christos ifdef CONFIG_DRIVER_NL80211
     51  1.1.1.3  christos ifneq ($(wildcard external/libnl),)
     52  1.1.1.3  christos INCLUDES += external/libnl/include
     53  1.1.1.3  christos else
     54      1.1  christos INCLUDES += external/libnl-headers
     55      1.1  christos endif
     56  1.1.1.3  christos endif
     57      1.1  christos 
     58      1.1  christos 
     59      1.1  christos ifndef CONFIG_OS
     60      1.1  christos ifdef CONFIG_NATIVE_WINDOWS
     61      1.1  christos CONFIG_OS=win32
     62      1.1  christos else
     63      1.1  christos CONFIG_OS=unix
     64      1.1  christos endif
     65      1.1  christos endif
     66      1.1  christos 
     67      1.1  christos ifeq ($(CONFIG_OS), internal)
     68      1.1  christos L_CFLAGS += -DOS_NO_C_LIB_DEFINES
     69      1.1  christos endif
     70      1.1  christos 
     71      1.1  christos ifdef CONFIG_NATIVE_WINDOWS
     72      1.1  christos L_CFLAGS += -DCONFIG_NATIVE_WINDOWS
     73      1.1  christos LIBS += -lws2_32
     74      1.1  christos endif
     75      1.1  christos 
     76      1.1  christos OBJS = main.c
     77      1.1  christos OBJS += config_file.c
     78      1.1  christos 
     79      1.1  christos OBJS += src/ap/hostapd.c
     80      1.1  christos OBJS += src/ap/wpa_auth_glue.c
     81      1.1  christos OBJS += src/ap/drv_callbacks.c
     82      1.1  christos OBJS += src/ap/ap_drv_ops.c
     83      1.1  christos OBJS += src/ap/utils.c
     84      1.1  christos OBJS += src/ap/authsrv.c
     85      1.1  christos OBJS += src/ap/ieee802_1x.c
     86      1.1  christos OBJS += src/ap/ap_config.c
     87  1.1.1.2  christos OBJS += src/ap/eap_user_db.c
     88      1.1  christos OBJS += src/ap/ieee802_11_auth.c
     89      1.1  christos OBJS += src/ap/sta_info.c
     90      1.1  christos OBJS += src/ap/wpa_auth.c
     91      1.1  christos OBJS += src/ap/tkip_countermeasures.c
     92      1.1  christos OBJS += src/ap/ap_mlme.c
     93      1.1  christos OBJS += src/ap/wpa_auth_ie.c
     94      1.1  christos OBJS += src/ap/preauth_auth.c
     95      1.1  christos OBJS += src/ap/pmksa_cache_auth.c
     96      1.1  christos OBJS += src/ap/ieee802_11_shared.c
     97      1.1  christos OBJS += src/ap/beacon.c
     98  1.1.1.4  christos OBJS += src/ap/bss_load.c
     99  1.1.1.5  christos OBJS += src/ap/neighbor_db.c
    100  1.1.1.5  christos OBJS += src/ap/rrm.c
    101      1.1  christos OBJS_d =
    102      1.1  christos OBJS_p =
    103      1.1  christos LIBS =
    104      1.1  christos LIBS_c =
    105      1.1  christos HOBJS =
    106      1.1  christos LIBS_h =
    107      1.1  christos 
    108      1.1  christos NEED_RC4=y
    109      1.1  christos NEED_AES=y
    110      1.1  christos NEED_MD5=y
    111      1.1  christos NEED_SHA1=y
    112      1.1  christos 
    113      1.1  christos OBJS += src/drivers/drivers.c
    114      1.1  christos L_CFLAGS += -DHOSTAPD
    115      1.1  christos 
    116      1.1  christos ifdef CONFIG_WPA_TRACE
    117      1.1  christos L_CFLAGS += -DWPA_TRACE
    118      1.1  christos OBJS += src/utils/trace.c
    119      1.1  christos HOBJS += src/utils/trace.c
    120      1.1  christos LDFLAGS += -rdynamic
    121      1.1  christos L_CFLAGS += -funwind-tables
    122      1.1  christos ifdef CONFIG_WPA_TRACE_BFD
    123      1.1  christos L_CFLAGS += -DWPA_TRACE_BFD
    124      1.1  christos LIBS += -lbfd
    125      1.1  christos LIBS_c += -lbfd
    126      1.1  christos LIBS_h += -lbfd
    127      1.1  christos endif
    128      1.1  christos endif
    129      1.1  christos 
    130      1.1  christos OBJS += src/utils/eloop.c
    131  1.1.1.5  christos 
    132  1.1.1.5  christos ifdef CONFIG_ELOOP_POLL
    133  1.1.1.5  christos L_CFLAGS += -DCONFIG_ELOOP_POLL
    134  1.1.1.5  christos endif
    135  1.1.1.5  christos 
    136  1.1.1.5  christos ifdef CONFIG_ELOOP_EPOLL
    137  1.1.1.5  christos L_CFLAGS += -DCONFIG_ELOOP_EPOLL
    138  1.1.1.5  christos endif
    139  1.1.1.5  christos 
    140      1.1  christos OBJS += src/utils/common.c
    141      1.1  christos OBJS += src/utils/wpa_debug.c
    142      1.1  christos OBJS += src/utils/wpabuf.c
    143      1.1  christos OBJS += src/utils/os_$(CONFIG_OS).c
    144      1.1  christos OBJS += src/utils/ip_addr.c
    145      1.1  christos 
    146      1.1  christos OBJS += src/common/ieee802_11_common.c
    147      1.1  christos OBJS += src/common/wpa_common.c
    148  1.1.1.4  christos OBJS += src/common/hw_features_common.c
    149      1.1  christos 
    150      1.1  christos OBJS += src/eapol_auth/eapol_auth_sm.c
    151      1.1  christos 
    152      1.1  christos 
    153      1.1  christos ifndef CONFIG_NO_DUMP_STATE
    154  1.1.1.3  christos # define HOSTAPD_DUMP_STATE to include support for dumping internal state
    155  1.1.1.3  christos # through control interface commands (undefine it, if you want to save in
    156  1.1.1.3  christos # binary size)
    157      1.1  christos L_CFLAGS += -DHOSTAPD_DUMP_STATE
    158      1.1  christos OBJS += src/eapol_auth/eapol_auth_dump.c
    159      1.1  christos endif
    160      1.1  christos 
    161      1.1  christos ifdef CONFIG_NO_RADIUS
    162      1.1  christos L_CFLAGS += -DCONFIG_NO_RADIUS
    163      1.1  christos CONFIG_NO_ACCOUNTING=y
    164      1.1  christos else
    165      1.1  christos OBJS += src/radius/radius.c
    166      1.1  christos OBJS += src/radius/radius_client.c
    167  1.1.1.3  christos OBJS += src/radius/radius_das.c
    168      1.1  christos endif
    169      1.1  christos 
    170      1.1  christos ifdef CONFIG_NO_ACCOUNTING
    171      1.1  christos L_CFLAGS += -DCONFIG_NO_ACCOUNTING
    172      1.1  christos else
    173      1.1  christos OBJS += src/ap/accounting.c
    174      1.1  christos endif
    175      1.1  christos 
    176      1.1  christos ifdef CONFIG_NO_VLAN
    177      1.1  christos L_CFLAGS += -DCONFIG_NO_VLAN
    178      1.1  christos else
    179      1.1  christos OBJS += src/ap/vlan_init.c
    180  1.1.1.5  christos OBJS += src/ap/vlan_ifconfig.c
    181  1.1.1.5  christos OBJS += src/ap/vlan.c
    182  1.1.1.2  christos ifdef CONFIG_FULL_DYNAMIC_VLAN
    183  1.1.1.5  christos # Define CONFIG_FULL_DYNAMIC_VLAN to have hostapd manipulate bridges
    184  1.1.1.5  christos # and VLAN interfaces for the VLAN feature.
    185  1.1.1.5  christos L_CFLAGS += -DCONFIG_FULL_DYNAMIC_VLAN
    186  1.1.1.5  christos OBJS += src/ap/vlan_full.c
    187  1.1.1.5  christos ifdef CONFIG_VLAN_NETLINK
    188  1.1.1.2  christos OBJS += src/ap/vlan_util.c
    189  1.1.1.5  christos else
    190  1.1.1.5  christos OBJS += src/ap/vlan_ioctl.c
    191  1.1.1.2  christos endif
    192  1.1.1.2  christos endif
    193      1.1  christos endif
    194      1.1  christos 
    195      1.1  christos ifdef CONFIG_NO_CTRL_IFACE
    196      1.1  christos L_CFLAGS += -DCONFIG_NO_CTRL_IFACE
    197      1.1  christos else
    198  1.1.1.5  christos OBJS += src/common/ctrl_iface_common.c
    199      1.1  christos OBJS += ctrl_iface.c
    200      1.1  christos OBJS += src/ap/ctrl_iface_ap.c
    201      1.1  christos endif
    202      1.1  christos 
    203      1.1  christos L_CFLAGS += -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX
    204      1.1  christos 
    205      1.1  christos ifdef CONFIG_IAPP
    206      1.1  christos L_CFLAGS += -DCONFIG_IAPP
    207      1.1  christos OBJS += src/ap/iapp.c
    208      1.1  christos endif
    209      1.1  christos 
    210      1.1  christos ifdef CONFIG_RSN_PREAUTH
    211      1.1  christos L_CFLAGS += -DCONFIG_RSN_PREAUTH
    212      1.1  christos CONFIG_L2_PACKET=y
    213      1.1  christos endif
    214      1.1  christos 
    215      1.1  christos ifdef CONFIG_PEERKEY
    216      1.1  christos L_CFLAGS += -DCONFIG_PEERKEY
    217      1.1  christos OBJS += src/ap/peerkey_auth.c
    218      1.1  christos endif
    219      1.1  christos 
    220  1.1.1.3  christos ifdef CONFIG_HS20
    221  1.1.1.3  christos NEED_AES_OMAC1=y
    222  1.1.1.4  christos CONFIG_PROXYARP=y
    223  1.1.1.4  christos endif
    224  1.1.1.4  christos 
    225  1.1.1.4  christos ifdef CONFIG_PROXYARP
    226  1.1.1.4  christos CONFIG_L2_PACKET=y
    227  1.1.1.4  christos endif
    228  1.1.1.4  christos 
    229  1.1.1.4  christos ifdef CONFIG_SUITEB
    230  1.1.1.4  christos L_CFLAGS += -DCONFIG_SUITEB
    231  1.1.1.4  christos NEED_SHA256=y
    232  1.1.1.4  christos NEED_AES_OMAC1=y
    233  1.1.1.4  christos endif
    234  1.1.1.4  christos 
    235  1.1.1.4  christos ifdef CONFIG_SUITEB192
    236  1.1.1.4  christos L_CFLAGS += -DCONFIG_SUITEB192
    237  1.1.1.4  christos NEED_SHA384=y
    238  1.1.1.3  christos endif
    239  1.1.1.3  christos 
    240      1.1  christos ifdef CONFIG_IEEE80211W
    241      1.1  christos L_CFLAGS += -DCONFIG_IEEE80211W
    242      1.1  christos NEED_SHA256=y
    243      1.1  christos NEED_AES_OMAC1=y
    244      1.1  christos endif
    245      1.1  christos 
    246      1.1  christos ifdef CONFIG_IEEE80211R
    247      1.1  christos L_CFLAGS += -DCONFIG_IEEE80211R
    248      1.1  christos OBJS += src/ap/wpa_auth_ft.c
    249      1.1  christos NEED_SHA256=y
    250      1.1  christos NEED_AES_OMAC1=y
    251      1.1  christos NEED_AES_UNWRAP=y
    252      1.1  christos endif
    253      1.1  christos 
    254  1.1.1.2  christos ifdef CONFIG_SAE
    255  1.1.1.2  christos L_CFLAGS += -DCONFIG_SAE
    256  1.1.1.3  christos OBJS += src/common/sae.c
    257  1.1.1.3  christos NEED_ECC=y
    258  1.1.1.3  christos NEED_DH_GROUPS=y
    259  1.1.1.3  christos endif
    260  1.1.1.3  christos 
    261  1.1.1.3  christos ifdef CONFIG_WNM
    262  1.1.1.3  christos L_CFLAGS += -DCONFIG_WNM
    263  1.1.1.3  christos OBJS += src/ap/wnm_ap.c
    264  1.1.1.2  christos endif
    265  1.1.1.2  christos 
    266      1.1  christos ifdef CONFIG_IEEE80211N
    267      1.1  christos L_CFLAGS += -DCONFIG_IEEE80211N
    268      1.1  christos endif
    269      1.1  christos 
    270  1.1.1.3  christos ifdef CONFIG_IEEE80211AC
    271  1.1.1.3  christos L_CFLAGS += -DCONFIG_IEEE80211AC
    272  1.1.1.3  christos endif
    273  1.1.1.3  christos 
    274  1.1.1.5  christos ifdef CONFIG_MBO
    275  1.1.1.5  christos L_CFLAGS += -DCONFIG_MBO
    276  1.1.1.5  christos OBJS += src/ap/mbo_ap.c
    277  1.1.1.5  christos endif
    278  1.1.1.5  christos 
    279  1.1.1.5  christos ifdef CONFIG_FST
    280  1.1.1.5  christos L_CFLAGS += -DCONFIG_FST
    281  1.1.1.5  christos OBJS += src/fst/fst.c
    282  1.1.1.5  christos OBJS += src/fst/fst_group.c
    283  1.1.1.5  christos OBJS += src/fst/fst_iface.c
    284  1.1.1.5  christos OBJS += src/fst/fst_session.c
    285  1.1.1.5  christos OBJS += src/fst/fst_ctrl_aux.c
    286  1.1.1.5  christos ifdef CONFIG_FST_TEST
    287  1.1.1.5  christos L_CFLAGS += -DCONFIG_FST_TEST
    288  1.1.1.5  christos endif
    289  1.1.1.5  christos ifndef CONFIG_NO_CTRL_IFACE
    290  1.1.1.5  christos OBJS += src/fst/fst_ctrl_iface.c
    291  1.1.1.5  christos endif
    292  1.1.1.5  christos endif
    293  1.1.1.5  christos 
    294  1.1.1.5  christos 
    295      1.1  christos include $(LOCAL_PATH)/src/drivers/drivers.mk
    296      1.1  christos 
    297      1.1  christos OBJS += $(DRV_AP_OBJS)
    298      1.1  christos L_CFLAGS += $(DRV_AP_CFLAGS)
    299      1.1  christos LDFLAGS += $(DRV_AP_LDFLAGS)
    300      1.1  christos LIBS += $(DRV_AP_LIBS)
    301      1.1  christos 
    302      1.1  christos ifdef CONFIG_L2_PACKET
    303      1.1  christos ifdef CONFIG_DNET_PCAP
    304      1.1  christos ifdef CONFIG_L2_FREEBSD
    305      1.1  christos LIBS += -lpcap
    306      1.1  christos OBJS += src/l2_packet/l2_packet_freebsd.c
    307      1.1  christos else
    308      1.1  christos LIBS += -ldnet -lpcap
    309      1.1  christos OBJS += src/l2_packet/l2_packet_pcap.c
    310      1.1  christos endif
    311      1.1  christos else
    312      1.1  christos OBJS += src/l2_packet/l2_packet_linux.c
    313      1.1  christos endif
    314      1.1  christos else
    315      1.1  christos OBJS += src/l2_packet/l2_packet_none.c
    316      1.1  christos endif
    317      1.1  christos 
    318      1.1  christos 
    319      1.1  christos ifdef CONFIG_EAP_MD5
    320      1.1  christos L_CFLAGS += -DEAP_SERVER_MD5
    321      1.1  christos OBJS += src/eap_server/eap_server_md5.c
    322      1.1  christos CHAP=y
    323      1.1  christos endif
    324      1.1  christos 
    325      1.1  christos ifdef CONFIG_EAP_TLS
    326      1.1  christos L_CFLAGS += -DEAP_SERVER_TLS
    327      1.1  christos OBJS += src/eap_server/eap_server_tls.c
    328      1.1  christos TLS_FUNCS=y
    329      1.1  christos endif
    330      1.1  christos 
    331  1.1.1.3  christos ifdef CONFIG_EAP_UNAUTH_TLS
    332  1.1.1.3  christos L_CFLAGS += -DEAP_SERVER_UNAUTH_TLS
    333  1.1.1.3  christos ifndef CONFIG_EAP_TLS
    334  1.1.1.3  christos OBJS += src/eap_server/eap_server_tls.c
    335  1.1.1.3  christos TLS_FUNCS=y
    336  1.1.1.3  christos endif
    337  1.1.1.3  christos endif
    338  1.1.1.3  christos 
    339      1.1  christos ifdef CONFIG_EAP_PEAP
    340      1.1  christos L_CFLAGS += -DEAP_SERVER_PEAP
    341      1.1  christos OBJS += src/eap_server/eap_server_peap.c
    342      1.1  christos OBJS += src/eap_common/eap_peap_common.c
    343      1.1  christos TLS_FUNCS=y
    344      1.1  christos CONFIG_EAP_MSCHAPV2=y
    345      1.1  christos endif
    346      1.1  christos 
    347      1.1  christos ifdef CONFIG_EAP_TTLS
    348      1.1  christos L_CFLAGS += -DEAP_SERVER_TTLS
    349      1.1  christos OBJS += src/eap_server/eap_server_ttls.c
    350      1.1  christos TLS_FUNCS=y
    351      1.1  christos CHAP=y
    352      1.1  christos endif
    353      1.1  christos 
    354      1.1  christos ifdef CONFIG_EAP_MSCHAPV2
    355      1.1  christos L_CFLAGS += -DEAP_SERVER_MSCHAPV2
    356      1.1  christos OBJS += src/eap_server/eap_server_mschapv2.c
    357      1.1  christos MS_FUNCS=y
    358      1.1  christos endif
    359      1.1  christos 
    360      1.1  christos ifdef CONFIG_EAP_GTC
    361      1.1  christos L_CFLAGS += -DEAP_SERVER_GTC
    362      1.1  christos OBJS += src/eap_server/eap_server_gtc.c
    363      1.1  christos endif
    364      1.1  christos 
    365      1.1  christos ifdef CONFIG_EAP_SIM
    366      1.1  christos L_CFLAGS += -DEAP_SERVER_SIM
    367      1.1  christos OBJS += src/eap_server/eap_server_sim.c
    368      1.1  christos CONFIG_EAP_SIM_COMMON=y
    369      1.1  christos NEED_AES_CBC=y
    370      1.1  christos endif
    371      1.1  christos 
    372      1.1  christos ifdef CONFIG_EAP_AKA
    373      1.1  christos L_CFLAGS += -DEAP_SERVER_AKA
    374      1.1  christos OBJS += src/eap_server/eap_server_aka.c
    375      1.1  christos CONFIG_EAP_SIM_COMMON=y
    376      1.1  christos NEED_SHA256=y
    377      1.1  christos NEED_AES_CBC=y
    378      1.1  christos endif
    379      1.1  christos 
    380      1.1  christos ifdef CONFIG_EAP_AKA_PRIME
    381      1.1  christos L_CFLAGS += -DEAP_SERVER_AKA_PRIME
    382      1.1  christos endif
    383      1.1  christos 
    384      1.1  christos ifdef CONFIG_EAP_SIM_COMMON
    385      1.1  christos OBJS += src/eap_common/eap_sim_common.c
    386      1.1  christos # Example EAP-SIM/AKA interface for GSM/UMTS authentication. This can be
    387      1.1  christos # replaced with another file implementating the interface specified in
    388      1.1  christos # eap_sim_db.h.
    389      1.1  christos OBJS += src/eap_server/eap_sim_db.c
    390      1.1  christos NEED_FIPS186_2_PRF=y
    391      1.1  christos endif
    392      1.1  christos 
    393      1.1  christos ifdef CONFIG_EAP_PAX
    394      1.1  christos L_CFLAGS += -DEAP_SERVER_PAX
    395      1.1  christos OBJS += src/eap_server/eap_server_pax.c src/eap_common/eap_pax_common.c
    396      1.1  christos endif
    397      1.1  christos 
    398      1.1  christos ifdef CONFIG_EAP_PSK
    399      1.1  christos L_CFLAGS += -DEAP_SERVER_PSK
    400      1.1  christos OBJS += src/eap_server/eap_server_psk.c src/eap_common/eap_psk_common.c
    401      1.1  christos NEED_AES_OMAC1=y
    402      1.1  christos NEED_AES_ENCBLOCK=y
    403      1.1  christos NEED_AES_EAX=y
    404      1.1  christos endif
    405      1.1  christos 
    406      1.1  christos ifdef CONFIG_EAP_SAKE
    407      1.1  christos L_CFLAGS += -DEAP_SERVER_SAKE
    408      1.1  christos OBJS += src/eap_server/eap_server_sake.c src/eap_common/eap_sake_common.c
    409      1.1  christos endif
    410      1.1  christos 
    411      1.1  christos ifdef CONFIG_EAP_GPSK
    412      1.1  christos L_CFLAGS += -DEAP_SERVER_GPSK
    413      1.1  christos OBJS += src/eap_server/eap_server_gpsk.c src/eap_common/eap_gpsk_common.c
    414      1.1  christos ifdef CONFIG_EAP_GPSK_SHA256
    415  1.1.1.3  christos L_CFLAGS += -DEAP_GPSK_SHA256
    416      1.1  christos endif
    417      1.1  christos NEED_SHA256=y
    418      1.1  christos NEED_AES_OMAC1=y
    419      1.1  christos endif
    420      1.1  christos 
    421      1.1  christos ifdef CONFIG_EAP_PWD
    422      1.1  christos L_CFLAGS += -DEAP_SERVER_PWD
    423      1.1  christos OBJS += src/eap_server/eap_server_pwd.c src/eap_common/eap_pwd_common.c
    424      1.1  christos NEED_SHA256=y
    425      1.1  christos endif
    426      1.1  christos 
    427  1.1.1.3  christos ifdef CONFIG_EAP_EKE
    428  1.1.1.3  christos L_CFLAGS += -DEAP_SERVER_EKE
    429  1.1.1.3  christos OBJS += src/eap_server/eap_server_eke.c src/eap_common/eap_eke_common.c
    430  1.1.1.3  christos NEED_DH_GROUPS=y
    431  1.1.1.3  christos NEED_DH_GROUPS_ALL=y
    432  1.1.1.3  christos endif
    433  1.1.1.3  christos 
    434      1.1  christos ifdef CONFIG_EAP_VENDOR_TEST
    435      1.1  christos L_CFLAGS += -DEAP_SERVER_VENDOR_TEST
    436      1.1  christos OBJS += src/eap_server/eap_server_vendor_test.c
    437      1.1  christos endif
    438      1.1  christos 
    439      1.1  christos ifdef CONFIG_EAP_FAST
    440      1.1  christos L_CFLAGS += -DEAP_SERVER_FAST
    441      1.1  christos OBJS += src/eap_server/eap_server_fast.c
    442      1.1  christos OBJS += src/eap_common/eap_fast_common.c
    443      1.1  christos TLS_FUNCS=y
    444      1.1  christos NEED_T_PRF=y
    445      1.1  christos NEED_AES_UNWRAP=y
    446      1.1  christos endif
    447      1.1  christos 
    448      1.1  christos ifdef CONFIG_WPS
    449      1.1  christos L_CFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC
    450      1.1  christos OBJS += src/utils/uuid.c
    451      1.1  christos OBJS += src/ap/wps_hostapd.c
    452      1.1  christos OBJS += src/eap_server/eap_server_wsc.c src/eap_common/eap_wsc_common.c
    453      1.1  christos OBJS += src/wps/wps.c
    454      1.1  christos OBJS += src/wps/wps_common.c
    455      1.1  christos OBJS += src/wps/wps_attr_parse.c
    456      1.1  christos OBJS += src/wps/wps_attr_build.c
    457      1.1  christos OBJS += src/wps/wps_attr_process.c
    458      1.1  christos OBJS += src/wps/wps_dev_attr.c
    459      1.1  christos OBJS += src/wps/wps_enrollee.c
    460      1.1  christos OBJS += src/wps/wps_registrar.c
    461      1.1  christos NEED_DH_GROUPS=y
    462      1.1  christos NEED_SHA256=y
    463      1.1  christos NEED_BASE64=y
    464      1.1  christos NEED_AES_CBC=y
    465      1.1  christos NEED_MODEXP=y
    466      1.1  christos CONFIG_EAP=y
    467      1.1  christos 
    468      1.1  christos ifdef CONFIG_WPS_NFC
    469      1.1  christos L_CFLAGS += -DCONFIG_WPS_NFC
    470      1.1  christos OBJS += src/wps/ndef.c
    471      1.1  christos NEED_WPS_OOB=y
    472      1.1  christos endif
    473      1.1  christos 
    474      1.1  christos ifdef NEED_WPS_OOB
    475      1.1  christos L_CFLAGS += -DCONFIG_WPS_OOB
    476      1.1  christos endif
    477      1.1  christos 
    478      1.1  christos ifdef CONFIG_WPS_UPNP
    479      1.1  christos L_CFLAGS += -DCONFIG_WPS_UPNP
    480      1.1  christos OBJS += src/wps/wps_upnp.c
    481      1.1  christos OBJS += src/wps/wps_upnp_ssdp.c
    482      1.1  christos OBJS += src/wps/wps_upnp_web.c
    483      1.1  christos OBJS += src/wps/wps_upnp_event.c
    484      1.1  christos OBJS += src/wps/wps_upnp_ap.c
    485      1.1  christos OBJS += src/wps/upnp_xml.c
    486      1.1  christos OBJS += src/wps/httpread.c
    487      1.1  christos OBJS += src/wps/http_client.c
    488      1.1  christos OBJS += src/wps/http_server.c
    489      1.1  christos endif
    490      1.1  christos 
    491      1.1  christos ifdef CONFIG_WPS_STRICT
    492      1.1  christos L_CFLAGS += -DCONFIG_WPS_STRICT
    493      1.1  christos OBJS += src/wps/wps_validate.c
    494      1.1  christos endif
    495      1.1  christos 
    496      1.1  christos ifdef CONFIG_WPS_TESTING
    497      1.1  christos L_CFLAGS += -DCONFIG_WPS_TESTING
    498      1.1  christos endif
    499      1.1  christos 
    500      1.1  christos endif
    501      1.1  christos 
    502      1.1  christos ifdef CONFIG_EAP_IKEV2
    503      1.1  christos L_CFLAGS += -DEAP_SERVER_IKEV2
    504      1.1  christos OBJS += src/eap_server/eap_server_ikev2.c src/eap_server/ikev2.c
    505      1.1  christos OBJS += src/eap_common/eap_ikev2_common.c src/eap_common/ikev2_common.c
    506      1.1  christos NEED_DH_GROUPS=y
    507      1.1  christos NEED_DH_GROUPS_ALL=y
    508      1.1  christos NEED_MODEXP=y
    509      1.1  christos NEED_CIPHER=y
    510      1.1  christos endif
    511      1.1  christos 
    512      1.1  christos ifdef CONFIG_EAP_TNC
    513      1.1  christos L_CFLAGS += -DEAP_SERVER_TNC
    514      1.1  christos OBJS += src/eap_server/eap_server_tnc.c
    515      1.1  christos OBJS += src/eap_server/tncs.c
    516      1.1  christos NEED_BASE64=y
    517      1.1  christos ifndef CONFIG_DRIVER_BSD
    518      1.1  christos LIBS += -ldl
    519      1.1  christos endif
    520      1.1  christos endif
    521      1.1  christos 
    522      1.1  christos # Basic EAP functionality is needed for EAPOL
    523      1.1  christos OBJS += eap_register.c
    524      1.1  christos OBJS += src/eap_server/eap_server.c
    525      1.1  christos OBJS += src/eap_common/eap_common.c
    526      1.1  christos OBJS += src/eap_server/eap_server_methods.c
    527      1.1  christos OBJS += src/eap_server/eap_server_identity.c
    528      1.1  christos L_CFLAGS += -DEAP_SERVER_IDENTITY
    529      1.1  christos 
    530      1.1  christos ifdef CONFIG_EAP
    531      1.1  christos L_CFLAGS += -DEAP_SERVER
    532      1.1  christos endif
    533      1.1  christos 
    534      1.1  christos ifdef CONFIG_PKCS12
    535      1.1  christos L_CFLAGS += -DPKCS12_FUNCS
    536      1.1  christos endif
    537      1.1  christos 
    538      1.1  christos ifdef MS_FUNCS
    539      1.1  christos OBJS += src/crypto/ms_funcs.c
    540      1.1  christos NEED_DES=y
    541      1.1  christos NEED_MD4=y
    542      1.1  christos endif
    543      1.1  christos 
    544      1.1  christos ifdef CHAP
    545      1.1  christos OBJS += src/eap_common/chap.c
    546      1.1  christos endif
    547      1.1  christos 
    548      1.1  christos ifdef TLS_FUNCS
    549      1.1  christos NEED_DES=y
    550      1.1  christos # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS)
    551      1.1  christos L_CFLAGS += -DEAP_TLS_FUNCS
    552      1.1  christos OBJS += src/eap_server/eap_server_tls_common.c
    553      1.1  christos NEED_TLS_PRF=y
    554      1.1  christos endif
    555      1.1  christos 
    556      1.1  christos ifndef CONFIG_TLS
    557      1.1  christos CONFIG_TLS=openssl
    558      1.1  christos endif
    559      1.1  christos 
    560  1.1.1.3  christos ifdef CONFIG_TLSV11
    561  1.1.1.3  christos L_CFLAGS += -DCONFIG_TLSV11
    562  1.1.1.3  christos endif
    563  1.1.1.3  christos 
    564  1.1.1.3  christos ifdef CONFIG_TLSV12
    565  1.1.1.3  christos L_CFLAGS += -DCONFIG_TLSV12
    566  1.1.1.3  christos NEED_SHA256=y
    567  1.1.1.3  christos endif
    568  1.1.1.3  christos 
    569      1.1  christos ifeq ($(CONFIG_TLS), openssl)
    570      1.1  christos ifdef TLS_FUNCS
    571      1.1  christos OBJS += src/crypto/tls_openssl.c
    572  1.1.1.5  christos OBJS += src/crypto/tls_openssl_ocsp.c
    573      1.1  christos LIBS += -lssl
    574      1.1  christos endif
    575      1.1  christos OBJS += src/crypto/crypto_openssl.c
    576      1.1  christos HOBJS += src/crypto/crypto_openssl.c
    577      1.1  christos ifdef NEED_FIPS186_2_PRF
    578      1.1  christos OBJS += src/crypto/fips_prf_openssl.c
    579      1.1  christos endif
    580  1.1.1.5  christos NEED_SHA256=y
    581  1.1.1.5  christos NEED_TLS_PRF_SHA256=y
    582      1.1  christos LIBS += -lcrypto
    583      1.1  christos LIBS_h += -lcrypto
    584      1.1  christos endif
    585      1.1  christos 
    586      1.1  christos ifeq ($(CONFIG_TLS), gnutls)
    587      1.1  christos ifdef TLS_FUNCS
    588      1.1  christos OBJS += src/crypto/tls_gnutls.c
    589      1.1  christos LIBS += -lgnutls -lgpg-error
    590      1.1  christos endif
    591      1.1  christos OBJS += src/crypto/crypto_gnutls.c
    592      1.1  christos HOBJS += src/crypto/crypto_gnutls.c
    593      1.1  christos ifdef NEED_FIPS186_2_PRF
    594  1.1.1.3  christos OBJS += src/crypto/fips_prf_internal.c
    595  1.1.1.3  christos OBJS += src/crypto/sha1-internal.c
    596      1.1  christos endif
    597      1.1  christos LIBS += -lgcrypt
    598      1.1  christos LIBS_h += -lgcrypt
    599      1.1  christos CONFIG_INTERNAL_SHA256=y
    600      1.1  christos CONFIG_INTERNAL_RC4=y
    601      1.1  christos CONFIG_INTERNAL_DH_GROUP5=y
    602      1.1  christos endif
    603      1.1  christos 
    604      1.1  christos ifeq ($(CONFIG_TLS), internal)
    605      1.1  christos ifndef CONFIG_CRYPTO
    606      1.1  christos CONFIG_CRYPTO=internal
    607      1.1  christos endif
    608      1.1  christos ifdef TLS_FUNCS
    609      1.1  christos OBJS += src/crypto/crypto_internal-rsa.c
    610      1.1  christos OBJS += src/crypto/tls_internal.c
    611      1.1  christos OBJS += src/tls/tlsv1_common.c
    612      1.1  christos OBJS += src/tls/tlsv1_record.c
    613      1.1  christos OBJS += src/tls/tlsv1_cred.c
    614      1.1  christos OBJS += src/tls/tlsv1_server.c
    615      1.1  christos OBJS += src/tls/tlsv1_server_write.c
    616      1.1  christos OBJS += src/tls/tlsv1_server_read.c
    617      1.1  christos OBJS += src/tls/asn1.c
    618      1.1  christos OBJS += src/tls/rsa.c
    619      1.1  christos OBJS += src/tls/x509v3.c
    620      1.1  christos OBJS += src/tls/pkcs1.c
    621      1.1  christos OBJS += src/tls/pkcs5.c
    622      1.1  christos OBJS += src/tls/pkcs8.c
    623      1.1  christos NEED_SHA256=y
    624      1.1  christos NEED_BASE64=y
    625      1.1  christos NEED_TLS_PRF=y
    626  1.1.1.3  christos ifdef CONFIG_TLSV12
    627  1.1.1.3  christos NEED_TLS_PRF_SHA256=y
    628  1.1.1.3  christos endif
    629      1.1  christos NEED_MODEXP=y
    630      1.1  christos NEED_CIPHER=y
    631      1.1  christos L_CFLAGS += -DCONFIG_TLS_INTERNAL
    632      1.1  christos L_CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER
    633      1.1  christos endif
    634      1.1  christos ifdef NEED_CIPHER
    635      1.1  christos NEED_DES=y
    636      1.1  christos OBJS += src/crypto/crypto_internal-cipher.c
    637      1.1  christos endif
    638      1.1  christos ifdef NEED_MODEXP
    639      1.1  christos OBJS += src/crypto/crypto_internal-modexp.c
    640      1.1  christos OBJS += src/tls/bignum.c
    641      1.1  christos endif
    642      1.1  christos ifeq ($(CONFIG_CRYPTO), libtomcrypt)
    643      1.1  christos OBJS += src/crypto/crypto_libtomcrypt.c
    644      1.1  christos LIBS += -ltomcrypt -ltfm
    645      1.1  christos LIBS_h += -ltomcrypt -ltfm
    646      1.1  christos CONFIG_INTERNAL_SHA256=y
    647      1.1  christos CONFIG_INTERNAL_RC4=y
    648      1.1  christos CONFIG_INTERNAL_DH_GROUP5=y
    649      1.1  christos endif
    650      1.1  christos ifeq ($(CONFIG_CRYPTO), internal)
    651      1.1  christos OBJS += src/crypto/crypto_internal.c
    652      1.1  christos NEED_AES_DEC=y
    653      1.1  christos L_CFLAGS += -DCONFIG_CRYPTO_INTERNAL
    654      1.1  christos ifdef CONFIG_INTERNAL_LIBTOMMATH
    655      1.1  christos L_CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH
    656      1.1  christos ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST
    657      1.1  christos L_CFLAGS += -DLTM_FAST
    658      1.1  christos endif
    659      1.1  christos else
    660      1.1  christos LIBS += -ltommath
    661      1.1  christos LIBS_h += -ltommath
    662      1.1  christos endif
    663      1.1  christos CONFIG_INTERNAL_AES=y
    664      1.1  christos CONFIG_INTERNAL_DES=y
    665      1.1  christos CONFIG_INTERNAL_SHA1=y
    666      1.1  christos CONFIG_INTERNAL_MD4=y
    667      1.1  christos CONFIG_INTERNAL_MD5=y
    668      1.1  christos CONFIG_INTERNAL_SHA256=y
    669  1.1.1.5  christos CONFIG_INTERNAL_SHA384=y
    670  1.1.1.5  christos CONFIG_INTERNAL_SHA512=y
    671      1.1  christos CONFIG_INTERNAL_RC4=y
    672      1.1  christos CONFIG_INTERNAL_DH_GROUP5=y
    673      1.1  christos endif
    674      1.1  christos ifeq ($(CONFIG_CRYPTO), cryptoapi)
    675      1.1  christos OBJS += src/crypto/crypto_cryptoapi.c
    676      1.1  christos OBJS_p += src/crypto/crypto_cryptoapi.c
    677      1.1  christos L_CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI
    678      1.1  christos CONFIG_INTERNAL_SHA256=y
    679      1.1  christos CONFIG_INTERNAL_RC4=y
    680      1.1  christos endif
    681      1.1  christos endif
    682      1.1  christos 
    683      1.1  christos ifeq ($(CONFIG_TLS), none)
    684      1.1  christos ifdef TLS_FUNCS
    685      1.1  christos OBJS += src/crypto/tls_none.c
    686      1.1  christos L_CFLAGS += -DEAP_TLS_NONE
    687      1.1  christos CONFIG_INTERNAL_AES=y
    688      1.1  christos CONFIG_INTERNAL_SHA1=y
    689      1.1  christos CONFIG_INTERNAL_MD5=y
    690      1.1  christos endif
    691      1.1  christos OBJS += src/crypto/crypto_none.c
    692      1.1  christos OBJS_p += src/crypto/crypto_none.c
    693      1.1  christos CONFIG_INTERNAL_SHA256=y
    694      1.1  christos CONFIG_INTERNAL_RC4=y
    695      1.1  christos endif
    696      1.1  christos 
    697      1.1  christos ifndef TLS_FUNCS
    698      1.1  christos OBJS += src/crypto/tls_none.c
    699      1.1  christos ifeq ($(CONFIG_TLS), internal)
    700      1.1  christos CONFIG_INTERNAL_AES=y
    701      1.1  christos CONFIG_INTERNAL_SHA1=y
    702      1.1  christos CONFIG_INTERNAL_MD5=y
    703      1.1  christos CONFIG_INTERNAL_RC4=y
    704      1.1  christos endif
    705      1.1  christos endif
    706      1.1  christos 
    707      1.1  christos AESOBJS = # none so far
    708      1.1  christos ifdef CONFIG_INTERNAL_AES
    709      1.1  christos AESOBJS += src/crypto/aes-internal.c src/crypto/aes-internal-enc.c
    710      1.1  christos endif
    711      1.1  christos 
    712  1.1.1.4  christos ifneq ($(CONFIG_TLS), openssl)
    713      1.1  christos AESOBJS += src/crypto/aes-wrap.c
    714  1.1.1.4  christos endif
    715      1.1  christos ifdef NEED_AES_EAX
    716      1.1  christos AESOBJS += src/crypto/aes-eax.c
    717      1.1  christos NEED_AES_CTR=y
    718      1.1  christos endif
    719      1.1  christos ifdef NEED_AES_CTR
    720      1.1  christos AESOBJS += src/crypto/aes-ctr.c
    721      1.1  christos endif
    722      1.1  christos ifdef NEED_AES_ENCBLOCK
    723      1.1  christos AESOBJS += src/crypto/aes-encblock.c
    724      1.1  christos endif
    725      1.1  christos ifdef NEED_AES_OMAC1
    726      1.1  christos AESOBJS += src/crypto/aes-omac1.c
    727      1.1  christos endif
    728      1.1  christos ifdef NEED_AES_UNWRAP
    729  1.1.1.4  christos ifneq ($(CONFIG_TLS), openssl)
    730      1.1  christos NEED_AES_DEC=y
    731      1.1  christos AESOBJS += src/crypto/aes-unwrap.c
    732      1.1  christos endif
    733  1.1.1.4  christos endif
    734      1.1  christos ifdef NEED_AES_CBC
    735      1.1  christos NEED_AES_DEC=y
    736  1.1.1.5  christos ifneq ($(CONFIG_TLS), openssl)
    737      1.1  christos AESOBJS += src/crypto/aes-cbc.c
    738      1.1  christos endif
    739  1.1.1.5  christos endif
    740      1.1  christos ifdef NEED_AES_DEC
    741      1.1  christos ifdef CONFIG_INTERNAL_AES
    742      1.1  christos AESOBJS += src/crypto/aes-internal-dec.c
    743      1.1  christos endif
    744      1.1  christos endif
    745      1.1  christos ifdef NEED_AES
    746      1.1  christos OBJS += $(AESOBJS)
    747      1.1  christos endif
    748      1.1  christos 
    749      1.1  christos SHA1OBJS =
    750      1.1  christos ifdef NEED_SHA1
    751  1.1.1.2  christos ifneq ($(CONFIG_TLS), openssl)
    752      1.1  christos SHA1OBJS += src/crypto/sha1.c
    753  1.1.1.2  christos endif
    754  1.1.1.2  christos SHA1OBJS += src/crypto/sha1-prf.c
    755      1.1  christos ifdef CONFIG_INTERNAL_SHA1
    756      1.1  christos SHA1OBJS += src/crypto/sha1-internal.c
    757      1.1  christos ifdef NEED_FIPS186_2_PRF
    758      1.1  christos SHA1OBJS += src/crypto/fips_prf_internal.c
    759      1.1  christos endif
    760      1.1  christos endif
    761  1.1.1.2  christos ifneq ($(CONFIG_TLS), openssl)
    762      1.1  christos SHA1OBJS += src/crypto/sha1-pbkdf2.c
    763  1.1.1.2  christos endif
    764      1.1  christos ifdef NEED_T_PRF
    765      1.1  christos SHA1OBJS += src/crypto/sha1-tprf.c
    766      1.1  christos endif
    767      1.1  christos ifdef NEED_TLS_PRF
    768      1.1  christos SHA1OBJS += src/crypto/sha1-tlsprf.c
    769      1.1  christos endif
    770      1.1  christos endif
    771      1.1  christos 
    772      1.1  christos ifdef NEED_SHA1
    773      1.1  christos OBJS += $(SHA1OBJS)
    774      1.1  christos endif
    775      1.1  christos 
    776  1.1.1.4  christos ifneq ($(CONFIG_TLS), openssl)
    777  1.1.1.4  christos OBJS += src/crypto/md5.c
    778  1.1.1.4  christos endif
    779  1.1.1.4  christos 
    780      1.1  christos ifdef NEED_MD5
    781      1.1  christos ifdef CONFIG_INTERNAL_MD5
    782      1.1  christos OBJS += src/crypto/md5-internal.c
    783      1.1  christos HOBJS += src/crypto/md5-internal.c
    784      1.1  christos endif
    785      1.1  christos endif
    786      1.1  christos 
    787      1.1  christos ifdef NEED_MD4
    788      1.1  christos ifdef CONFIG_INTERNAL_MD4
    789      1.1  christos OBJS += src/crypto/md4-internal.c
    790      1.1  christos endif
    791      1.1  christos endif
    792      1.1  christos 
    793      1.1  christos ifdef NEED_DES
    794      1.1  christos ifdef CONFIG_INTERNAL_DES
    795      1.1  christos OBJS += src/crypto/des-internal.c
    796      1.1  christos endif
    797      1.1  christos endif
    798      1.1  christos 
    799  1.1.1.5  christos ifdef CONFIG_NO_RC4
    800  1.1.1.5  christos L_CFLAGS += -DCONFIG_NO_RC4
    801  1.1.1.5  christos endif
    802  1.1.1.5  christos 
    803      1.1  christos ifdef NEED_RC4
    804      1.1  christos ifdef CONFIG_INTERNAL_RC4
    805  1.1.1.5  christos ifndef CONFIG_NO_RC4
    806      1.1  christos OBJS += src/crypto/rc4.c
    807      1.1  christos endif
    808      1.1  christos endif
    809  1.1.1.5  christos endif
    810      1.1  christos 
    811      1.1  christos ifdef NEED_SHA256
    812  1.1.1.2  christos L_CFLAGS += -DCONFIG_SHA256
    813  1.1.1.2  christos ifneq ($(CONFIG_TLS), openssl)
    814      1.1  christos OBJS += src/crypto/sha256.c
    815  1.1.1.2  christos endif
    816  1.1.1.2  christos OBJS += src/crypto/sha256-prf.c
    817      1.1  christos ifdef CONFIG_INTERNAL_SHA256
    818      1.1  christos OBJS += src/crypto/sha256-internal.c
    819      1.1  christos endif
    820  1.1.1.2  christos ifdef NEED_TLS_PRF_SHA256
    821  1.1.1.3  christos OBJS += src/crypto/sha256-tlsprf.c
    822  1.1.1.2  christos endif
    823      1.1  christos endif
    824  1.1.1.4  christos ifdef NEED_SHA384
    825  1.1.1.4  christos L_CFLAGS += -DCONFIG_SHA384
    826  1.1.1.5  christos OBJS += src/crypto/sha384-prf.c
    827  1.1.1.5  christos endif
    828  1.1.1.5  christos 
    829  1.1.1.5  christos ifdef CONFIG_INTERNAL_SHA384
    830  1.1.1.5  christos L_CFLAGS += -DCONFIG_INTERNAL_SHA384
    831  1.1.1.5  christos OBJS += src/crypto/sha384-internal.c
    832  1.1.1.5  christos endif
    833  1.1.1.5  christos 
    834  1.1.1.5  christos ifdef CONFIG_INTERNAL_SHA512
    835  1.1.1.5  christos L_CFLAGS += -DCONFIG_INTERNAL_SHA512
    836  1.1.1.5  christos OBJS += src/crypto/sha512-internal.c
    837  1.1.1.4  christos endif
    838      1.1  christos 
    839      1.1  christos ifdef NEED_DH_GROUPS
    840      1.1  christos OBJS += src/crypto/dh_groups.c
    841      1.1  christos endif
    842      1.1  christos ifdef NEED_DH_GROUPS_ALL
    843      1.1  christos L_CFLAGS += -DALL_DH_GROUPS
    844      1.1  christos endif
    845      1.1  christos ifdef CONFIG_INTERNAL_DH_GROUP5
    846      1.1  christos ifdef NEED_DH_GROUPS
    847      1.1  christos OBJS += src/crypto/dh_group5.c
    848      1.1  christos endif
    849      1.1  christos endif
    850      1.1  christos 
    851  1.1.1.3  christos ifdef NEED_ECC
    852  1.1.1.3  christos L_CFLAGS += -DCONFIG_ECC
    853  1.1.1.3  christos endif
    854  1.1.1.3  christos 
    855      1.1  christos ifdef CONFIG_NO_RANDOM_POOL
    856      1.1  christos L_CFLAGS += -DCONFIG_NO_RANDOM_POOL
    857      1.1  christos else
    858      1.1  christos OBJS += src/crypto/random.c
    859      1.1  christos HOBJS += src/crypto/random.c
    860  1.1.1.3  christos HOBJS += src/utils/eloop.c
    861      1.1  christos HOBJS += $(SHA1OBJS)
    862  1.1.1.5  christos ifneq ($(CONFIG_TLS), openssl)
    863      1.1  christos HOBJS += src/crypto/md5.c
    864      1.1  christos endif
    865  1.1.1.5  christos endif
    866      1.1  christos 
    867      1.1  christos ifdef CONFIG_RADIUS_SERVER
    868      1.1  christos L_CFLAGS += -DRADIUS_SERVER
    869      1.1  christos OBJS += src/radius/radius_server.c
    870      1.1  christos endif
    871      1.1  christos 
    872      1.1  christos ifdef CONFIG_IPV6
    873      1.1  christos L_CFLAGS += -DCONFIG_IPV6
    874      1.1  christos endif
    875      1.1  christos 
    876      1.1  christos ifdef CONFIG_DRIVER_RADIUS_ACL
    877      1.1  christos L_CFLAGS += -DCONFIG_DRIVER_RADIUS_ACL
    878      1.1  christos endif
    879      1.1  christos 
    880      1.1  christos ifdef NEED_BASE64
    881      1.1  christos OBJS += src/utils/base64.c
    882      1.1  christos endif
    883      1.1  christos 
    884      1.1  christos ifdef NEED_AP_MLME
    885      1.1  christos OBJS += src/ap/wmm.c
    886      1.1  christos OBJS += src/ap/ap_list.c
    887      1.1  christos OBJS += src/ap/ieee802_11.c
    888      1.1  christos OBJS += src/ap/hw_features.c
    889  1.1.1.3  christos OBJS += src/ap/dfs.c
    890      1.1  christos L_CFLAGS += -DNEED_AP_MLME
    891      1.1  christos endif
    892      1.1  christos ifdef CONFIG_IEEE80211N
    893      1.1  christos OBJS += src/ap/ieee802_11_ht.c
    894      1.1  christos endif
    895      1.1  christos 
    896  1.1.1.3  christos ifdef CONFIG_IEEE80211AC
    897  1.1.1.3  christos OBJS += src/ap/ieee802_11_vht.c
    898  1.1.1.3  christos endif
    899  1.1.1.3  christos 
    900      1.1  christos ifdef CONFIG_P2P_MANAGER
    901      1.1  christos L_CFLAGS += -DCONFIG_P2P_MANAGER
    902      1.1  christos OBJS += src/ap/p2p_hostapd.c
    903      1.1  christos endif
    904      1.1  christos 
    905  1.1.1.3  christos ifdef CONFIG_HS20
    906  1.1.1.3  christos L_CFLAGS += -DCONFIG_HS20
    907  1.1.1.3  christos OBJS += src/ap/hs20.c
    908  1.1.1.3  christos CONFIG_INTERWORKING=y
    909  1.1.1.3  christos endif
    910  1.1.1.3  christos 
    911  1.1.1.3  christos ifdef CONFIG_INTERWORKING
    912  1.1.1.3  christos L_CFLAGS += -DCONFIG_INTERWORKING
    913  1.1.1.3  christos OBJS += src/common/gas.c
    914  1.1.1.3  christos OBJS += src/ap/gas_serv.c
    915  1.1.1.3  christos endif
    916  1.1.1.3  christos 
    917  1.1.1.4  christos ifdef CONFIG_PROXYARP
    918  1.1.1.4  christos L_CFLAGS += -DCONFIG_PROXYARP
    919  1.1.1.4  christos OBJS += src/ap/x_snoop.c
    920  1.1.1.4  christos OBJS += src/ap/dhcp_snoop.c
    921  1.1.1.4  christos ifdef CONFIG_IPV6
    922  1.1.1.4  christos OBJS += src/ap/ndisc_snoop.c
    923  1.1.1.4  christos endif
    924  1.1.1.4  christos endif
    925  1.1.1.4  christos 
    926      1.1  christos OBJS += src/drivers/driver_common.c
    927      1.1  christos 
    928  1.1.1.3  christos ifdef CONFIG_ACS
    929  1.1.1.3  christos L_CFLAGS += -DCONFIG_ACS
    930  1.1.1.3  christos OBJS += src/ap/acs.c
    931  1.1.1.3  christos LIBS += -lm
    932  1.1.1.3  christos endif
    933  1.1.1.3  christos 
    934      1.1  christos ifdef CONFIG_NO_STDOUT_DEBUG
    935      1.1  christos L_CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
    936      1.1  christos endif
    937      1.1  christos 
    938  1.1.1.3  christos ifdef CONFIG_DEBUG_LINUX_TRACING
    939  1.1.1.3  christos L_CFLAGS += -DCONFIG_DEBUG_LINUX_TRACING
    940  1.1.1.3  christos endif
    941  1.1.1.3  christos 
    942      1.1  christos ifdef CONFIG_DEBUG_FILE
    943      1.1  christos L_CFLAGS += -DCONFIG_DEBUG_FILE
    944      1.1  christos endif
    945      1.1  christos 
    946      1.1  christos ifdef CONFIG_ANDROID_LOG
    947      1.1  christos L_CFLAGS += -DCONFIG_ANDROID_LOG
    948      1.1  christos endif
    949      1.1  christos 
    950  1.1.1.5  christos OBJS_c = hostapd_cli.c
    951  1.1.1.5  christos OBJS_c += src/common/wpa_ctrl.c
    952  1.1.1.5  christos OBJS_c += src/utils/os_$(CONFIG_OS).c
    953  1.1.1.5  christos OBJS_c += src/common/cli.c
    954      1.1  christos OBJS_c += src/utils/eloop.c
    955  1.1.1.5  christos OBJS_c += src/utils/common.c
    956      1.1  christos ifdef CONFIG_WPA_TRACE
    957      1.1  christos OBJS_c += src/utils/trace.c
    958      1.1  christos endif
    959      1.1  christos OBJS_c += src/utils/wpa_debug.c
    960      1.1  christos ifdef CONFIG_WPA_CLI_EDIT
    961      1.1  christos OBJS_c += src/utils/edit.c
    962      1.1  christos else
    963      1.1  christos OBJS_c += src/utils/edit_simple.c
    964      1.1  christos endif
    965      1.1  christos 
    966      1.1  christos ########################
    967      1.1  christos 
    968      1.1  christos include $(CLEAR_VARS)
    969      1.1  christos LOCAL_MODULE := hostapd_cli
    970      1.1  christos LOCAL_MODULE_TAGS := debug
    971  1.1.1.3  christos LOCAL_SHARED_LIBRARIES := libc libcutils liblog
    972      1.1  christos LOCAL_CFLAGS := $(L_CFLAGS)
    973      1.1  christos LOCAL_SRC_FILES := $(OBJS_c)
    974      1.1  christos LOCAL_C_INCLUDES := $(INCLUDES)
    975      1.1  christos include $(BUILD_EXECUTABLE)
    976      1.1  christos 
    977      1.1  christos ########################
    978      1.1  christos include $(CLEAR_VARS)
    979      1.1  christos LOCAL_MODULE := hostapd
    980      1.1  christos LOCAL_MODULE_TAGS := optional
    981      1.1  christos ifdef CONFIG_DRIVER_CUSTOM
    982      1.1  christos LOCAL_STATIC_LIBRARIES := libCustomWifi
    983      1.1  christos endif
    984      1.1  christos ifneq ($(BOARD_HOSTAPD_PRIVATE_LIB),)
    985      1.1  christos LOCAL_STATIC_LIBRARIES += $(BOARD_HOSTAPD_PRIVATE_LIB)
    986      1.1  christos endif
    987  1.1.1.3  christos LOCAL_SHARED_LIBRARIES := libc libcutils liblog libcrypto libssl
    988      1.1  christos ifdef CONFIG_DRIVER_NL80211
    989  1.1.1.3  christos ifneq ($(wildcard external/libnl),)
    990  1.1.1.3  christos LOCAL_SHARED_LIBRARIES += libnl
    991  1.1.1.3  christos else
    992      1.1  christos LOCAL_STATIC_LIBRARIES += libnl_2
    993      1.1  christos endif
    994  1.1.1.3  christos endif
    995      1.1  christos LOCAL_CFLAGS := $(L_CFLAGS)
    996      1.1  christos LOCAL_SRC_FILES := $(OBJS)
    997      1.1  christos LOCAL_C_INCLUDES := $(INCLUDES)
    998  1.1.1.5  christos LOCAL_INIT_RC := hostapd.android.rc
    999      1.1  christos include $(BUILD_EXECUTABLE)
   1000      1.1  christos 
   1001      1.1  christos endif # ifeq ($(WPA_BUILD_HOSTAPD),true)
   1002