Home | History | Annotate | Line # | Download | only in wpa_supplicant
Makefile revision 1.1
      1  1.1  christos ifndef CC
      2  1.1  christos CC=gcc
      3  1.1  christos endif
      4  1.1  christos 
      5  1.1  christos ifndef CFLAGS
      6  1.1  christos CFLAGS = -MMD -O2 -Wall -g
      7  1.1  christos endif
      8  1.1  christos 
      9  1.1  christos export LIBDIR ?= /usr/local/lib/
     10  1.1  christos export BINDIR ?= /usr/local/sbin/
     11  1.1  christos 
     12  1.1  christos CFLAGS += -I../src
     13  1.1  christos CFLAGS += -I../src/utils
     14  1.1  christos 
     15  1.1  christos ALL=wpa_supplicant wpa_passphrase wpa_cli
     16  1.1  christos 
     17  1.1  christos all: verify_config $(ALL) dynamic_eap_methods
     18  1.1  christos 
     19  1.1  christos verify_config:
     20  1.1  christos 	@if [ ! -r .config ]; then \
     21  1.1  christos 		echo 'Building wpa_supplicant requires a configuration file'; \
     22  1.1  christos 		echo '(.config). See README for more instructions. You can'; \
     23  1.1  christos 		echo 'run "cp defconfig .config" to create an example'; \
     24  1.1  christos 		echo 'configuration.'; \
     25  1.1  christos 		exit 1; \
     26  1.1  christos 	fi
     27  1.1  christos 
     28  1.1  christos mkconfig:
     29  1.1  christos 	@if [ -f .config ]; then \
     30  1.1  christos 		echo '.config exists - did not replace it'; \
     31  1.1  christos 		exit 1; \
     32  1.1  christos 	fi
     33  1.1  christos 	echo CONFIG_DRIVER_HOSTAP=y >> .config
     34  1.1  christos 	echo CONFIG_DRIVER_WEXT=y >> .config
     35  1.1  christos 
     36  1.1  christos install: all
     37  1.1  christos 	mkdir -p $(DESTDIR)$(BINDIR)
     38  1.1  christos 	for i in $(ALL); do cp $$i $(DESTDIR)$(BINDIR)/$$i; done
     39  1.1  christos 	$(MAKE) -C ../src install
     40  1.1  christos 
     41  1.1  christos OBJS = config.o
     42  1.1  christos OBJS += notify.o
     43  1.1  christos OBJS += bss.o
     44  1.1  christos OBJS += eap_register.o
     45  1.1  christos OBJS += ../src/utils/common.o
     46  1.1  christos OBJS += ../src/utils/wpa_debug.o
     47  1.1  christos OBJS += ../src/utils/wpabuf.o
     48  1.1  christos OBJS_p = wpa_passphrase.o
     49  1.1  christos OBJS_p += ../src/utils/common.o
     50  1.1  christos OBJS_p += ../src/utils/wpa_debug.o
     51  1.1  christos OBJS_p += ../src/utils/wpabuf.o
     52  1.1  christos OBJS_c = wpa_cli.o ../src/common/wpa_ctrl.o
     53  1.1  christos 
     54  1.1  christos -include .config
     55  1.1  christos 
     56  1.1  christos ifndef CONFIG_OS
     57  1.1  christos ifdef CONFIG_NATIVE_WINDOWS
     58  1.1  christos CONFIG_OS=win32
     59  1.1  christos else
     60  1.1  christos CONFIG_OS=unix
     61  1.1  christos endif
     62  1.1  christos endif
     63  1.1  christos 
     64  1.1  christos ifeq ($(CONFIG_OS), internal)
     65  1.1  christos CFLAGS += -DOS_NO_C_LIB_DEFINES
     66  1.1  christos endif
     67  1.1  christos 
     68  1.1  christos OBJS += ../src/utils/os_$(CONFIG_OS).o
     69  1.1  christos OBJS_p += ../src/utils/os_$(CONFIG_OS).o
     70  1.1  christos OBJS_c += ../src/utils/os_$(CONFIG_OS).o
     71  1.1  christos 
     72  1.1  christos ifdef CONFIG_WPA_TRACE
     73  1.1  christos CFLAGS += -DWPA_TRACE
     74  1.1  christos OBJS += ../src/utils/trace.o
     75  1.1  christos OBJS_p += ../src/utils/trace.o
     76  1.1  christos OBJS_c += ../src/utils/trace.o
     77  1.1  christos OBJS_c += ../src/utils/wpa_debug.o
     78  1.1  christos LDFLAGS += -rdynamic
     79  1.1  christos CFLAGS += -funwind-tables
     80  1.1  christos ifdef CONFIG_WPA_TRACE_BFD
     81  1.1  christos CFLAGS += -DWPA_TRACE_BFD
     82  1.1  christos LIBS += -lbfd
     83  1.1  christos LIBS_p += -lbfd
     84  1.1  christos LIBS_c += -lbfd
     85  1.1  christos endif
     86  1.1  christos endif
     87  1.1  christos 
     88  1.1  christos ifndef CONFIG_ELOOP
     89  1.1  christos CONFIG_ELOOP=eloop
     90  1.1  christos endif
     91  1.1  christos OBJS += ../src/utils/$(CONFIG_ELOOP).o
     92  1.1  christos 
     93  1.1  christos 
     94  1.1  christos ifdef CONFIG_EAPOL_TEST
     95  1.1  christos CFLAGS += -Werror -DEAPOL_TEST
     96  1.1  christos endif
     97  1.1  christos 
     98  1.1  christos ifndef CONFIG_BACKEND
     99  1.1  christos CONFIG_BACKEND=file
    100  1.1  christos endif
    101  1.1  christos 
    102  1.1  christos ifeq ($(CONFIG_BACKEND), file)
    103  1.1  christos OBJS += config_file.o
    104  1.1  christos ifndef CONFIG_NO_CONFIG_BLOBS
    105  1.1  christos NEED_BASE64=y
    106  1.1  christos endif
    107  1.1  christos CFLAGS += -DCONFIG_BACKEND_FILE
    108  1.1  christos endif
    109  1.1  christos 
    110  1.1  christos ifeq ($(CONFIG_BACKEND), winreg)
    111  1.1  christos OBJS += config_winreg.o
    112  1.1  christos endif
    113  1.1  christos 
    114  1.1  christos ifeq ($(CONFIG_BACKEND), none)
    115  1.1  christos OBJS += config_none.o
    116  1.1  christos endif
    117  1.1  christos 
    118  1.1  christos ifdef CONFIG_NO_CONFIG_WRITE
    119  1.1  christos CFLAGS += -DCONFIG_NO_CONFIG_WRITE
    120  1.1  christos endif
    121  1.1  christos 
    122  1.1  christos ifdef CONFIG_NO_CONFIG_BLOBS
    123  1.1  christos CFLAGS += -DCONFIG_NO_CONFIG_BLOBS
    124  1.1  christos endif
    125  1.1  christos 
    126  1.1  christos ifdef CONFIG_NO_SCAN_PROCESSING
    127  1.1  christos CFLAGS += -DCONFIG_NO_SCAN_PROCESSING
    128  1.1  christos endif
    129  1.1  christos 
    130  1.1  christos ifdef CONFIG_IEEE80211W
    131  1.1  christos CFLAGS += -DCONFIG_IEEE80211W
    132  1.1  christos NEED_SHA256=y
    133  1.1  christos NEED_AES_OMAC1=y
    134  1.1  christos endif
    135  1.1  christos 
    136  1.1  christos ifdef CONFIG_IEEE80211R
    137  1.1  christos CFLAGS += -DCONFIG_IEEE80211R
    138  1.1  christos OBJS += ../src/rsn_supp/wpa_ft.o
    139  1.1  christos NEED_80211_COMMON=y
    140  1.1  christos NEED_SHA256=y
    141  1.1  christos NEED_AES_OMAC1=y
    142  1.1  christos endif
    143  1.1  christos 
    144  1.1  christos ifdef CONFIG_PEERKEY
    145  1.1  christos CFLAGS += -DCONFIG_PEERKEY
    146  1.1  christos endif
    147  1.1  christos 
    148  1.1  christos ifndef CONFIG_NO_WPA
    149  1.1  christos OBJS += ../src/rsn_supp/wpa.o
    150  1.1  christos OBJS += ../src/rsn_supp/preauth.o
    151  1.1  christos OBJS += ../src/rsn_supp/pmksa_cache.o
    152  1.1  christos OBJS += ../src/rsn_supp/peerkey.o
    153  1.1  christos OBJS += ../src/rsn_supp/wpa_ie.o
    154  1.1  christos OBJS += ../src/common/wpa_common.o
    155  1.1  christos NEED_AES=y
    156  1.1  christos NEED_SHA1=y
    157  1.1  christos NEED_MD5=y
    158  1.1  christos NEED_RC4=y
    159  1.1  christos else
    160  1.1  christos CFLAGS += -DCONFIG_NO_WPA -DCONFIG_NO_WPA2
    161  1.1  christos endif
    162  1.1  christos 
    163  1.1  christos ifdef CONFIG_IBSS_RSN
    164  1.1  christos NEED_RSN_AUTHENTICATOR=y
    165  1.1  christos CFLAGS += -DCONFIG_IBSS_RSN
    166  1.1  christos OBJS += ibss_rsn.o
    167  1.1  christos endif
    168  1.1  christos 
    169  1.1  christos ifdef CONFIG_NO_WPA2
    170  1.1  christos CFLAGS += -DCONFIG_NO_WPA2
    171  1.1  christos endif
    172  1.1  christos 
    173  1.1  christos include ../src/drivers/drivers.mak
    174  1.1  christos ifdef CONFIG_AP
    175  1.1  christos OBJS_d += $(DRV_BOTH_OBJS)
    176  1.1  christos CFLAGS += $(DRV_BOTH_CFLAGS)
    177  1.1  christos LDFLAGS += $(DRV_BOTH_LDFLAGS)
    178  1.1  christos LIBS += $(DRV_BOTH_LIBS)
    179  1.1  christos else
    180  1.1  christos NEED_AP_MLME=
    181  1.1  christos OBJS_d += $(DRV_WPA_OBJS)
    182  1.1  christos CFLAGS += $(DRV_WPA_CFLAGS)
    183  1.1  christos LDFLAGS += $(DRV_WPA_LDFLAGS)
    184  1.1  christos LIBS += $(DRV_WPA_LIBS)
    185  1.1  christos endif
    186  1.1  christos 
    187  1.1  christos ifndef CONFIG_L2_PACKET
    188  1.1  christos CONFIG_L2_PACKET=linux
    189  1.1  christos endif
    190  1.1  christos 
    191  1.1  christos OBJS_l2 += ../src/l2_packet/l2_packet_$(CONFIG_L2_PACKET).o
    192  1.1  christos 
    193  1.1  christos ifeq ($(CONFIG_L2_PACKET), pcap)
    194  1.1  christos ifdef CONFIG_WINPCAP
    195  1.1  christos CFLAGS += -DCONFIG_WINPCAP
    196  1.1  christos LIBS += -lwpcap -lpacket
    197  1.1  christos LIBS_w += -lwpcap
    198  1.1  christos else
    199  1.1  christos LIBS += -ldnet -lpcap
    200  1.1  christos endif
    201  1.1  christos endif
    202  1.1  christos 
    203  1.1  christos ifeq ($(CONFIG_L2_PACKET), winpcap)
    204  1.1  christos LIBS += -lwpcap -lpacket
    205  1.1  christos LIBS_w += -lwpcap
    206  1.1  christos endif
    207  1.1  christos 
    208  1.1  christos ifeq ($(CONFIG_L2_PACKET), freebsd)
    209  1.1  christos LIBS += -lpcap
    210  1.1  christos endif
    211  1.1  christos 
    212  1.1  christos ifdef CONFIG_EAP_TLS
    213  1.1  christos # EAP-TLS
    214  1.1  christos ifeq ($(CONFIG_EAP_TLS), dyn)
    215  1.1  christos CFLAGS += -DEAP_TLS_DYNAMIC
    216  1.1  christos EAPDYN += ../src/eap_peer/eap_tls.so
    217  1.1  christos else
    218  1.1  christos CFLAGS += -DEAP_TLS
    219  1.1  christos OBJS += ../src/eap_peer/eap_tls.o
    220  1.1  christos OBJS_h += ../src/eap_server/eap_server_tls.o
    221  1.1  christos endif
    222  1.1  christos TLS_FUNCS=y
    223  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    224  1.1  christos endif
    225  1.1  christos 
    226  1.1  christos ifdef CONFIG_EAP_PEAP
    227  1.1  christos # EAP-PEAP
    228  1.1  christos ifeq ($(CONFIG_EAP_PEAP), dyn)
    229  1.1  christos CFLAGS += -DEAP_PEAP_DYNAMIC
    230  1.1  christos EAPDYN += ../src/eap_peer/eap_peap.so
    231  1.1  christos else
    232  1.1  christos CFLAGS += -DEAP_PEAP
    233  1.1  christos OBJS += ../src/eap_peer/eap_peap.o
    234  1.1  christos OBJS += ../src/eap_common/eap_peap_common.o
    235  1.1  christos OBJS_h += ../src/eap_server/eap_server_peap.o
    236  1.1  christos endif
    237  1.1  christos TLS_FUNCS=y
    238  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    239  1.1  christos endif
    240  1.1  christos 
    241  1.1  christos ifdef CONFIG_EAP_TTLS
    242  1.1  christos # EAP-TTLS
    243  1.1  christos ifeq ($(CONFIG_EAP_TTLS), dyn)
    244  1.1  christos CFLAGS += -DEAP_TTLS_DYNAMIC
    245  1.1  christos EAPDYN += ../src/eap_peer/eap_ttls.so
    246  1.1  christos else
    247  1.1  christos CFLAGS += -DEAP_TTLS
    248  1.1  christos OBJS += ../src/eap_peer/eap_ttls.o
    249  1.1  christos OBJS_h += ../src/eap_server/eap_server_ttls.o
    250  1.1  christos endif
    251  1.1  christos MS_FUNCS=y
    252  1.1  christos TLS_FUNCS=y
    253  1.1  christos CHAP=y
    254  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    255  1.1  christos endif
    256  1.1  christos 
    257  1.1  christos ifdef CONFIG_EAP_MD5
    258  1.1  christos # EAP-MD5
    259  1.1  christos ifeq ($(CONFIG_EAP_MD5), dyn)
    260  1.1  christos CFLAGS += -DEAP_MD5_DYNAMIC
    261  1.1  christos EAPDYN += ../src/eap_peer/eap_md5.so
    262  1.1  christos else
    263  1.1  christos CFLAGS += -DEAP_MD5
    264  1.1  christos OBJS += ../src/eap_peer/eap_md5.o
    265  1.1  christos OBJS_h += ../src/eap_server/eap_server_md5.o
    266  1.1  christos endif
    267  1.1  christos CHAP=y
    268  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    269  1.1  christos endif
    270  1.1  christos 
    271  1.1  christos # backwards compatibility for old spelling
    272  1.1  christos ifdef CONFIG_MSCHAPV2
    273  1.1  christos ifndef CONFIG_EAP_MSCHAPV2
    274  1.1  christos CONFIG_EAP_MSCHAPV2=y
    275  1.1  christos endif
    276  1.1  christos endif
    277  1.1  christos 
    278  1.1  christos ifdef CONFIG_EAP_MSCHAPV2
    279  1.1  christos # EAP-MSCHAPv2
    280  1.1  christos ifeq ($(CONFIG_EAP_MSCHAPV2), dyn)
    281  1.1  christos CFLAGS += -DEAP_MSCHAPv2_DYNAMIC
    282  1.1  christos EAPDYN += ../src/eap_peer/eap_mschapv2.so
    283  1.1  christos EAPDYN += ../src/eap_peer/mschapv2.so
    284  1.1  christos else
    285  1.1  christos CFLAGS += -DEAP_MSCHAPv2
    286  1.1  christos OBJS += ../src/eap_peer/eap_mschapv2.o
    287  1.1  christos OBJS += ../src/eap_peer/mschapv2.o
    288  1.1  christos OBJS_h += ../src/eap_server/eap_server_mschapv2.o
    289  1.1  christos endif
    290  1.1  christos MS_FUNCS=y
    291  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    292  1.1  christos endif
    293  1.1  christos 
    294  1.1  christos ifdef CONFIG_EAP_GTC
    295  1.1  christos # EAP-GTC
    296  1.1  christos ifeq ($(CONFIG_EAP_GTC), dyn)
    297  1.1  christos CFLAGS += -DEAP_GTC_DYNAMIC
    298  1.1  christos EAPDYN += ../src/eap_peer/eap_gtc.so
    299  1.1  christos else
    300  1.1  christos CFLAGS += -DEAP_GTC
    301  1.1  christos OBJS += ../src/eap_peer/eap_gtc.o
    302  1.1  christos OBJS_h += ../src/eap_server/eap_server_gtc.o
    303  1.1  christos endif
    304  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    305  1.1  christos endif
    306  1.1  christos 
    307  1.1  christos ifdef CONFIG_EAP_OTP
    308  1.1  christos # EAP-OTP
    309  1.1  christos ifeq ($(CONFIG_EAP_OTP), dyn)
    310  1.1  christos CFLAGS += -DEAP_OTP_DYNAMIC
    311  1.1  christos EAPDYN += ../src/eap_peer/eap_otp.so
    312  1.1  christos else
    313  1.1  christos CFLAGS += -DEAP_OTP
    314  1.1  christos OBJS += ../src/eap_peer/eap_otp.o
    315  1.1  christos endif
    316  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    317  1.1  christos endif
    318  1.1  christos 
    319  1.1  christos ifdef CONFIG_EAP_SIM
    320  1.1  christos # EAP-SIM
    321  1.1  christos ifeq ($(CONFIG_EAP_SIM), dyn)
    322  1.1  christos CFLAGS += -DEAP_SIM_DYNAMIC
    323  1.1  christos EAPDYN += ../src/eap_peer/eap_sim.so
    324  1.1  christos else
    325  1.1  christos CFLAGS += -DEAP_SIM
    326  1.1  christos OBJS += ../src/eap_peer/eap_sim.o
    327  1.1  christos OBJS_h += ../src/eap_server/eap_server_sim.o
    328  1.1  christos endif
    329  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    330  1.1  christos CONFIG_EAP_SIM_COMMON=y
    331  1.1  christos NEED_AES_CBC=y
    332  1.1  christos endif
    333  1.1  christos 
    334  1.1  christos ifdef CONFIG_EAP_LEAP
    335  1.1  christos # EAP-LEAP
    336  1.1  christos ifeq ($(CONFIG_EAP_LEAP), dyn)
    337  1.1  christos CFLAGS += -DEAP_LEAP_DYNAMIC
    338  1.1  christos EAPDYN += ../src/eap_peer/eap_leap.so
    339  1.1  christos else
    340  1.1  christos CFLAGS += -DEAP_LEAP
    341  1.1  christos OBJS += ../src/eap_peer/eap_leap.o
    342  1.1  christos endif
    343  1.1  christos MS_FUNCS=y
    344  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    345  1.1  christos endif
    346  1.1  christos 
    347  1.1  christos ifdef CONFIG_EAP_PSK
    348  1.1  christos # EAP-PSK
    349  1.1  christos ifeq ($(CONFIG_EAP_PSK), dyn)
    350  1.1  christos CFLAGS += -DEAP_PSK_DYNAMIC
    351  1.1  christos EAPDYN += ../src/eap_peer/eap_psk.so
    352  1.1  christos else
    353  1.1  christos CFLAGS += -DEAP_PSK
    354  1.1  christos OBJS += ../src/eap_peer/eap_psk.o ../src/eap_common/eap_psk_common.o
    355  1.1  christos OBJS_h += ../src/eap_server/eap_server_psk.o
    356  1.1  christos endif
    357  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    358  1.1  christos NEED_AES=y
    359  1.1  christos NEED_AES_OMAC1=y
    360  1.1  christos NEED_AES_ENCBLOCK=y
    361  1.1  christos NEED_AES_EAX=y
    362  1.1  christos endif
    363  1.1  christos 
    364  1.1  christos ifdef CONFIG_EAP_AKA
    365  1.1  christos # EAP-AKA
    366  1.1  christos ifeq ($(CONFIG_EAP_AKA), dyn)
    367  1.1  christos CFLAGS += -DEAP_AKA_DYNAMIC
    368  1.1  christos EAPDYN += ../src/eap_peer/eap_aka.so
    369  1.1  christos else
    370  1.1  christos CFLAGS += -DEAP_AKA
    371  1.1  christos OBJS += ../src/eap_peer/eap_aka.o
    372  1.1  christos OBJS_h += ../src/eap_server/eap_server_aka.o
    373  1.1  christos endif
    374  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    375  1.1  christos CONFIG_EAP_SIM_COMMON=y
    376  1.1  christos NEED_AES_CBC=y
    377  1.1  christos endif
    378  1.1  christos 
    379  1.1  christos ifdef CONFIG_EAP_AKA_PRIME
    380  1.1  christos # EAP-AKA'
    381  1.1  christos ifeq ($(CONFIG_EAP_AKA_PRIME), dyn)
    382  1.1  christos CFLAGS += -DEAP_AKA_PRIME_DYNAMIC
    383  1.1  christos else
    384  1.1  christos CFLAGS += -DEAP_AKA_PRIME
    385  1.1  christos endif
    386  1.1  christos NEED_SHA256=y
    387  1.1  christos endif
    388  1.1  christos 
    389  1.1  christos ifdef CONFIG_EAP_SIM_COMMON
    390  1.1  christos OBJS += ../src/eap_common/eap_sim_common.o
    391  1.1  christos OBJS_h += ../src/eap_server/eap_sim_db.o
    392  1.1  christos NEED_AES=y
    393  1.1  christos NEED_FIPS186_2_PRF=y
    394  1.1  christos endif
    395  1.1  christos 
    396  1.1  christos ifdef CONFIG_EAP_FAST
    397  1.1  christos # EAP-FAST
    398  1.1  christos ifeq ($(CONFIG_EAP_FAST), dyn)
    399  1.1  christos CFLAGS += -DEAP_FAST_DYNAMIC
    400  1.1  christos EAPDYN += ../src/eap_peer/eap_fast.so
    401  1.1  christos EAPDYN += ../src/eap_common/eap_fast_common.o
    402  1.1  christos else
    403  1.1  christos CFLAGS += -DEAP_FAST
    404  1.1  christos OBJS += ../src/eap_peer/eap_fast.o ../src/eap_peer/eap_fast_pac.o
    405  1.1  christos OBJS += ../src/eap_common/eap_fast_common.o
    406  1.1  christos OBJS_h += ../src/eap_server/eap_server_fast.o
    407  1.1  christos endif
    408  1.1  christos TLS_FUNCS=y
    409  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    410  1.1  christos NEED_T_PRF=y
    411  1.1  christos endif
    412  1.1  christos 
    413  1.1  christos ifdef CONFIG_EAP_PAX
    414  1.1  christos # EAP-PAX
    415  1.1  christos ifeq ($(CONFIG_EAP_PAX), dyn)
    416  1.1  christos CFLAGS += -DEAP_PAX_DYNAMIC
    417  1.1  christos EAPDYN += ../src/eap_peer/eap_pax.so
    418  1.1  christos else
    419  1.1  christos CFLAGS += -DEAP_PAX
    420  1.1  christos OBJS += ../src/eap_peer/eap_pax.o ../src/eap_common/eap_pax_common.o
    421  1.1  christos OBJS_h += ../src/eap_server/eap_server_pax.o
    422  1.1  christos endif
    423  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    424  1.1  christos endif
    425  1.1  christos 
    426  1.1  christos ifdef CONFIG_EAP_SAKE
    427  1.1  christos # EAP-SAKE
    428  1.1  christos ifeq ($(CONFIG_EAP_SAKE), dyn)
    429  1.1  christos CFLAGS += -DEAP_SAKE_DYNAMIC
    430  1.1  christos EAPDYN += ../src/eap_peer/eap_sake.so
    431  1.1  christos else
    432  1.1  christos CFLAGS += -DEAP_SAKE
    433  1.1  christos OBJS += ../src/eap_peer/eap_sake.o ../src/eap_common/eap_sake_common.o
    434  1.1  christos OBJS_h += ../src/eap_server/eap_server_sake.o
    435  1.1  christos endif
    436  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    437  1.1  christos endif
    438  1.1  christos 
    439  1.1  christos ifdef CONFIG_EAP_GPSK
    440  1.1  christos # EAP-GPSK
    441  1.1  christos ifeq ($(CONFIG_EAP_GPSK), dyn)
    442  1.1  christos CFLAGS += -DEAP_GPSK_DYNAMIC
    443  1.1  christos EAPDYN += ../src/eap_peer/eap_gpsk.so
    444  1.1  christos else
    445  1.1  christos CFLAGS += -DEAP_GPSK
    446  1.1  christos OBJS += ../src/eap_peer/eap_gpsk.o ../src/eap_common/eap_gpsk_common.o
    447  1.1  christos OBJS_h += ../src/eap_server/eap_server_gpsk.o
    448  1.1  christos endif
    449  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    450  1.1  christos ifdef CONFIG_EAP_GPSK_SHA256
    451  1.1  christos CFLAGS += -DEAP_GPSK_SHA256
    452  1.1  christos endif
    453  1.1  christos NEED_SHA256=y
    454  1.1  christos NEED_AES_OMAC1=y
    455  1.1  christos endif
    456  1.1  christos 
    457  1.1  christos ifdef CONFIG_WPS
    458  1.1  christos # EAP-WSC
    459  1.1  christos CFLAGS += -DCONFIG_WPS -DEAP_WSC
    460  1.1  christos OBJS += wps_supplicant.o
    461  1.1  christos OBJS += ../src/utils/uuid.o
    462  1.1  christos OBJS += ../src/eap_peer/eap_wsc.o ../src/eap_common/eap_wsc_common.o
    463  1.1  christos OBJS += ../src/wps/wps.o
    464  1.1  christos OBJS += ../src/wps/wps_common.o
    465  1.1  christos OBJS += ../src/wps/wps_attr_parse.o
    466  1.1  christos OBJS += ../src/wps/wps_attr_build.o
    467  1.1  christos OBJS += ../src/wps/wps_attr_process.o
    468  1.1  christos OBJS += ../src/wps/wps_dev_attr.o
    469  1.1  christos OBJS += ../src/wps/wps_enrollee.o
    470  1.1  christos OBJS += ../src/wps/wps_registrar.o
    471  1.1  christos OBJS_h += ../src/eap_server/eap_server_wsc.o
    472  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    473  1.1  christos NEED_DH_GROUPS=y
    474  1.1  christos NEED_SHA256=y
    475  1.1  christos NEED_BASE64=y
    476  1.1  christos NEED_80211_COMMON=y
    477  1.1  christos NEED_AES_CBC=y
    478  1.1  christos NEED_MODEXP=y
    479  1.1  christos 
    480  1.1  christos ifdef CONFIG_WPS_UFD
    481  1.1  christos CFLAGS += -DCONFIG_WPS_UFD
    482  1.1  christos OBJS += ../src/wps/wps_ufd.o
    483  1.1  christos NEED_WPS_OOB=y
    484  1.1  christos endif
    485  1.1  christos 
    486  1.1  christos ifdef CONFIG_WPS_NFC
    487  1.1  christos CFLAGS += -DCONFIG_WPS_NFC
    488  1.1  christos OBJS += ../src/wps/ndef.o
    489  1.1  christos OBJS += ../src/wps/wps_nfc.o
    490  1.1  christos NEED_WPS_OOB=y
    491  1.1  christos ifdef CONFIG_WPS_NFC_PN531
    492  1.1  christos PN531_PATH ?= /usr/local/src/nfc
    493  1.1  christos CFLAGS += -DCONFIG_WPS_NFC_PN531
    494  1.1  christos CFLAGS += -I${PN531_PATH}/inc
    495  1.1  christos OBJS += ../src/wps/wps_nfc_pn531.o
    496  1.1  christos LIBS += ${PN531_PATH}/lib/wpsnfc.dll
    497  1.1  christos LIBS += ${PN531_PATH}/lib/libnfc_mapping_pn53x.dll
    498  1.1  christos endif
    499  1.1  christos endif
    500  1.1  christos 
    501  1.1  christos ifdef NEED_WPS_OOB
    502  1.1  christos CFLAGS += -DCONFIG_WPS_OOB
    503  1.1  christos endif
    504  1.1  christos 
    505  1.1  christos ifdef CONFIG_WPS_ER
    506  1.1  christos CONFIG_WPS_UPNP=y
    507  1.1  christos CFLAGS += -DCONFIG_WPS_ER
    508  1.1  christos OBJS += ../src/wps/wps_er.o
    509  1.1  christos OBJS += ../src/wps/wps_er_ssdp.o
    510  1.1  christos endif
    511  1.1  christos 
    512  1.1  christos ifdef CONFIG_WPS_UPNP
    513  1.1  christos CFLAGS += -DCONFIG_WPS_UPNP
    514  1.1  christos OBJS += ../src/wps/wps_upnp.o
    515  1.1  christos OBJS += ../src/wps/wps_upnp_ssdp.o
    516  1.1  christos OBJS += ../src/wps/wps_upnp_web.o
    517  1.1  christos OBJS += ../src/wps/wps_upnp_event.o
    518  1.1  christos OBJS += ../src/wps/wps_upnp_ap.o
    519  1.1  christos OBJS += ../src/wps/upnp_xml.o
    520  1.1  christos OBJS += ../src/wps/httpread.o
    521  1.1  christos OBJS += ../src/wps/http_client.o
    522  1.1  christos OBJS += ../src/wps/http_server.o
    523  1.1  christos endif
    524  1.1  christos 
    525  1.1  christos endif
    526  1.1  christos 
    527  1.1  christos ifdef CONFIG_EAP_IKEV2
    528  1.1  christos # EAP-IKEv2
    529  1.1  christos ifeq ($(CONFIG_EAP_IKEV2), dyn)
    530  1.1  christos CFLAGS += -DEAP_IKEV2_DYNAMIC
    531  1.1  christos EAPDYN += ../src/eap_peer/eap_ikev2.so ../src/eap_peer/ikev2.o
    532  1.1  christos EAPDYN += ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.o
    533  1.1  christos else
    534  1.1  christos CFLAGS += -DEAP_IKEV2
    535  1.1  christos OBJS += ../src/eap_peer/eap_ikev2.o ../src/eap_peer/ikev2.o
    536  1.1  christos OBJS += ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.o
    537  1.1  christos OBJS_h += ../src/eap_server/eap_server_ikev2.o
    538  1.1  christos OBJS_h += ../src/eap_server/ikev2.o
    539  1.1  christos endif
    540  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    541  1.1  christos NEED_DH_GROUPS=y
    542  1.1  christos NEED_DH_GROUPS_ALL=y
    543  1.1  christos NEED_MODEXP=y
    544  1.1  christos NEED_CIPHER=y
    545  1.1  christos endif
    546  1.1  christos 
    547  1.1  christos ifdef CONFIG_EAP_VENDOR_TEST
    548  1.1  christos ifeq ($(CONFIG_EAP_VENDOR_TEST), dyn)
    549  1.1  christos CFLAGS += -DEAP_VENDOR_TEST_DYNAMIC
    550  1.1  christos EAPDYN += ../src/eap_peer/eap_vendor_test.so
    551  1.1  christos else
    552  1.1  christos CFLAGS += -DEAP_VENDOR_TEST
    553  1.1  christos OBJS += ../src/eap_peer/eap_vendor_test.o
    554  1.1  christos OBJS_h += ../src/eap_server/eap_server_vendor_test.o
    555  1.1  christos endif
    556  1.1  christos CONFIG_IEEE8021X_EAPOL=y
    557  1.1  christos endif
    558  1.1  christos 
    559  1.1  christos ifdef CONFIG_EAP_TNC
    560  1.1  christos # EAP-TNC
    561  1.1  christos CFLAGS += -DEAP_TNC
    562  1.1  christos OBJS += ../src/eap_peer/eap_tnc.o
    563  1.1  christos OBJS += ../src/eap_peer/tncc.o
    564  1.1  christos OBJS_h += ../src/eap_server/eap_server_tnc.o
    565  1.1  christos OBJS_h += ../src/eap_server/tncs.o
    566  1.1  christos NEED_BASE64=y
    567  1.1  christos ifndef CONFIG_NATIVE_WINDOWS
    568  1.1  christos ifndef CONFIG_DRIVER_BSD
    569  1.1  christos LIBS += -ldl
    570  1.1  christos endif
    571  1.1  christos endif
    572  1.1  christos endif
    573  1.1  christos 
    574  1.1  christos ifdef CONFIG_IEEE8021X_EAPOL
    575  1.1  christos # IEEE 802.1X/EAPOL state machines (e.g., for RADIUS authentication)
    576  1.1  christos CFLAGS += -DIEEE8021X_EAPOL
    577  1.1  christos OBJS += ../src/eapol_supp/eapol_supp_sm.o ../src/eap_peer/eap.o ../src/eap_common/eap_common.o ../src/eap_peer/eap_methods.o
    578  1.1  christos ifdef CONFIG_DYNAMIC_EAP_METHODS
    579  1.1  christos CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
    580  1.1  christos LIBS += -ldl -rdynamic
    581  1.1  christos endif
    582  1.1  christos endif
    583  1.1  christos 
    584  1.1  christos ifdef CONFIG_AP
    585  1.1  christos NEED_RSN_AUTHENTICATOR=y
    586  1.1  christos CFLAGS += -DCONFIG_AP
    587  1.1  christos OBJS += ap.o
    588  1.1  christos CFLAGS += -DCONFIG_NO_RADIUS
    589  1.1  christos CFLAGS += -DCONFIG_NO_ACCOUNTING
    590  1.1  christos CFLAGS += -DCONFIG_NO_VLAN
    591  1.1  christos OBJS += ../src/ap/hostapd.o
    592  1.1  christos OBJS += ../src/ap/wpa_auth_glue.o
    593  1.1  christos OBJS += ../src/ap/utils.o
    594  1.1  christos OBJS += ../src/ap/authsrv.o
    595  1.1  christos OBJS += ../src/ap/ap_config.o
    596  1.1  christos OBJS += ../src/utils/ip_addr.o
    597  1.1  christos OBJS += ../src/ap/sta_info.o
    598  1.1  christos OBJS += ../src/ap/tkip_countermeasures.o
    599  1.1  christos OBJS += ../src/ap/ap_mlme.o
    600  1.1  christos OBJS += ../src/ap/ieee802_1x.o
    601  1.1  christos OBJS += ../src/eapol_auth/eapol_auth_sm.o
    602  1.1  christos OBJS += ../src/ap/ieee802_11_auth.o
    603  1.1  christos OBJS += ../src/ap/drv_callbacks.o
    604  1.1  christos OBJS += ../src/ap/ap_drv_ops.o
    605  1.1  christos ifdef CONFIG_CTRL_IFACE
    606  1.1  christos OBJS += ../src/ap/ctrl_iface_ap.o
    607  1.1  christos endif
    608  1.1  christos 
    609  1.1  christos CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
    610  1.1  christos OBJS += ../src/eap_server/eap_server.o
    611  1.1  christos OBJS += ../src/eap_server/eap_server_identity.o
    612  1.1  christos OBJS += ../src/eap_server/eap_server_methods.o
    613  1.1  christos 
    614  1.1  christos ifdef CONFIG_IEEE80211N
    615  1.1  christos CFLAGS += -DCONFIG_IEEE80211N
    616  1.1  christos endif
    617  1.1  christos 
    618  1.1  christos ifdef NEED_AP_MLME
    619  1.1  christos OBJS += ../src/ap/beacon.o
    620  1.1  christos OBJS += ../src/ap/wmm.o
    621  1.1  christos OBJS += ../src/ap/ap_list.o
    622  1.1  christos OBJS += ../src/ap/ieee802_11.o
    623  1.1  christos OBJS += ../src/ap/hw_features.o
    624  1.1  christos ifdef CONFIG_IEEE80211N
    625  1.1  christos OBJS += ../src/ap/ieee802_11_ht.o
    626  1.1  christos endif
    627  1.1  christos CFLAGS += -DNEED_AP_MLME
    628  1.1  christos endif
    629  1.1  christos ifdef CONFIG_WPS
    630  1.1  christos CFLAGS += -DEAP_SERVER_WSC
    631  1.1  christos OBJS += ../src/ap/wps_hostapd.o
    632  1.1  christos OBJS += ../src/eap_server/eap_server_wsc.o
    633  1.1  christos endif
    634  1.1  christos endif
    635  1.1  christos 
    636  1.1  christos ifdef NEED_RSN_AUTHENTICATOR
    637  1.1  christos CFLAGS += -DCONFIG_NO_RADIUS
    638  1.1  christos NEED_AES_WRAP=y
    639  1.1  christos OBJS += ../src/ap/wpa_auth.o
    640  1.1  christos OBJS += ../src/ap/wpa_auth_ie.o
    641  1.1  christos OBJS += ../src/ap/pmksa_cache_auth.o
    642  1.1  christos ifdef CONFIG_IEEE80211R
    643  1.1  christos OBJS += ../src/ap/wpa_auth_ft.o
    644  1.1  christos endif
    645  1.1  christos ifdef CONFIG_PEERKEY
    646  1.1  christos OBJS += ../src/ap/peerkey_auth.o
    647  1.1  christos endif
    648  1.1  christos endif
    649  1.1  christos 
    650  1.1  christos ifdef CONFIG_EAP_SERVER
    651  1.1  christos CFLAGS += -DEAP_SERVER
    652  1.1  christos OBJS_h += ../src/eap_server/eap_server.o
    653  1.1  christos OBJS_h += ../src/eap_server/eap_server_identity.o
    654  1.1  christos OBJS_h += ../src/eap_server/eap_server_methods.o
    655  1.1  christos endif
    656  1.1  christos 
    657  1.1  christos ifdef CONFIG_RADIUS_CLIENT
    658  1.1  christos OBJS_h += ../src/utils/ip_addr.o
    659  1.1  christos OBJS_h += ../src/radius/radius.o
    660  1.1  christos OBJS_h += ../src/radius/radius_client.o
    661  1.1  christos endif
    662  1.1  christos 
    663  1.1  christos ifdef CONFIG_AUTHENTICATOR
    664  1.1  christos OBJS_h += ../src/eapol_auth/eapol_auth_sm.o
    665  1.1  christos OBJS_h += ../src/ap/ieee802_1x.o
    666  1.1  christos endif
    667  1.1  christos 
    668  1.1  christos ifdef CONFIG_WPA_AUTHENTICATOR
    669  1.1  christos OBJS_h += ../src/ap/wpa_auth.o
    670  1.1  christos OBJS_h += ../src/ap/wpa_auth_ie.o
    671  1.1  christos OBJS_h += ../src/ap/pmksa_cache_auth.o
    672  1.1  christos ifdef CONFIG_IEEE80211R
    673  1.1  christos OBJS_h += ../src/ap/wpa_auth_ft.o
    674  1.1  christos endif
    675  1.1  christos ifdef CONFIG_PEERKEY
    676  1.1  christos OBJS_h += ../src/ap/peerkey_auth.o
    677  1.1  christos endif
    678  1.1  christos endif
    679  1.1  christos 
    680  1.1  christos ifdef CONFIG_PCSC
    681  1.1  christos # PC/SC interface for smartcards (USIM, GSM SIM)
    682  1.1  christos CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC
    683  1.1  christos OBJS += ../src/utils/pcsc_funcs.o
    684  1.1  christos # -lpthread may not be needed depending on how pcsc-lite was configured
    685  1.1  christos ifdef CONFIG_NATIVE_WINDOWS
    686  1.1  christos #Once MinGW gets support for WinScard, -lwinscard could be used instead of the
    687  1.1  christos #dynamic symbol loading that is now used in pcsc_funcs.c
    688  1.1  christos #LIBS += -lwinscard
    689  1.1  christos else
    690  1.1  christos LIBS += -lpcsclite -lpthread
    691  1.1  christos endif
    692  1.1  christos endif
    693  1.1  christos 
    694  1.1  christos ifdef CONFIG_SIM_SIMULATOR
    695  1.1  christos CFLAGS += -DCONFIG_SIM_SIMULATOR
    696  1.1  christos NEED_MILENAGE=y
    697  1.1  christos endif
    698  1.1  christos 
    699  1.1  christos ifdef CONFIG_USIM_SIMULATOR
    700  1.1  christos CFLAGS += -DCONFIG_USIM_SIMULATOR
    701  1.1  christos NEED_MILENAGE=y
    702  1.1  christos endif
    703  1.1  christos 
    704  1.1  christos ifdef NEED_MILENAGE
    705  1.1  christos OBJS += ../src/crypto/milenage.o
    706  1.1  christos endif
    707  1.1  christos 
    708  1.1  christos ifdef CONFIG_PKCS12
    709  1.1  christos CFLAGS += -DPKCS12_FUNCS
    710  1.1  christos endif
    711  1.1  christos 
    712  1.1  christos ifdef CONFIG_SMARTCARD
    713  1.1  christos CFLAGS += -DCONFIG_SMARTCARD
    714  1.1  christos endif
    715  1.1  christos 
    716  1.1  christos ifdef MS_FUNCS
    717  1.1  christos OBJS += ../src/crypto/ms_funcs.o
    718  1.1  christos NEED_DES=y
    719  1.1  christos NEED_MD4=y
    720  1.1  christos endif
    721  1.1  christos 
    722  1.1  christos ifdef CHAP
    723  1.1  christos OBJS += ../src/eap_common/chap.o
    724  1.1  christos endif
    725  1.1  christos 
    726  1.1  christos ifdef TLS_FUNCS
    727  1.1  christos NEED_DES=y
    728  1.1  christos # Shared TLS functions (needed for EAP_TLS, EAP_PEAP, EAP_TTLS, and EAP_FAST)
    729  1.1  christos OBJS += ../src/eap_peer/eap_tls_common.o
    730  1.1  christos OBJS_h += ../src/eap_server/eap_server_tls_common.o
    731  1.1  christos NEED_TLS_PRF=y
    732  1.1  christos endif
    733  1.1  christos 
    734  1.1  christos ifndef CONFIG_TLS
    735  1.1  christos CONFIG_TLS=openssl
    736  1.1  christos endif
    737  1.1  christos 
    738  1.1  christos ifeq ($(CONFIG_TLS), openssl)
    739  1.1  christos ifdef TLS_FUNCS
    740  1.1  christos CFLAGS += -DEAP_TLS_OPENSSL
    741  1.1  christos OBJS += ../src/crypto/tls_openssl.o
    742  1.1  christos LIBS += -lssl
    743  1.1  christos endif
    744  1.1  christos OBJS += ../src/crypto/crypto_openssl.o
    745  1.1  christos OBJS_p += ../src/crypto/crypto_openssl.o
    746  1.1  christos ifdef NEED_FIPS186_2_PRF
    747  1.1  christos OBJS += ../src/crypto/fips_prf_openssl.o
    748  1.1  christos endif
    749  1.1  christos LIBS += -lcrypto
    750  1.1  christos LIBS_p += -lcrypto
    751  1.1  christos endif
    752  1.1  christos 
    753  1.1  christos ifeq ($(CONFIG_TLS), gnutls)
    754  1.1  christos ifdef TLS_FUNCS
    755  1.1  christos OBJS += ../src/crypto/tls_gnutls.o
    756  1.1  christos LIBS += -lgnutls -lgpg-error
    757  1.1  christos ifdef CONFIG_GNUTLS_EXTRA
    758  1.1  christos CFLAGS += -DCONFIG_GNUTLS_EXTRA
    759  1.1  christos LIBS += -lgnutls-extra
    760  1.1  christos endif
    761  1.1  christos endif
    762  1.1  christos OBJS += ../src/crypto/crypto_gnutls.o
    763  1.1  christos OBJS_p += ../src/crypto/crypto_gnutls.o
    764  1.1  christos ifdef NEED_FIPS186_2_PRF
    765  1.1  christos OBJS += ../src/crypto/fips_prf_gnutls.o
    766  1.1  christos endif
    767  1.1  christos LIBS += -lgcrypt
    768  1.1  christos LIBS_p += -lgcrypt
    769  1.1  christos CONFIG_INTERNAL_SHA256=y
    770  1.1  christos CONFIG_INTERNAL_RC4=y
    771  1.1  christos CONFIG_INTERNAL_DH_GROUP5=y
    772  1.1  christos endif
    773  1.1  christos 
    774  1.1  christos ifeq ($(CONFIG_TLS), schannel)
    775  1.1  christos ifdef TLS_FUNCS
    776  1.1  christos OBJS += ../src/crypto/tls_schannel.o
    777  1.1  christos endif
    778  1.1  christos OBJS += ../src/crypto/crypto_cryptoapi.o
    779  1.1  christos OBJS_p += ../src/crypto/crypto_cryptoapi.o
    780  1.1  christos ifdef NEED_FIPS186_2_PRF
    781  1.1  christos OBJS += ../src/crypto/fips_prf_cryptoapi.o
    782  1.1  christos endif
    783  1.1  christos CONFIG_INTERNAL_SHA256=y
    784  1.1  christos CONFIG_INTERNAL_RC4=y
    785  1.1  christos CONFIG_INTERNAL_DH_GROUP5=y
    786  1.1  christos endif
    787  1.1  christos 
    788  1.1  christos ifeq ($(CONFIG_TLS), nss)
    789  1.1  christos ifdef TLS_FUNCS
    790  1.1  christos OBJS += ../src/crypto/tls_nss.o
    791  1.1  christos LIBS += -lssl3
    792  1.1  christos endif
    793  1.1  christos OBJS += ../src/crypto/crypto_nss.o
    794  1.1  christos OBJS_p += ../src/crypto/crypto_nss.o
    795  1.1  christos ifdef NEED_FIPS186_2_PRF
    796  1.1  christos OBJS += ../src/crypto/fips_prf_nss.o
    797  1.1  christos endif
    798  1.1  christos LIBS += -lnss3
    799  1.1  christos LIBS_p += -lnss3
    800  1.1  christos CONFIG_INTERNAL_MD4=y
    801  1.1  christos CONFIG_INTERNAL_DH_GROUP5=y
    802  1.1  christos endif
    803  1.1  christos 
    804  1.1  christos ifeq ($(CONFIG_TLS), internal)
    805  1.1  christos ifndef CONFIG_CRYPTO
    806  1.1  christos CONFIG_CRYPTO=internal
    807  1.1  christos endif
    808  1.1  christos ifdef TLS_FUNCS
    809  1.1  christos OBJS += ../src/crypto/crypto_internal-rsa.o
    810  1.1  christos OBJS += ../src/crypto/tls_internal.o
    811  1.1  christos OBJS += ../src/tls/tlsv1_common.o
    812  1.1  christos OBJS += ../src/tls/tlsv1_record.o
    813  1.1  christos OBJS += ../src/tls/tlsv1_cred.o
    814  1.1  christos OBJS += ../src/tls/tlsv1_client.o
    815  1.1  christos OBJS += ../src/tls/tlsv1_client_write.o
    816  1.1  christos OBJS += ../src/tls/tlsv1_client_read.o
    817  1.1  christos OBJS += ../src/tls/asn1.o
    818  1.1  christos OBJS += ../src/tls/rsa.o
    819  1.1  christos OBJS += ../src/tls/x509v3.o
    820  1.1  christos OBJS += ../src/tls/pkcs1.o
    821  1.1  christos OBJS += ../src/tls/pkcs5.o
    822  1.1  christos OBJS += ../src/tls/pkcs8.o
    823  1.1  christos NEED_SHA256=y
    824  1.1  christos NEED_BASE64=y
    825  1.1  christos NEED_TLS_PRF=y
    826  1.1  christos NEED_MODEXP=y
    827  1.1  christos NEED_CIPHER=y
    828  1.1  christos CFLAGS += -DCONFIG_TLS_INTERNAL_CLIENT
    829  1.1  christos endif
    830  1.1  christos ifdef NEED_CIPHER
    831  1.1  christos NEED_DES=y
    832  1.1  christos OBJS += ../src/crypto/crypto_internal-cipher.o
    833  1.1  christos endif
    834  1.1  christos ifdef NEED_MODEXP
    835  1.1  christos OBJS += ../src/crypto/crypto_internal-modexp.o
    836  1.1  christos OBJS += ../src/tls/bignum.o
    837  1.1  christos endif
    838  1.1  christos ifeq ($(CONFIG_CRYPTO), libtomcrypt)
    839  1.1  christos OBJS += ../src/crypto/crypto_libtomcrypt.o
    840  1.1  christos OBJS_p += ../src/crypto/crypto_libtomcrypt.o
    841  1.1  christos LIBS += -ltomcrypt -ltfm
    842  1.1  christos LIBS_p += -ltomcrypt -ltfm
    843  1.1  christos CONFIG_INTERNAL_SHA256=y
    844  1.1  christos CONFIG_INTERNAL_RC4=y
    845  1.1  christos CONFIG_INTERNAL_DH_GROUP5=y
    846  1.1  christos endif
    847  1.1  christos ifeq ($(CONFIG_CRYPTO), internal)
    848  1.1  christos OBJS += ../src/crypto/crypto_internal.o
    849  1.1  christos OBJS_p += ../src/crypto/crypto_internal.o
    850  1.1  christos NEED_AES_ENC=y
    851  1.1  christos CFLAGS += -DCONFIG_CRYPTO_INTERNAL
    852  1.1  christos ifdef CONFIG_INTERNAL_LIBTOMMATH
    853  1.1  christos CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH
    854  1.1  christos ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST
    855  1.1  christos CFLAGS += -DLTM_FAST
    856  1.1  christos endif
    857  1.1  christos else
    858  1.1  christos LIBS += -ltommath
    859  1.1  christos LIBS_p += -ltommath
    860  1.1  christos endif
    861  1.1  christos CONFIG_INTERNAL_AES=y
    862  1.1  christos CONFIG_INTERNAL_DES=y
    863  1.1  christos CONFIG_INTERNAL_SHA1=y
    864  1.1  christos CONFIG_INTERNAL_MD4=y
    865  1.1  christos CONFIG_INTERNAL_MD5=y
    866  1.1  christos CONFIG_INTERNAL_SHA256=y
    867  1.1  christos CONFIG_INTERNAL_RC4=y
    868  1.1  christos CONFIG_INTERNAL_DH_GROUP5=y
    869  1.1  christos endif
    870  1.1  christos ifeq ($(CONFIG_CRYPTO), cryptoapi)
    871  1.1  christos OBJS += ../src/crypto/crypto_cryptoapi.o
    872  1.1  christos OBJS_p += ../src/crypto/crypto_cryptoapi.o
    873  1.1  christos CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI
    874  1.1  christos CONFIG_INTERNAL_SHA256=y
    875  1.1  christos CONFIG_INTERNAL_RC4=y
    876  1.1  christos endif
    877  1.1  christos endif
    878  1.1  christos 
    879  1.1  christos ifeq ($(CONFIG_TLS), none)
    880  1.1  christos ifdef TLS_FUNCS
    881  1.1  christos OBJS += ../src/crypto/tls_none.o
    882  1.1  christos CFLAGS += -DEAP_TLS_NONE
    883  1.1  christos CONFIG_INTERNAL_AES=y
    884  1.1  christos CONFIG_INTERNAL_SHA1=y
    885  1.1  christos CONFIG_INTERNAL_MD5=y
    886  1.1  christos endif
    887  1.1  christos OBJS += ../src/crypto/crypto_none.o
    888  1.1  christos OBJS_p += ../src/crypto/crypto_none.o
    889  1.1  christos CONFIG_INTERNAL_SHA256=y
    890  1.1  christos CONFIG_INTERNAL_RC4=y
    891  1.1  christos endif
    892  1.1  christos 
    893  1.1  christos ifdef TLS_FUNCS
    894  1.1  christos ifdef CONFIG_SMARTCARD
    895  1.1  christos ifndef CONFIG_NATIVE_WINDOWS
    896  1.1  christos ifneq ($(CONFIG_L2_PACKET), freebsd)
    897  1.1  christos LIBS += -ldl
    898  1.1  christos endif
    899  1.1  christos endif
    900  1.1  christos endif
    901  1.1  christos endif
    902  1.1  christos 
    903  1.1  christos ifndef TLS_FUNCS
    904  1.1  christos OBJS += ../src/crypto/tls_none.o
    905  1.1  christos ifeq ($(CONFIG_TLS), internal)
    906  1.1  christos CONFIG_INTERNAL_AES=y
    907  1.1  christos CONFIG_INTERNAL_SHA1=y
    908  1.1  christos CONFIG_INTERNAL_MD5=y
    909  1.1  christos CONFIG_INTERNAL_RC4=y
    910  1.1  christos endif
    911  1.1  christos endif
    912  1.1  christos 
    913  1.1  christos AESOBJS = # none so far (see below)
    914  1.1  christos ifdef CONFIG_INTERNAL_AES
    915  1.1  christos AESOBJS += ../src/crypto/aes-internal.o ../src/crypto/aes-internal-dec.o
    916  1.1  christos endif
    917  1.1  christos 
    918  1.1  christos AESOBJS += ../src/crypto/aes-unwrap.o
    919  1.1  christos ifdef NEED_AES_EAX
    920  1.1  christos AESOBJS += ../src/crypto/aes-eax.o
    921  1.1  christos NEED_AES_CTR=y
    922  1.1  christos endif
    923  1.1  christos ifdef NEED_AES_CTR
    924  1.1  christos AESOBJS += ../src/crypto/aes-ctr.o
    925  1.1  christos endif
    926  1.1  christos ifdef NEED_AES_ENCBLOCK
    927  1.1  christos AESOBJS += ../src/crypto/aes-encblock.o
    928  1.1  christos endif
    929  1.1  christos ifdef NEED_AES_OMAC1
    930  1.1  christos NEED_AES_ENC=y
    931  1.1  christos AESOBJS += ../src/crypto/aes-omac1.o
    932  1.1  christos endif
    933  1.1  christos ifdef NEED_AES_WRAP
    934  1.1  christos NEED_AES_ENC=y
    935  1.1  christos AESOBJS += ../src/crypto/aes-wrap.o
    936  1.1  christos endif
    937  1.1  christos ifdef NEED_AES_CBC
    938  1.1  christos NEED_AES_ENC=y
    939  1.1  christos AESOBJS += ../src/crypto/aes-cbc.o
    940  1.1  christos endif
    941  1.1  christos ifdef NEED_AES_ENC
    942  1.1  christos ifdef CONFIG_INTERNAL_AES
    943  1.1  christos AESOBJS += ../src/crypto/aes-internal-enc.o
    944  1.1  christos endif
    945  1.1  christos endif
    946  1.1  christos ifdef NEED_AES
    947  1.1  christos OBJS += $(AESOBJS)
    948  1.1  christos endif
    949  1.1  christos 
    950  1.1  christos ifdef NEED_SHA1
    951  1.1  christos SHA1OBJS += ../src/crypto/sha1.o
    952  1.1  christos ifdef CONFIG_INTERNAL_SHA1
    953  1.1  christos SHA1OBJS += ../src/crypto/sha1-internal.o
    954  1.1  christos ifdef NEED_FIPS186_2_PRF
    955  1.1  christos SHA1OBJS += ../src/crypto/fips_prf_internal.o
    956  1.1  christos endif
    957  1.1  christos endif
    958  1.1  christos ifndef CONFIG_NO_WPA_PASSPHRASE
    959  1.1  christos SHA1OBJS += ../src/crypto/sha1-pbkdf2.o
    960  1.1  christos endif
    961  1.1  christos ifdef NEED_T_PRF
    962  1.1  christos SHA1OBJS += ../src/crypto/sha1-tprf.o
    963  1.1  christos endif
    964  1.1  christos ifdef NEED_TLS_PRF
    965  1.1  christos SHA1OBJS += ../src/crypto/sha1-tlsprf.o
    966  1.1  christos endif
    967  1.1  christos endif
    968  1.1  christos 
    969  1.1  christos MD5OBJS = ../src/crypto/md5.o
    970  1.1  christos ifdef NEED_MD5
    971  1.1  christos ifdef CONFIG_INTERNAL_MD5
    972  1.1  christos MD5OBJS += ../src/crypto/md5-internal.o
    973  1.1  christos endif
    974  1.1  christos ifdef CONFIG_FIPS
    975  1.1  christos MD5OBJS += ../src/crypto/md5-non-fips.o
    976  1.1  christos endif
    977  1.1  christos OBJS += $(MD5OBJS)
    978  1.1  christos OBJS_p += $(MD5OBJS)
    979  1.1  christos endif
    980  1.1  christos 
    981  1.1  christos ifdef NEED_MD4
    982  1.1  christos ifdef CONFIG_INTERNAL_MD4
    983  1.1  christos OBJS += ../src/crypto/md4-internal.o
    984  1.1  christos endif
    985  1.1  christos endif
    986  1.1  christos 
    987  1.1  christos DESOBJS = # none needed when not internal
    988  1.1  christos ifdef NEED_DES
    989  1.1  christos ifdef CONFIG_INTERNAL_DES
    990  1.1  christos DESOBJS += ../src/crypto/des-internal.o
    991  1.1  christos endif
    992  1.1  christos endif
    993  1.1  christos 
    994  1.1  christos ifdef NEED_RC4
    995  1.1  christos ifdef CONFIG_INTERNAL_RC4
    996  1.1  christos OBJS += ../src/crypto/rc4.o
    997  1.1  christos endif
    998  1.1  christos endif
    999  1.1  christos 
   1000  1.1  christos SHA256OBJS = # none by default
   1001  1.1  christos ifdef NEED_SHA256
   1002  1.1  christos CFLAGS += -DCONFIG_SHA256
   1003  1.1  christos SHA256OBJS += ../src/crypto/sha256.o
   1004  1.1  christos ifdef CONFIG_INTERNAL_SHA256
   1005  1.1  christos SHA256OBJS += ../src/crypto/sha256-internal.o
   1006  1.1  christos endif
   1007  1.1  christos OBJS += $(SHA256OBJS)
   1008  1.1  christos endif
   1009  1.1  christos 
   1010  1.1  christos ifdef NEED_DH_GROUPS
   1011  1.1  christos OBJS += ../src/crypto/dh_groups.o
   1012  1.1  christos endif
   1013  1.1  christos ifdef NEED_DH_GROUPS_ALL
   1014  1.1  christos CFLAGS += -DALL_DH_GROUPS
   1015  1.1  christos endif
   1016  1.1  christos ifdef CONFIG_INTERNAL_DH_GROUP5
   1017  1.1  christos ifdef NEED_DH_GROUPS
   1018  1.1  christos OBJS += ../src/crypto/dh_group5.o
   1019  1.1  christos endif
   1020  1.1  christos endif
   1021  1.1  christos 
   1022  1.1  christos ifdef CONFIG_CTRL_IFACE
   1023  1.1  christos ifeq ($(CONFIG_CTRL_IFACE), y)
   1024  1.1  christos ifdef CONFIG_NATIVE_WINDOWS
   1025  1.1  christos CONFIG_CTRL_IFACE=named_pipe
   1026  1.1  christos else
   1027  1.1  christos CONFIG_CTRL_IFACE=unix
   1028  1.1  christos endif
   1029  1.1  christos endif
   1030  1.1  christos CFLAGS += -DCONFIG_CTRL_IFACE
   1031  1.1  christos ifeq ($(CONFIG_CTRL_IFACE), unix)
   1032  1.1  christos CFLAGS += -DCONFIG_CTRL_IFACE_UNIX
   1033  1.1  christos endif
   1034  1.1  christos ifeq ($(CONFIG_CTRL_IFACE), udp)
   1035  1.1  christos CFLAGS += -DCONFIG_CTRL_IFACE_UDP
   1036  1.1  christos endif
   1037  1.1  christos ifeq ($(CONFIG_CTRL_IFACE), named_pipe)
   1038  1.1  christos CFLAGS += -DCONFIG_CTRL_IFACE_NAMED_PIPE
   1039  1.1  christos endif
   1040  1.1  christos OBJS += ctrl_iface.o ctrl_iface_$(CONFIG_CTRL_IFACE).o
   1041  1.1  christos endif
   1042  1.1  christos 
   1043  1.1  christos ifdef CONFIG_CTRL_IFACE_DBUS
   1044  1.1  christos DBUS=y
   1045  1.1  christos DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS -DDBUS_API_SUBJECT_TO_CHANGE
   1046  1.1  christos DBUS_OBJS += dbus/dbus_old.o dbus/dbus_old_handlers.o
   1047  1.1  christos ifdef CONFIG_WPS
   1048  1.1  christos DBUS_OBJS += dbus/dbus_old_handlers_wps.o
   1049  1.1  christos endif
   1050  1.1  christos DBUS_OBJS += dbus/dbus_dict_helpers.o
   1051  1.1  christos ifndef DBUS_LIBS
   1052  1.1  christos DBUS_LIBS := $(shell pkg-config --libs dbus-1)
   1053  1.1  christos endif
   1054  1.1  christos ifndef DBUS_INCLUDE
   1055  1.1  christos DBUS_INCLUDE := $(shell pkg-config --cflags dbus-1)
   1056  1.1  christos endif
   1057  1.1  christos dbus_version=$(subst ., ,$(shell pkg-config --modversion dbus-1))
   1058  1.1  christos DBUS_VERSION_MAJOR=$(word 1,$(dbus_version))
   1059  1.1  christos DBUS_VERSION_MINOR=$(word 2,$(dbus_version))
   1060  1.1  christos ifeq ($(DBUS_VERSION_MAJOR),)
   1061  1.1  christos DBUS_VERSION_MAJOR=0
   1062  1.1  christos endif
   1063  1.1  christos ifeq ($(DBUS_VERSION_MINOR),)
   1064  1.1  christos DBUS_VERSION_MINOR=0
   1065  1.1  christos endif
   1066  1.1  christos DBUS_INCLUDE += -DDBUS_VERSION_MAJOR=$(DBUS_VERSION_MAJOR)
   1067  1.1  christos DBUS_INCLUDE += -DDBUS_VERSION_MINOR=$(DBUS_VERSION_MINOR)
   1068  1.1  christos DBUS_CFLAGS += $(DBUS_INCLUDE)
   1069  1.1  christos endif
   1070  1.1  christos 
   1071  1.1  christos ifdef CONFIG_CTRL_IFACE_DBUS_NEW
   1072  1.1  christos DBUS=y
   1073  1.1  christos DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_NEW
   1074  1.1  christos DBUS_OBJS ?= dbus/dbus_dict_helpers.o
   1075  1.1  christos DBUS_OBJS += dbus/dbus_new_helpers.o
   1076  1.1  christos DBUS_OBJS += dbus/dbus_new.o dbus/dbus_new_handlers.o
   1077  1.1  christos ifdef CONFIG_WPS
   1078  1.1  christos DBUS_OBJS += dbus/dbus_new_handlers_wps.o
   1079  1.1  christos endif
   1080  1.1  christos ifndef DBUS_LIBS
   1081  1.1  christos DBUS_LIBS := $(shell pkg-config --libs dbus-1)
   1082  1.1  christos endif
   1083  1.1  christos ifndef DBUS_INCLUDE
   1084  1.1  christos DBUS_INCLUDE := $(shell pkg-config --cflags dbus-1)
   1085  1.1  christos endif
   1086  1.1  christos ifdef CONFIG_CTRL_IFACE_DBUS_INTRO
   1087  1.1  christos DBUS_OBJS += dbus/dbus_new_introspect.o
   1088  1.1  christos DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO
   1089  1.1  christos endif
   1090  1.1  christos DBUS_CFLAGS += $(DBUS_INCLUDE)
   1091  1.1  christos endif
   1092  1.1  christos 
   1093  1.1  christos ifdef DBUS
   1094  1.1  christos DBUS_CFLAGS += -DCONFIG_DBUS
   1095  1.1  christos DBUS_OBJS += dbus/dbus_common.o
   1096  1.1  christos endif
   1097  1.1  christos 
   1098  1.1  christos OBJS += $(DBUS_OBJS)
   1099  1.1  christos CFLAGS += $(DBUS_CFLAGS)
   1100  1.1  christos LIBS += $(DBUS_LIBS)
   1101  1.1  christos 
   1102  1.1  christos ifdef CONFIG_READLINE
   1103  1.1  christos CFLAGS += -DCONFIG_READLINE
   1104  1.1  christos LIBS_c += -lncurses -lreadline
   1105  1.1  christos endif
   1106  1.1  christos 
   1107  1.1  christos ifdef CONFIG_NATIVE_WINDOWS
   1108  1.1  christos CFLAGS += -DCONFIG_NATIVE_WINDOWS
   1109  1.1  christos LIBS += -lws2_32 -lgdi32 -lcrypt32
   1110  1.1  christos LIBS_c += -lws2_32
   1111  1.1  christos LIBS_p += -lws2_32 -lgdi32
   1112  1.1  christos ifeq ($(CONFIG_CRYPTO), cryptoapi)
   1113  1.1  christos LIBS_p += -lcrypt32
   1114  1.1  christos endif
   1115  1.1  christos endif
   1116  1.1  christos 
   1117  1.1  christos ifdef CONFIG_NO_STDOUT_DEBUG
   1118  1.1  christos CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
   1119  1.1  christos ifndef CONFIG_CTRL_IFACE
   1120  1.1  christos CFLAGS += -DCONFIG_NO_WPA_MSG
   1121  1.1  christos endif
   1122  1.1  christos endif
   1123  1.1  christos 
   1124  1.1  christos ifdef CONFIG_IPV6
   1125  1.1  christos # for eapol_test only
   1126  1.1  christos CFLAGS += -DCONFIG_IPV6
   1127  1.1  christos endif
   1128  1.1  christos 
   1129  1.1  christos ifdef NEED_BASE64
   1130  1.1  christos OBJS += ../src/utils/base64.o
   1131  1.1  christos endif
   1132  1.1  christos 
   1133  1.1  christos ifdef NEED_SME
   1134  1.1  christos NEED_80211_COMMON=y
   1135  1.1  christos OBJS += sme.o
   1136  1.1  christos CFLAGS += -DCONFIG_SME
   1137  1.1  christos endif
   1138  1.1  christos 
   1139  1.1  christos ifdef CONFIG_CLIENT_MLME
   1140  1.1  christos OBJS += mlme.o
   1141  1.1  christos CFLAGS += -DCONFIG_CLIENT_MLME
   1142  1.1  christos NEED_80211_COMMON=y
   1143  1.1  christos endif
   1144  1.1  christos 
   1145  1.1  christos ifdef NEED_80211_COMMON
   1146  1.1  christos OBJS += ../src/common/ieee802_11_common.o
   1147  1.1  christos endif
   1148  1.1  christos 
   1149  1.1  christos ifndef CONFIG_MAIN
   1150  1.1  christos CONFIG_MAIN=main
   1151  1.1  christos endif
   1152  1.1  christos 
   1153  1.1  christos ifdef CONFIG_DEBUG_SYSLOG
   1154  1.1  christos CFLAGS += -DCONFIG_DEBUG_SYSLOG
   1155  1.1  christos endif
   1156  1.1  christos 
   1157  1.1  christos ifdef CONFIG_DEBUG_FILE
   1158  1.1  christos CFLAGS += -DCONFIG_DEBUG_FILE
   1159  1.1  christos endif
   1160  1.1  christos 
   1161  1.1  christos ifdef CONFIG_DELAYED_MIC_ERROR_REPORT
   1162  1.1  christos CFLAGS += -DCONFIG_DELAYED_MIC_ERROR_REPORT
   1163  1.1  christos endif
   1164  1.1  christos 
   1165  1.1  christos ifdef CONFIG_FIPS
   1166  1.1  christos CFLAGS += -DCONFIG_FIPS
   1167  1.1  christos endif
   1168  1.1  christos 
   1169  1.1  christos OBJS += $(SHA1OBJS) $(DESOBJS)
   1170  1.1  christos 
   1171  1.1  christos OBJS_p += $(SHA1OBJS)
   1172  1.1  christos 
   1173  1.1  christos ifdef CONFIG_BGSCAN_SIMPLE
   1174  1.1  christos CFLAGS += -DCONFIG_BGSCAN_SIMPLE
   1175  1.1  christos OBJS += bgscan_simple.o
   1176  1.1  christos NEED_BGSCAN=y
   1177  1.1  christos endif
   1178  1.1  christos 
   1179  1.1  christos ifdef NEED_BGSCAN
   1180  1.1  christos CFLAGS += -DCONFIG_BGSCAN
   1181  1.1  christos OBJS += bgscan.o
   1182  1.1  christos endif
   1183  1.1  christos 
   1184  1.1  christos OBJS_wpa_rm := ctrl_iface.o mlme.o ctrl_iface_unix.o
   1185  1.1  christos OBJS_wpa := $(filter-out $(OBJS_wpa_rm),$(OBJS)) $(OBJS_h) tests/test_wpa.o
   1186  1.1  christos ifdef CONFIG_AUTHENTICATOR
   1187  1.1  christos OBJS_wpa += tests/link_test.o
   1188  1.1  christos endif
   1189  1.1  christos OBJS_wpa += $(OBJS_l2)
   1190  1.1  christos OBJS += wpa_supplicant.o events.o blacklist.o wpas_glue.o scan.o
   1191  1.1  christos OBJS_t := $(OBJS) $(OBJS_l2) eapol_test.o
   1192  1.1  christos OBJS_t += ../src/radius/radius_client.o
   1193  1.1  christos OBJS_t += ../src/radius/radius.o
   1194  1.1  christos ifndef CONFIG_AP
   1195  1.1  christos OBJS_t += ../src/utils/ip_addr.o
   1196  1.1  christos endif
   1197  1.1  christos OBJS_t2 := $(OBJS) $(OBJS_l2) preauth_test.o
   1198  1.1  christos OBJS += $(CONFIG_MAIN).o
   1199  1.1  christos 
   1200  1.1  christos ifdef CONFIG_PRIVSEP
   1201  1.1  christos OBJS_priv += $(OBJS_d) ../src/drivers/drivers.o
   1202  1.1  christos OBJS_priv += $(OBJS_l2)
   1203  1.1  christos OBJS_priv += ../src/utils/os_$(CONFIG_OS).o
   1204  1.1  christos OBJS_priv += ../src/utils/$(CONFIG_ELOOP).o
   1205  1.1  christos OBJS_priv += ../src/utils/common.o
   1206  1.1  christos OBJS_priv += ../src/utils/wpa_debug.o
   1207  1.1  christos OBJS_priv += ../src/utils/wpabuf.o
   1208  1.1  christos OBJS_priv += wpa_priv.o
   1209  1.1  christos ifdef CONFIG_DRIVER_TEST
   1210  1.1  christos OBJS_priv += $(SHA1OBJS)
   1211  1.1  christos OBJS_priv += $(MD5OBJS)
   1212  1.1  christos ifeq ($(CONFIG_TLS), openssl)
   1213  1.1  christos OBJS_priv += ../src/crypto/crypto_openssl.o
   1214  1.1  christos endif
   1215  1.1  christos ifeq ($(CONFIG_TLS), gnutls)
   1216  1.1  christos OBJS_priv += ../src/crypto/crypto_gnutls.o
   1217  1.1  christos endif
   1218  1.1  christos ifeq ($(CONFIG_TLS), nss)
   1219  1.1  christos OBJS_priv += ../src/crypto/crypto_nss.o
   1220  1.1  christos endif
   1221  1.1  christos ifeq ($(CONFIG_TLS), internal)
   1222  1.1  christos ifeq ($(CONFIG_CRYPTO), libtomcrypt)
   1223  1.1  christos OBJS_priv += ../src/crypto/crypto_libtomcrypt.o
   1224  1.1  christos else
   1225  1.1  christos OBJS_priv += ../src/crypto/crypto_internal.o
   1226  1.1  christos endif
   1227  1.1  christos endif
   1228  1.1  christos endif # CONFIG_DRIVER_TEST
   1229  1.1  christos OBJS += ../src/l2_packet/l2_packet_privsep.o
   1230  1.1  christos OBJS += ../src/drivers/driver_privsep.o
   1231  1.1  christos EXTRA_progs += wpa_priv
   1232  1.1  christos else
   1233  1.1  christos OBJS += $(OBJS_d) ../src/drivers/drivers.o
   1234  1.1  christos OBJS += $(OBJS_l2)
   1235  1.1  christos endif
   1236  1.1  christos 
   1237  1.1  christos ifdef CONFIG_NDIS_EVENTS_INTEGRATED
   1238  1.1  christos CFLAGS += -DCONFIG_NDIS_EVENTS_INTEGRATED
   1239  1.1  christos OBJS += ../src/drivers/ndis_events.o
   1240  1.1  christos EXTRALIBS += -loleaut32 -lole32 -luuid
   1241  1.1  christos ifdef PLATFORMSDKLIB
   1242  1.1  christos EXTRALIBS += $(PLATFORMSDKLIB)/WbemUuid.Lib
   1243  1.1  christos else
   1244  1.1  christos EXTRALIBS += WbemUuid.Lib
   1245  1.1  christos endif
   1246  1.1  christos endif
   1247  1.1  christos 
   1248  1.1  christos ifndef LDO
   1249  1.1  christos LDO=$(CC)
   1250  1.1  christos endif
   1251  1.1  christos 
   1252  1.1  christos dynamic_eap_methods: $(EAPDYN)
   1253  1.1  christos 
   1254  1.1  christos ../src/drivers/build.wpa_supplicant:
   1255  1.1  christos 	@if [ -f ../src/drivers/build.hostapd ]; then \
   1256  1.1  christos 		$(MAKE) -C ../src/drivers clean; \
   1257  1.1  christos 	fi
   1258  1.1  christos 	@touch ../src/drivers/build.wpa_supplicant
   1259  1.1  christos 
   1260  1.1  christos BCHECK=../src/drivers/build.wpa_supplicant
   1261  1.1  christos 
   1262  1.1  christos wpa_priv: $(BCHECK) $(OBJS_priv)
   1263  1.1  christos 	$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS)
   1264  1.1  christos 
   1265  1.1  christos wpa_supplicant: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
   1266  1.1  christos 	$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
   1267  1.1  christos 
   1268  1.1  christos eapol_test: .config $(OBJS_t)
   1269  1.1  christos 	$(LDO) $(LDFLAGS) -o eapol_test $(OBJS_t) $(LIBS)
   1270  1.1  christos 
   1271  1.1  christos preauth_test: .config $(OBJS_t2) 
   1272  1.1  christos 	$(LDO) $(LDFLAGS) -o preauth_test $(OBJS_t2) $(LIBS)
   1273  1.1  christos 
   1274  1.1  christos wpa_passphrase: $(OBJS_p)
   1275  1.1  christos 	$(LDO) $(LDFLAGS) -o wpa_passphrase $(OBJS_p) $(LIBS_p)
   1276  1.1  christos 
   1277  1.1  christos wpa_cli: $(OBJS_c)
   1278  1.1  christos 	$(LDO) $(LDFLAGS) -o wpa_cli $(OBJS_c) $(LIBS_c)
   1279  1.1  christos 
   1280  1.1  christos link_test: $(OBJS) $(OBJS_h) tests/link_test.o
   1281  1.1  christos 	$(LDO) $(LDFLAGS) -o link_test $(OBJS) $(OBJS_h) tests/link_test.o $(LIBS)
   1282  1.1  christos 
   1283  1.1  christos test_wpa: $(OBJS_wpa) $(OBJS_h)
   1284  1.1  christos 	$(LDO) $(LDFLAGS) -o test_wpa $(OBJS_wpa) $(LIBS)
   1285  1.1  christos 
   1286  1.1  christos win_if_list: win_if_list.c
   1287  1.1  christos 	$(LDO) $(LDFLAGS) -o $@ win_if_list.c $(CFLAGS) $(LIBS_w)
   1288  1.1  christos 
   1289  1.1  christos eap_psk.so: ../src/eap_peer/eap_psk.c ../src/eap_common/eap_psk_common.c
   1290  1.1  christos 	$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
   1291  1.1  christos 		-Deap_peer_psk_register=eap_peer_method_dynamic_init
   1292  1.1  christos 
   1293  1.1  christos eap_pax.so: ../src/eap_peer/eap_pax.c ../src/eap_common/eap_pax_common.c
   1294  1.1  christos 	$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
   1295  1.1  christos 		-Deap_peer_pax_register=eap_peer_method_dynamic_init
   1296  1.1  christos 
   1297  1.1  christos eap_sake.so: ../src/eap_peer/eap_sake.c ../src/eap_common/eap_sake_common.c
   1298  1.1  christos 	$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
   1299  1.1  christos 		-Deap_peer_sake_register=eap_peer_method_dynamic_init
   1300  1.1  christos 
   1301  1.1  christos eap_wsc.so: ../src/eap_peer/eap_wsc.c ../src/eap_common/eap_wsc_common.c ../src/wps/wps.c
   1302  1.1  christos 	$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
   1303  1.1  christos 		-Deap_peer_wsc_register=eap_peer_method_dynamic_init
   1304  1.1  christos 
   1305  1.1  christos eap_ikev2.so: ../src/eap_peer/eap_ikev2.c ../src/eap_peer/ikev2.c ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.c
   1306  1.1  christos 	$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $^ \
   1307  1.1  christos 		-Deap_peer_ikev2_register=eap_peer_method_dynamic_init
   1308  1.1  christos 
   1309  1.1  christos %.so: %.c
   1310  1.1  christos 	$(CC) $(LDFLAGS) -o $@ $(CFLAGS) -shared -rdynamic -fPIC $< \
   1311  1.1  christos 		-D$(*F:eap_%=eap_peer_%)_register=eap_peer_method_dynamic_init
   1312  1.1  christos 
   1313  1.1  christos Q=@
   1314  1.1  christos E=echo
   1315  1.1  christos ifeq ($(V), 1)
   1316  1.1  christos Q=
   1317  1.1  christos E=true
   1318  1.1  christos endif
   1319  1.1  christos 
   1320  1.1  christos %.o: %.c
   1321  1.1  christos 	$(Q)$(CC) -c -o $@ $(CFLAGS) $<
   1322  1.1  christos 	@$(E) "  CC " $<
   1323  1.1  christos 
   1324  1.1  christos wpa_supplicant.exe: wpa_supplicant
   1325  1.1  christos 	mv -f $< $@
   1326  1.1  christos wpa_cli.exe: wpa_cli
   1327  1.1  christos 	mv -f $< $@
   1328  1.1  christos wpa_passphrase.exe: wpa_passphrase
   1329  1.1  christos 	mv -f $< $@
   1330  1.1  christos win_if_list.exe: win_if_list
   1331  1.1  christos 	mv -f $< $@
   1332  1.1  christos eapol_test.exe: eapol_test
   1333  1.1  christos 	mv -f $< $@
   1334  1.1  christos 
   1335  1.1  christos WINALL=wpa_supplicant.exe wpa_cli.exe wpa_passphrase.exe win_if_list.exe
   1336  1.1  christos 
   1337  1.1  christos windows-bin: $(WINALL)
   1338  1.1  christos 	$(STRIP) $(WINALL)
   1339  1.1  christos 
   1340  1.1  christos wpa_gui/Makefile:
   1341  1.1  christos 	qmake -o wpa_gui/Makefile wpa_gui/wpa_gui.pro 
   1342  1.1  christos 
   1343  1.1  christos wpa_gui: wpa_gui/Makefile
   1344  1.1  christos 	$(MAKE) -C wpa_gui
   1345  1.1  christos 
   1346  1.1  christos wpa_gui-qt4/Makefile:
   1347  1.1  christos 	qmake -o wpa_gui-qt4/Makefile wpa_gui-qt4/wpa_gui.pro 
   1348  1.1  christos 
   1349  1.1  christos wpa_gui-qt4/lang/wpa_gui_de.qm: wpa_gui-qt4/lang/wpa_gui_de.ts
   1350  1.1  christos 	lrelease wpa_gui-qt4/wpa_gui.pro
   1351  1.1  christos 
   1352  1.1  christos wpa_gui-qt4: wpa_gui-qt4/Makefile wpa_gui-qt4/lang/wpa_gui_de.qm
   1353  1.1  christos 	$(MAKE) -C wpa_gui-qt4
   1354  1.1  christos 
   1355  1.1  christos TEST_EAP_SIM_COMMON_OBJS = $(SHA1OBJS) $(MD5OBJS) \
   1356  1.1  christos 	../src/utils/common.o ../src/utils/os_unix.o \
   1357  1.1  christos 	../src/utils/wpa_debug.o $(AESOBJS) \
   1358  1.1  christos 	tests/test_eap_sim_common.o
   1359  1.1  christos test-eap_sim_common: $(TEST_EAP_SIM_COMMON_OBJS)
   1360  1.1  christos 	$(LDO) $(LDFLAGS) -o $@ $(TEST_EAP_SIM_COMMON_OBJS) $(LIBS)
   1361  1.1  christos 	./test-eap_sim_common
   1362  1.1  christos 	rm test-eap_sim_common
   1363  1.1  christos 
   1364  1.1  christos tests: test-eap_sim_common
   1365  1.1  christos 
   1366  1.1  christos clean:
   1367  1.1  christos 	$(MAKE) -C ../src clean
   1368  1.1  christos 	$(MAKE) -C dbus clean
   1369  1.1  christos 	rm -f core *~ *.o *.d eap_*.so $(ALL) $(WINALL) eapol_test preauth_test
   1370  1.1  christos 	rm -f wpa_priv
   1371  1.1  christos 
   1372  1.1  christos -include $(OBJS:%.o=%.d)
   1373