2008-02-28 02:34:43 +01:00
|
|
|
ifndef CC
|
|
|
|
CC=gcc
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef CFLAGS
|
|
|
|
CFLAGS = -MMD -O2 -Wall -g
|
|
|
|
endif
|
|
|
|
|
|
|
|
CFLAGS += -I../src
|
|
|
|
CFLAGS += -I../src/utils
|
|
|
|
|
|
|
|
# Uncomment following line and set the path to your kernel tree include
|
|
|
|
# directory if your C library does not include all header files.
|
|
|
|
# CFLAGS += -DUSE_KERNEL_HEADERS -I/usr/src/linux/include
|
|
|
|
|
|
|
|
-include .config
|
|
|
|
|
|
|
|
ifndef CONFIG_OS
|
|
|
|
ifdef CONFIG_NATIVE_WINDOWS
|
|
|
|
CONFIG_OS=win32
|
|
|
|
else
|
|
|
|
CONFIG_OS=unix
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_OS), internal)
|
|
|
|
CFLAGS += -DOS_NO_C_LIB_DEFINES
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_NATIVE_WINDOWS
|
|
|
|
CFLAGS += -DCONFIG_NATIVE_WINDOWS
|
|
|
|
LIBS += -lws2_32
|
|
|
|
endif
|
|
|
|
|
2009-12-25 00:12:50 +01:00
|
|
|
OBJS += main.o
|
|
|
|
OBJS += config_file.o
|
|
|
|
|
2009-12-25 19:06:07 +01:00
|
|
|
OBJS += ../src/ap/hostapd.o
|
|
|
|
OBJS += ../src/ap/wpa_auth_glue.o
|
|
|
|
OBJS += ../src/ap/drv_callbacks.o
|
|
|
|
OBJS += ../src/ap/ap_drv_ops.o
|
2009-12-25 00:26:37 +01:00
|
|
|
OBJS += ../src/ap/utils.o
|
2009-12-25 12:43:43 +01:00
|
|
|
OBJS += ../src/ap/authsrv.o
|
2009-12-25 00:12:50 +01:00
|
|
|
OBJS += ../src/ap/ieee802_1x.o
|
2009-12-25 23:05:40 +01:00
|
|
|
OBJS += ../src/ap/ap_config.o
|
2009-12-25 00:12:50 +01:00
|
|
|
OBJS += ../src/ap/ieee802_11_auth.o
|
|
|
|
OBJS += ../src/ap/sta_info.o
|
2009-12-25 23:05:40 +01:00
|
|
|
OBJS += ../src/ap/wpa_auth.o
|
2009-12-25 00:12:50 +01:00
|
|
|
OBJS += ../src/ap/tkip_countermeasures.o
|
2009-12-25 23:05:40 +01:00
|
|
|
OBJS += ../src/ap/ap_mlme.o
|
2009-12-25 00:12:50 +01:00
|
|
|
OBJS += ../src/ap/wpa_auth_ie.o
|
2009-12-25 23:05:40 +01:00
|
|
|
OBJS += ../src/ap/preauth_auth.o
|
|
|
|
OBJS += ../src/ap/pmksa_cache_auth.o
|
2009-12-25 00:12:50 +01:00
|
|
|
|
2009-10-11 21:04:29 +02:00
|
|
|
NEED_RC4=y
|
|
|
|
NEED_AES=y
|
|
|
|
NEED_MD5=y
|
|
|
|
NEED_SHA1=y
|
2008-02-28 02:34:43 +01:00
|
|
|
|
2009-04-09 12:40:12 +02:00
|
|
|
OBJS += ../src/drivers/drivers.o
|
|
|
|
CFLAGS += -DHOSTAPD
|
|
|
|
|
2009-12-19 17:40:54 +01:00
|
|
|
ifdef CONFIG_WPA_TRACE
|
|
|
|
CFLAGS += -DWPA_TRACE
|
|
|
|
OBJS += ../src/utils/trace.o
|
2009-12-20 22:35:06 +01:00
|
|
|
LDFLAGS += -rdynamic
|
|
|
|
CFLAGS += -funwind-tables
|
|
|
|
ifdef CONFIG_WPA_TRACE_BFD
|
|
|
|
CFLAGS += -DWPA_TRACE_BFD
|
|
|
|
LIBS += -lbfd
|
|
|
|
LIBS_c += -lbfd
|
|
|
|
endif
|
2009-12-19 17:40:54 +01:00
|
|
|
endif
|
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
OBJS += ../src/utils/eloop.o
|
|
|
|
OBJS += ../src/utils/common.o
|
|
|
|
OBJS += ../src/utils/wpa_debug.o
|
|
|
|
OBJS += ../src/utils/wpabuf.o
|
|
|
|
OBJS += ../src/utils/os_$(CONFIG_OS).o
|
|
|
|
OBJS += ../src/utils/ip_addr.o
|
|
|
|
|
2008-10-29 20:48:14 +01:00
|
|
|
OBJS += ../src/common/ieee802_11_common.o
|
2008-02-28 02:34:43 +01:00
|
|
|
OBJS += ../src/common/wpa_common.o
|
|
|
|
|
2009-11-29 19:03:28 +01:00
|
|
|
OBJS += ../src/eapol_auth/eapol_auth_sm.o
|
|
|
|
|
2009-11-29 19:18:47 +01:00
|
|
|
|
|
|
|
ifndef CONFIG_NO_DUMP_STATE
|
|
|
|
# define HOSTAPD_DUMP_STATE to include SIGUSR1 handler for dumping state to
|
|
|
|
# a file (undefine it, if you want to save in binary size)
|
|
|
|
CFLAGS += -DHOSTAPD_DUMP_STATE
|
|
|
|
OBJS += dump_state.o
|
|
|
|
OBJS += ../src/eapol_auth/eapol_auth_dump.o
|
|
|
|
endif
|
|
|
|
|
2009-01-08 18:15:25 +01:00
|
|
|
ifdef CONFIG_NO_RADIUS
|
|
|
|
CFLAGS += -DCONFIG_NO_RADIUS
|
|
|
|
CONFIG_NO_ACCOUNTING=y
|
|
|
|
else
|
2008-02-28 02:34:43 +01:00
|
|
|
OBJS += ../src/radius/radius.o
|
|
|
|
OBJS += ../src/radius/radius_client.o
|
2009-01-08 18:15:25 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_NO_ACCOUNTING
|
|
|
|
CFLAGS += -DCONFIG_NO_ACCOUNTING
|
|
|
|
else
|
2009-12-25 00:12:50 +01:00
|
|
|
OBJS += ../src/ap/accounting.o
|
2009-01-08 18:15:25 +01:00
|
|
|
endif
|
2008-02-28 02:34:43 +01:00
|
|
|
|
2009-01-12 20:39:19 +01:00
|
|
|
ifdef CONFIG_NO_VLAN
|
|
|
|
CFLAGS += -DCONFIG_NO_VLAN
|
|
|
|
else
|
2009-12-25 00:12:50 +01:00
|
|
|
OBJS += ../src/ap/vlan_init.o
|
2009-01-12 20:39:19 +01:00
|
|
|
endif
|
|
|
|
|
2009-01-12 20:44:57 +01:00
|
|
|
ifdef CONFIG_NO_CTRL_IFACE
|
|
|
|
CFLAGS += -DCONFIG_NO_CTRL_IFACE
|
|
|
|
else
|
|
|
|
OBJS += ctrl_iface.o
|
2009-12-25 11:25:55 +01:00
|
|
|
OBJS += ../src/ap/ctrl_iface_ap.o
|
2009-01-12 20:44:57 +01:00
|
|
|
endif
|
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
OBJS += ../src/crypto/md5.o
|
|
|
|
|
|
|
|
CFLAGS += -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX
|
|
|
|
|
|
|
|
ifdef CONFIG_IAPP
|
|
|
|
CFLAGS += -DCONFIG_IAPP
|
2009-12-25 12:04:45 +01:00
|
|
|
OBJS += ../src/ap/iapp.o
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_RSN_PREAUTH
|
|
|
|
CFLAGS += -DCONFIG_RSN_PREAUTH
|
|
|
|
CONFIG_L2_PACKET=y
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_PEERKEY
|
|
|
|
CFLAGS += -DCONFIG_PEERKEY
|
2009-12-25 23:05:40 +01:00
|
|
|
OBJS += ../src/ap/peerkey_auth.o
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_IEEE80211W
|
|
|
|
CFLAGS += -DCONFIG_IEEE80211W
|
|
|
|
NEED_SHA256=y
|
2009-10-13 09:04:46 +02:00
|
|
|
NEED_AES_OMAC1=y
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_IEEE80211R
|
|
|
|
CFLAGS += -DCONFIG_IEEE80211R
|
2009-12-25 23:05:40 +01:00
|
|
|
OBJS += ../src/ap/wpa_auth_ft.o
|
2008-02-28 02:34:43 +01:00
|
|
|
NEED_SHA256=y
|
2009-10-13 09:04:46 +02:00
|
|
|
NEED_AES_OMAC1=y
|
2009-10-12 08:10:24 +02:00
|
|
|
NEED_AES_UNWRAP=y
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
2008-08-21 17:18:38 +02:00
|
|
|
ifdef CONFIG_IEEE80211N
|
|
|
|
CFLAGS += -DCONFIG_IEEE80211N
|
|
|
|
endif
|
|
|
|
|
2009-08-14 18:53:27 +02:00
|
|
|
include ../src/drivers/drivers.mak
|
|
|
|
OBJS += $(DRV_AP_OBJS)
|
|
|
|
CFLAGS += $(DRV_AP_CFLAGS)
|
|
|
|
LDFLAGS += $(DRV_AP_LDFLAGS)
|
|
|
|
LIBS += $(DRV_AP_LIBS)
|
2008-10-01 13:07:55 +02:00
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
ifdef CONFIG_L2_PACKET
|
|
|
|
ifdef CONFIG_DNET_PCAP
|
|
|
|
ifdef CONFIG_L2_FREEBSD
|
|
|
|
LIBS += -lpcap
|
|
|
|
OBJS += ../src/l2_packet/l2_packet_freebsd.o
|
|
|
|
else
|
|
|
|
LIBS += -ldnet -lpcap
|
|
|
|
OBJS += ../src/l2_packet/l2_packet_pcap.o
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
OBJS += ../src/l2_packet/l2_packet_linux.o
|
|
|
|
endif
|
2008-11-21 14:44:00 +01:00
|
|
|
else
|
|
|
|
OBJS += ../src/l2_packet/l2_packet_none.o
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
ifdef CONFIG_EAP_MD5
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_MD5
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_md5.o
|
2008-02-28 02:34:43 +01:00
|
|
|
CHAP=y
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_EAP_TLS
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_TLS
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_tls.o
|
2008-02-28 02:34:43 +01:00
|
|
|
TLS_FUNCS=y
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_EAP_PEAP
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_PEAP
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_peap.o
|
2008-06-09 09:32:12 +02:00
|
|
|
OBJS += ../src/eap_common/eap_peap_common.o
|
2008-02-28 02:34:43 +01:00
|
|
|
TLS_FUNCS=y
|
|
|
|
CONFIG_EAP_MSCHAPV2=y
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_EAP_TTLS
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_TTLS
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_ttls.o
|
2008-02-28 02:34:43 +01:00
|
|
|
TLS_FUNCS=y
|
|
|
|
CHAP=y
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_EAP_MSCHAPV2
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_MSCHAPV2
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_mschapv2.o
|
2008-02-28 02:34:43 +01:00
|
|
|
MS_FUNCS=y
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_EAP_GTC
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_GTC
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_gtc.o
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_EAP_SIM
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_SIM
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_sim.o
|
2008-02-28 02:34:43 +01:00
|
|
|
CONFIG_EAP_SIM_COMMON=y
|
2009-10-11 21:23:50 +02:00
|
|
|
NEED_AES_CBC=y
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_EAP_AKA
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_AKA
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_aka.o
|
2008-02-28 02:34:43 +01:00
|
|
|
CONFIG_EAP_SIM_COMMON=y
|
2009-05-29 21:35:08 +02:00
|
|
|
NEED_SHA256=y
|
2009-10-11 21:23:50 +02:00
|
|
|
NEED_AES_CBC=y
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
2008-12-02 19:12:49 +01:00
|
|
|
ifdef CONFIG_EAP_AKA_PRIME
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_AKA_PRIME
|
2008-12-02 19:12:49 +01:00
|
|
|
endif
|
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
ifdef CONFIG_EAP_SIM_COMMON
|
|
|
|
OBJS += ../src/eap_common/eap_sim_common.o
|
|
|
|
# Example EAP-SIM/AKA interface for GSM/UMTS authentication. This can be
|
|
|
|
# replaced with another file implementating the interface specified in
|
|
|
|
# eap_sim_db.h.
|
|
|
|
OBJS += ../src/eap_server/eap_sim_db.o
|
|
|
|
NEED_FIPS186_2_PRF=y
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_EAP_PAX
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_PAX
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_pax.o ../src/eap_common/eap_pax_common.o
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_EAP_PSK
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_PSK
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_psk.o ../src/eap_common/eap_psk_common.o
|
2009-10-11 21:23:50 +02:00
|
|
|
NEED_AES_OMAC1=y
|
|
|
|
NEED_AES_ENCBLOCK=y
|
|
|
|
NEED_AES_EAX=y
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_EAP_SAKE
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_SAKE
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_sake.o ../src/eap_common/eap_sake_common.o
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_EAP_GPSK
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_GPSK
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_gpsk.o ../src/eap_common/eap_gpsk_common.o
|
2008-02-28 02:34:43 +01:00
|
|
|
ifdef CONFIG_EAP_GPSK_SHA256
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_GPSK_SHA256
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
NEED_SHA256=y
|
2009-10-11 21:23:50 +02:00
|
|
|
NEED_AES_OMAC1=y
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
2010-09-15 09:51:40 +02:00
|
|
|
ifdef CONFIG_EAP_PWD
|
|
|
|
CFLAGS += -DEAP_SERVER_PWD
|
|
|
|
OBJS += ../src/eap_server/eap_server_pwd.o ../src/eap_common/eap_pwd_common.o
|
|
|
|
NEED_SHA256=y
|
|
|
|
endif
|
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
ifdef CONFIG_EAP_VENDOR_TEST
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_VENDOR_TEST
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_vendor_test.o
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_EAP_FAST
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_FAST
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_fast.o
|
2008-02-28 02:56:30 +01:00
|
|
|
OBJS += ../src/eap_common/eap_fast_common.o
|
2008-02-28 02:34:43 +01:00
|
|
|
TLS_FUNCS=y
|
|
|
|
NEED_T_PRF=y
|
2009-10-12 08:10:24 +02:00
|
|
|
NEED_AES_UNWRAP=y
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
2008-11-23 18:34:26 +01:00
|
|
|
ifdef CONFIG_WPS
|
2010-06-18 03:35:18 +02:00
|
|
|
ifdef CONFIG_WPS2
|
|
|
|
CFLAGS += -DCONFIG_WPS2
|
|
|
|
endif
|
|
|
|
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC
|
2008-11-23 18:34:26 +01:00
|
|
|
OBJS += ../src/utils/uuid.o
|
2009-12-25 00:26:37 +01:00
|
|
|
OBJS += ../src/ap/wps_hostapd.o
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_wsc.o ../src/eap_common/eap_wsc_common.o
|
2008-11-23 18:34:26 +01:00
|
|
|
OBJS += ../src/wps/wps.o
|
|
|
|
OBJS += ../src/wps/wps_common.o
|
2008-11-29 12:16:26 +01:00
|
|
|
OBJS += ../src/wps/wps_attr_parse.o
|
|
|
|
OBJS += ../src/wps/wps_attr_build.o
|
|
|
|
OBJS += ../src/wps/wps_attr_process.o
|
2008-11-23 18:34:26 +01:00
|
|
|
OBJS += ../src/wps/wps_dev_attr.o
|
|
|
|
OBJS += ../src/wps/wps_enrollee.o
|
|
|
|
OBJS += ../src/wps/wps_registrar.o
|
|
|
|
NEED_DH_GROUPS=y
|
|
|
|
NEED_SHA256=y
|
2008-12-26 15:40:27 +01:00
|
|
|
NEED_BASE64=y
|
2009-10-11 19:19:12 +02:00
|
|
|
NEED_AES_CBC=y
|
2009-10-11 21:04:29 +02:00
|
|
|
NEED_MODEXP=y
|
2010-04-17 21:05:18 +02:00
|
|
|
CONFIG_EAP=y
|
2009-01-29 17:47:02 +01:00
|
|
|
|
2009-02-26 21:01:36 +01:00
|
|
|
ifdef CONFIG_WPS_UFD
|
|
|
|
CFLAGS += -DCONFIG_WPS_UFD
|
|
|
|
OBJS += ../src/wps/wps_ufd.o
|
2009-02-26 21:10:21 +01:00
|
|
|
NEED_WPS_OOB=y
|
|
|
|
endif
|
|
|
|
|
2009-03-06 15:16:22 +01:00
|
|
|
ifdef CONFIG_WPS_NFC
|
|
|
|
CFLAGS += -DCONFIG_WPS_NFC
|
|
|
|
OBJS += ../src/wps/ndef.o
|
|
|
|
OBJS += ../src/wps/wps_nfc.o
|
|
|
|
NEED_WPS_OOB=y
|
|
|
|
ifdef CONFIG_WPS_NFC_PN531
|
2009-03-06 15:25:48 +01:00
|
|
|
PN531_PATH ?= /usr/local/src/nfc
|
2009-03-06 15:16:22 +01:00
|
|
|
CFLAGS += -DCONFIG_WPS_NFC_PN531
|
|
|
|
CFLAGS += -I${PN531_PATH}/inc
|
|
|
|
OBJS += ../src/wps/wps_nfc_pn531.o
|
|
|
|
LIBS += ${PN531_PATH}/lib/wpsnfc.dll
|
|
|
|
LIBS += ${PN531_PATH}/lib/libnfc_mapping_pn53x.dll
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2009-02-26 21:10:21 +01:00
|
|
|
ifdef NEED_WPS_OOB
|
|
|
|
CFLAGS += -DCONFIG_WPS_OOB
|
2009-02-26 21:01:36 +01:00
|
|
|
endif
|
|
|
|
|
2009-01-29 17:47:02 +01:00
|
|
|
ifdef CONFIG_WPS_UPNP
|
|
|
|
CFLAGS += -DCONFIG_WPS_UPNP
|
|
|
|
OBJS += ../src/wps/wps_upnp.o
|
|
|
|
OBJS += ../src/wps/wps_upnp_ssdp.o
|
|
|
|
OBJS += ../src/wps/wps_upnp_web.o
|
|
|
|
OBJS += ../src/wps/wps_upnp_event.o
|
2009-12-12 15:54:59 +01:00
|
|
|
OBJS += ../src/wps/wps_upnp_ap.o
|
2009-11-08 13:06:01 +01:00
|
|
|
OBJS += ../src/wps/upnp_xml.o
|
2009-01-29 17:47:02 +01:00
|
|
|
OBJS += ../src/wps/httpread.o
|
2009-11-08 11:35:37 +01:00
|
|
|
OBJS += ../src/wps/http_client.o
|
2009-11-08 16:26:55 +01:00
|
|
|
OBJS += ../src/wps/http_server.o
|
2009-01-29 17:47:02 +01:00
|
|
|
endif
|
|
|
|
|
2010-07-21 07:15:06 +02:00
|
|
|
ifdef CONFIG_WPS_STRICT
|
|
|
|
CFLAGS += -DCONFIG_WPS_STRICT
|
|
|
|
OBJS += ../src/wps/wps_validate.o
|
|
|
|
endif
|
|
|
|
|
2010-09-22 04:51:23 +02:00
|
|
|
ifdef CONFIG_WPS_TESTING
|
|
|
|
CFLAGS += -DCONFIG_WPS_TESTING
|
|
|
|
endif
|
|
|
|
|
2008-11-23 18:34:26 +01:00
|
|
|
endif
|
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
ifdef CONFIG_EAP_IKEV2
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_IKEV2
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_ikev2.o ../src/eap_server/ikev2.o
|
2008-02-28 02:34:43 +01:00
|
|
|
OBJS += ../src/eap_common/eap_ikev2_common.o ../src/eap_common/ikev2_common.o
|
|
|
|
NEED_DH_GROUPS=y
|
2009-10-11 14:24:40 +02:00
|
|
|
NEED_DH_GROUPS_ALL=y
|
2009-10-11 21:04:29 +02:00
|
|
|
NEED_MODEXP=y
|
2009-12-06 13:37:46 +01:00
|
|
|
NEED_CIPHER=y
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
2008-03-09 09:37:18 +01:00
|
|
|
ifdef CONFIG_EAP_TNC
|
2009-03-25 11:06:19 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_TNC
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_tnc.o
|
2008-03-09 09:37:18 +01:00
|
|
|
OBJS += ../src/eap_server/tncs.o
|
|
|
|
NEED_BASE64=y
|
2009-03-21 19:59:07 +01:00
|
|
|
ifndef CONFIG_DRIVER_BSD
|
2009-02-05 18:24:16 +01:00
|
|
|
LIBS += -ldl
|
2008-03-09 09:37:18 +01:00
|
|
|
endif
|
2009-03-21 19:59:07 +01:00
|
|
|
endif
|
2008-03-09 09:37:18 +01:00
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
# Basic EAP functionality is needed for EAPOL
|
2009-12-06 10:28:41 +01:00
|
|
|
OBJS += eap_register.o
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server.o
|
2008-02-28 02:34:43 +01:00
|
|
|
OBJS += ../src/eap_common/eap_common.o
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_methods.o
|
|
|
|
OBJS += ../src/eap_server/eap_server_identity.o
|
2009-12-06 10:28:41 +01:00
|
|
|
CFLAGS += -DEAP_SERVER_IDENTITY
|
2008-02-28 02:34:43 +01:00
|
|
|
|
|
|
|
ifdef CONFIG_EAP
|
|
|
|
CFLAGS += -DEAP_SERVER
|
|
|
|
endif
|
|
|
|
|
2009-10-11 19:34:26 +02:00
|
|
|
ifdef CONFIG_PKCS12
|
|
|
|
CFLAGS += -DPKCS12_FUNCS
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MS_FUNCS
|
|
|
|
OBJS += ../src/crypto/ms_funcs.o
|
2009-10-11 21:04:29 +02:00
|
|
|
NEED_DES=y
|
|
|
|
NEED_MD4=y
|
2009-10-11 19:34:26 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CHAP
|
|
|
|
OBJS += ../src/eap_common/chap.o
|
|
|
|
endif
|
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
ifdef TLS_FUNCS
|
2009-10-11 21:04:29 +02:00
|
|
|
NEED_DES=y
|
2008-02-28 02:34:43 +01:00
|
|
|
# Shared TLS functions (needed for EAP_TLS, EAP_PEAP, and EAP_TTLS)
|
|
|
|
CFLAGS += -DEAP_TLS_FUNCS
|
2010-02-19 17:54:07 +01:00
|
|
|
OBJS += ../src/eap_server/eap_server_tls_common.o
|
2009-01-12 14:20:12 +01:00
|
|
|
NEED_TLS_PRF=y
|
2009-10-11 18:42:04 +02:00
|
|
|
endif
|
|
|
|
|
2009-10-11 21:04:29 +02:00
|
|
|
ifndef CONFIG_TLS
|
|
|
|
CONFIG_TLS=openssl
|
|
|
|
endif
|
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
ifeq ($(CONFIG_TLS), openssl)
|
2009-10-11 21:04:29 +02:00
|
|
|
ifdef TLS_FUNCS
|
2008-02-28 02:34:43 +01:00
|
|
|
OBJS += ../src/crypto/tls_openssl.o
|
2009-10-11 21:04:29 +02:00
|
|
|
LIBS += -lssl
|
|
|
|
endif
|
|
|
|
OBJS += ../src/crypto/crypto_openssl.o
|
|
|
|
HOBJS += ../src/crypto/crypto_openssl.o
|
|
|
|
ifdef NEED_FIPS186_2_PRF
|
|
|
|
OBJS += ../src/crypto/fips_prf_openssl.o
|
|
|
|
endif
|
|
|
|
LIBS += -lcrypto
|
2008-02-28 02:34:43 +01:00
|
|
|
LIBS_h += -lcrypto
|
|
|
|
endif
|
2009-10-11 21:04:29 +02:00
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
ifeq ($(CONFIG_TLS), gnutls)
|
2009-10-11 21:04:29 +02:00
|
|
|
ifdef TLS_FUNCS
|
2008-02-28 02:34:43 +01:00
|
|
|
OBJS += ../src/crypto/tls_gnutls.o
|
2009-10-11 21:04:29 +02:00
|
|
|
LIBS += -lgnutls -lgpg-error
|
2008-02-28 02:34:43 +01:00
|
|
|
ifdef CONFIG_GNUTLS_EXTRA
|
|
|
|
CFLAGS += -DCONFIG_GNUTLS_EXTRA
|
|
|
|
LIBS += -lgnutls-extra
|
|
|
|
endif
|
2009-10-11 18:42:04 +02:00
|
|
|
endif
|
2009-10-11 21:04:29 +02:00
|
|
|
OBJS += ../src/crypto/crypto_gnutls.o
|
|
|
|
HOBJS += ../src/crypto/crypto_gnutls.o
|
|
|
|
ifdef NEED_FIPS186_2_PRF
|
|
|
|
OBJS += ../src/crypto/fips_prf_gnutls.o
|
|
|
|
endif
|
|
|
|
LIBS += -lgcrypt
|
|
|
|
LIBS_h += -lgcrypt
|
|
|
|
CONFIG_INTERNAL_SHA256=y
|
|
|
|
CONFIG_INTERNAL_RC4=y
|
|
|
|
CONFIG_INTERNAL_DH_GROUP5=y
|
|
|
|
endif
|
|
|
|
|
2009-10-11 18:42:04 +02:00
|
|
|
ifeq ($(CONFIG_TLS), schannel)
|
2009-10-11 21:04:29 +02:00
|
|
|
ifdef TLS_FUNCS
|
2009-10-11 18:42:04 +02:00
|
|
|
OBJS += ../src/crypto/tls_schannel.o
|
|
|
|
endif
|
2009-10-11 21:04:29 +02:00
|
|
|
OBJS += ../src/crypto/crypto_cryptoapi.o
|
|
|
|
OBJS_p += ../src/crypto/crypto_cryptoapi.o
|
|
|
|
CONFIG_INTERNAL_SHA256=y
|
|
|
|
CONFIG_INTERNAL_RC4=y
|
|
|
|
CONFIG_INTERNAL_DH_GROUP5=y
|
|
|
|
endif
|
|
|
|
|
2009-10-11 18:42:04 +02:00
|
|
|
ifeq ($(CONFIG_TLS), nss)
|
2009-10-11 21:04:29 +02:00
|
|
|
ifdef TLS_FUNCS
|
2009-10-11 18:42:04 +02:00
|
|
|
OBJS += ../src/crypto/tls_nss.o
|
2009-10-11 21:04:29 +02:00
|
|
|
LIBS += -lssl3
|
|
|
|
endif
|
|
|
|
OBJS += ../src/crypto/crypto_nss.o
|
|
|
|
ifdef NEED_FIPS186_2_PRF
|
|
|
|
OBJS += ../src/crypto/fips_prf_nss.o
|
|
|
|
endif
|
|
|
|
LIBS += -lnss3
|
2009-10-11 18:42:04 +02:00
|
|
|
LIBS_h += -lnss3
|
2009-10-11 21:04:29 +02:00
|
|
|
CONFIG_INTERNAL_MD4=y
|
|
|
|
CONFIG_INTERNAL_DH_GROUP5=y
|
2009-10-11 18:42:04 +02:00
|
|
|
endif
|
2009-10-11 21:04:29 +02:00
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
ifeq ($(CONFIG_TLS), internal)
|
2009-10-11 21:04:29 +02:00
|
|
|
ifndef CONFIG_CRYPTO
|
|
|
|
CONFIG_CRYPTO=internal
|
|
|
|
endif
|
|
|
|
ifdef TLS_FUNCS
|
2009-12-06 13:37:46 +01:00
|
|
|
OBJS += ../src/crypto/crypto_internal-rsa.o
|
2008-02-28 02:34:43 +01:00
|
|
|
OBJS += ../src/crypto/tls_internal.o
|
2009-10-11 21:04:29 +02:00
|
|
|
OBJS += ../src/tls/tlsv1_common.o
|
|
|
|
OBJS += ../src/tls/tlsv1_record.o
|
|
|
|
OBJS += ../src/tls/tlsv1_cred.o
|
|
|
|
OBJS += ../src/tls/tlsv1_server.o
|
|
|
|
OBJS += ../src/tls/tlsv1_server_write.o
|
|
|
|
OBJS += ../src/tls/tlsv1_server_read.o
|
|
|
|
OBJS += ../src/tls/asn1.o
|
|
|
|
OBJS += ../src/tls/rsa.o
|
|
|
|
OBJS += ../src/tls/x509v3.o
|
2009-10-17 11:48:55 +02:00
|
|
|
OBJS += ../src/tls/pkcs1.o
|
|
|
|
OBJS += ../src/tls/pkcs5.o
|
|
|
|
OBJS += ../src/tls/pkcs8.o
|
2009-12-06 15:19:13 +01:00
|
|
|
NEED_SHA256=y
|
2008-02-28 02:34:43 +01:00
|
|
|
NEED_BASE64=y
|
2009-10-11 21:04:29 +02:00
|
|
|
NEED_TLS_PRF=y
|
|
|
|
NEED_MODEXP=y
|
2009-12-06 13:37:46 +01:00
|
|
|
NEED_CIPHER=y
|
2008-02-28 02:34:43 +01:00
|
|
|
CFLAGS += -DCONFIG_TLS_INTERNAL
|
|
|
|
CFLAGS += -DCONFIG_TLS_INTERNAL_SERVER
|
|
|
|
endif
|
2009-12-06 13:37:46 +01:00
|
|
|
ifdef NEED_CIPHER
|
|
|
|
NEED_DES=y
|
|
|
|
OBJS += ../src/crypto/crypto_internal-cipher.o
|
|
|
|
endif
|
2009-10-11 21:04:29 +02:00
|
|
|
ifdef NEED_MODEXP
|
2009-12-06 13:37:46 +01:00
|
|
|
OBJS += ../src/crypto/crypto_internal-modexp.o
|
2009-10-11 21:04:29 +02:00
|
|
|
OBJS += ../src/tls/bignum.o
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(CONFIG_CRYPTO), libtomcrypt)
|
2009-10-11 21:04:29 +02:00
|
|
|
OBJS += ../src/crypto/crypto_libtomcrypt.o
|
2008-02-28 02:34:43 +01:00
|
|
|
LIBS += -ltomcrypt -ltfm
|
2009-10-11 18:42:04 +02:00
|
|
|
LIBS_h += -ltomcrypt -ltfm
|
2008-02-28 02:34:43 +01:00
|
|
|
CONFIG_INTERNAL_SHA256=y
|
2009-08-16 19:13:14 +02:00
|
|
|
CONFIG_INTERNAL_RC4=y
|
2009-10-11 18:17:22 +02:00
|
|
|
CONFIG_INTERNAL_DH_GROUP5=y
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
ifeq ($(CONFIG_CRYPTO), internal)
|
2009-10-11 21:04:29 +02:00
|
|
|
OBJS += ../src/crypto/crypto_internal.o
|
2009-11-24 09:24:54 +01:00
|
|
|
NEED_AES_DEC=y
|
2008-02-28 02:34:43 +01:00
|
|
|
CFLAGS += -DCONFIG_CRYPTO_INTERNAL
|
2009-05-26 16:09:04 +02:00
|
|
|
ifdef CONFIG_INTERNAL_LIBTOMMATH
|
|
|
|
CFLAGS += -DCONFIG_INTERNAL_LIBTOMMATH
|
|
|
|
ifdef CONFIG_INTERNAL_LIBTOMMATH_FAST
|
|
|
|
CFLAGS += -DLTM_FAST
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
LIBS += -ltommath
|
2009-10-11 18:42:04 +02:00
|
|
|
LIBS_h += -ltommath
|
2009-05-26 16:09:04 +02:00
|
|
|
endif
|
2008-02-28 02:34:43 +01:00
|
|
|
CONFIG_INTERNAL_AES=y
|
|
|
|
CONFIG_INTERNAL_DES=y
|
|
|
|
CONFIG_INTERNAL_SHA1=y
|
|
|
|
CONFIG_INTERNAL_MD4=y
|
|
|
|
CONFIG_INTERNAL_MD5=y
|
|
|
|
CONFIG_INTERNAL_SHA256=y
|
2009-08-16 19:13:14 +02:00
|
|
|
CONFIG_INTERNAL_RC4=y
|
2009-10-11 18:17:22 +02:00
|
|
|
CONFIG_INTERNAL_DH_GROUP5=y
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
2009-10-11 21:04:29 +02:00
|
|
|
ifeq ($(CONFIG_CRYPTO), cryptoapi)
|
|
|
|
OBJS += ../src/crypto/crypto_cryptoapi.o
|
|
|
|
OBJS_p += ../src/crypto/crypto_cryptoapi.o
|
|
|
|
CFLAGS += -DCONFIG_CRYPTO_CRYPTOAPI
|
|
|
|
CONFIG_INTERNAL_SHA256=y
|
|
|
|
CONFIG_INTERNAL_RC4=y
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
2009-10-11 21:04:29 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_TLS), none)
|
|
|
|
ifdef TLS_FUNCS
|
|
|
|
OBJS += ../src/crypto/tls_none.o
|
|
|
|
CFLAGS += -DEAP_TLS_NONE
|
2008-02-28 02:34:43 +01:00
|
|
|
CONFIG_INTERNAL_AES=y
|
|
|
|
CONFIG_INTERNAL_SHA1=y
|
|
|
|
CONFIG_INTERNAL_MD5=y
|
2009-10-11 21:04:29 +02:00
|
|
|
endif
|
|
|
|
OBJS += ../src/crypto/crypto_none.o
|
|
|
|
OBJS_p += ../src/crypto/crypto_none.o
|
|
|
|
CONFIG_INTERNAL_SHA256=y
|
2009-08-16 19:13:14 +02:00
|
|
|
CONFIG_INTERNAL_RC4=y
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
2009-10-11 21:04:29 +02:00
|
|
|
ifndef TLS_FUNCS
|
|
|
|
OBJS += ../src/crypto/tls_none.o
|
|
|
|
ifeq ($(CONFIG_TLS), internal)
|
|
|
|
CONFIG_INTERNAL_AES=y
|
|
|
|
CONFIG_INTERNAL_SHA1=y
|
|
|
|
CONFIG_INTERNAL_MD5=y
|
|
|
|
CONFIG_INTERNAL_RC4=y
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
AESOBJS = # none so far
|
2008-02-28 02:34:43 +01:00
|
|
|
ifdef CONFIG_INTERNAL_AES
|
2009-08-13 10:21:32 +02:00
|
|
|
AESOBJS += ../src/crypto/aes-internal.o ../src/crypto/aes-internal-enc.o
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
2009-10-11 21:04:29 +02:00
|
|
|
|
|
|
|
AESOBJS += ../src/crypto/aes-wrap.o
|
2009-10-11 21:23:50 +02:00
|
|
|
ifdef NEED_AES_EAX
|
2009-10-11 21:04:29 +02:00
|
|
|
AESOBJS += ../src/crypto/aes-eax.o
|
2009-10-11 21:23:50 +02:00
|
|
|
NEED_AES_CTR=y
|
|
|
|
endif
|
|
|
|
ifdef NEED_AES_CTR
|
|
|
|
AESOBJS += ../src/crypto/aes-ctr.o
|
|
|
|
endif
|
|
|
|
ifdef NEED_AES_ENCBLOCK
|
2009-10-11 21:04:29 +02:00
|
|
|
AESOBJS += ../src/crypto/aes-encblock.o
|
2009-10-11 21:23:50 +02:00
|
|
|
endif
|
|
|
|
ifdef NEED_AES_OMAC1
|
2009-10-11 21:04:29 +02:00
|
|
|
AESOBJS += ../src/crypto/aes-omac1.o
|
2009-10-11 21:23:50 +02:00
|
|
|
endif
|
|
|
|
ifdef NEED_AES_UNWRAP
|
2009-10-13 09:04:46 +02:00
|
|
|
NEED_AES_DEC=y
|
2009-10-11 21:04:29 +02:00
|
|
|
AESOBJS += ../src/crypto/aes-unwrap.o
|
|
|
|
endif
|
|
|
|
ifdef NEED_AES_CBC
|
2009-10-13 09:04:46 +02:00
|
|
|
NEED_AES_DEC=y
|
|
|
|
AESOBJS += ../src/crypto/aes-cbc.o
|
|
|
|
endif
|
|
|
|
ifdef NEED_AES_DEC
|
2009-10-11 21:04:29 +02:00
|
|
|
ifdef CONFIG_INTERNAL_AES
|
|
|
|
AESOBJS += ../src/crypto/aes-internal-dec.o
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
ifdef NEED_AES
|
|
|
|
OBJS += $(AESOBJS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NEED_SHA1
|
|
|
|
SHA1OBJS += ../src/crypto/sha1.o
|
2008-02-28 02:34:43 +01:00
|
|
|
ifdef CONFIG_INTERNAL_SHA1
|
2009-08-11 19:19:37 +02:00
|
|
|
SHA1OBJS += ../src/crypto/sha1-internal.o
|
2009-08-11 19:06:23 +02:00
|
|
|
ifdef NEED_FIPS186_2_PRF
|
2009-08-11 19:19:37 +02:00
|
|
|
SHA1OBJS += ../src/crypto/fips_prf_internal.o
|
2009-08-11 19:06:23 +02:00
|
|
|
endif
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
2009-10-11 21:04:29 +02:00
|
|
|
SHA1OBJS += ../src/crypto/sha1-pbkdf2.o
|
|
|
|
ifdef NEED_T_PRF
|
|
|
|
SHA1OBJS += ../src/crypto/sha1-tprf.o
|
|
|
|
endif
|
|
|
|
ifdef NEED_TLS_PRF
|
|
|
|
SHA1OBJS += ../src/crypto/sha1-tlsprf.o
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NEED_SHA1
|
|
|
|
OBJS += $(SHA1OBJS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NEED_MD5
|
2008-02-28 02:34:43 +01:00
|
|
|
ifdef CONFIG_INTERNAL_MD5
|
2009-07-28 20:36:13 +02:00
|
|
|
OBJS += ../src/crypto/md5-internal.o
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
2009-10-11 21:04:29 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NEED_MD4
|
2008-02-28 02:34:43 +01:00
|
|
|
ifdef CONFIG_INTERNAL_MD4
|
2009-07-28 20:27:02 +02:00
|
|
|
OBJS += ../src/crypto/md4-internal.o
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
2009-10-11 21:04:29 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NEED_DES
|
2008-02-28 02:34:43 +01:00
|
|
|
ifdef CONFIG_INTERNAL_DES
|
2009-07-28 20:00:44 +02:00
|
|
|
OBJS += ../src/crypto/des-internal.o
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
2009-10-11 21:04:29 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NEED_RC4
|
2009-08-16 19:13:14 +02:00
|
|
|
ifdef CONFIG_INTERNAL_RC4
|
|
|
|
OBJS += ../src/crypto/rc4.o
|
|
|
|
endif
|
2009-10-11 21:04:29 +02:00
|
|
|
endif
|
2008-02-28 02:34:43 +01:00
|
|
|
|
|
|
|
ifdef NEED_SHA256
|
|
|
|
OBJS += ../src/crypto/sha256.o
|
2009-07-28 20:20:04 +02:00
|
|
|
ifdef CONFIG_INTERNAL_SHA256
|
|
|
|
OBJS += ../src/crypto/sha256-internal.o
|
|
|
|
endif
|
2008-02-28 02:34:43 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NEED_DH_GROUPS
|
|
|
|
OBJS += ../src/crypto/dh_groups.o
|
|
|
|
endif
|
2009-10-11 18:17:22 +02:00
|
|
|
ifdef NEED_DH_GROUPS_ALL
|
|
|
|
CFLAGS += -DALL_DH_GROUPS
|
|
|
|
endif
|
2009-12-11 16:24:42 +01:00
|
|
|
ifdef CONFIG_INTERNAL_DH_GROUP5
|
|
|
|
ifdef NEED_DH_GROUPS
|
|
|
|
OBJS += ../src/crypto/dh_group5.o
|
|
|
|
endif
|
2009-10-11 18:17:22 +02:00
|
|
|
endif
|
2008-02-28 02:34:43 +01:00
|
|
|
|
|
|
|
ifdef CONFIG_RADIUS_SERVER
|
|
|
|
CFLAGS += -DRADIUS_SERVER
|
|
|
|
OBJS += ../src/radius/radius_server.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_IPV6
|
|
|
|
CFLAGS += -DCONFIG_IPV6
|
|
|
|
endif
|
|
|
|
|
2008-03-12 10:43:55 +01:00
|
|
|
ifdef CONFIG_DRIVER_RADIUS_ACL
|
|
|
|
CFLAGS += -DCONFIG_DRIVER_RADIUS_ACL
|
|
|
|
endif
|
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
ifdef CONFIG_FULL_DYNAMIC_VLAN
|
|
|
|
# define CONFIG_FULL_DYNAMIC_VLAN to have hostapd manipulate bridges
|
|
|
|
# and vlan interfaces for the vlan feature.
|
|
|
|
CFLAGS += -DCONFIG_FULL_DYNAMIC_VLAN
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NEED_BASE64
|
|
|
|
OBJS += ../src/utils/base64.o
|
|
|
|
endif
|
|
|
|
|
2009-08-14 18:53:27 +02:00
|
|
|
ifdef NEED_AP_MLME
|
2009-12-25 00:12:50 +01:00
|
|
|
OBJS += ../src/ap/beacon.o
|
|
|
|
OBJS += ../src/ap/wmm.o
|
|
|
|
OBJS += ../src/ap/ap_list.o
|
|
|
|
OBJS += ../src/ap/ieee802_11.o
|
2009-12-25 19:06:07 +01:00
|
|
|
OBJS += ../src/ap/hw_features.o
|
2010-09-05 11:41:15 +02:00
|
|
|
CFLAGS += -DNEED_AP_MLME
|
|
|
|
endif
|
2009-12-06 18:41:47 +01:00
|
|
|
ifdef CONFIG_IEEE80211N
|
2009-12-25 00:12:50 +01:00
|
|
|
OBJS += ../src/ap/ieee802_11_ht.o
|
2009-12-06 18:41:47 +01:00
|
|
|
endif
|
2009-01-08 17:40:14 +01:00
|
|
|
|
2010-10-08 17:16:07 +02:00
|
|
|
ifdef CONFIG_P2P_MANAGER
|
|
|
|
CFLAGS += -DCONFIG_P2P_MANAGER
|
|
|
|
OBJS += ../src/ap/p2p_hostapd.o
|
|
|
|
endif
|
|
|
|
|
2009-01-08 15:47:04 +01:00
|
|
|
ifdef CONFIG_NO_STDOUT_DEBUG
|
|
|
|
CFLAGS += -DCONFIG_NO_STDOUT_DEBUG
|
|
|
|
endif
|
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
ALL=hostapd hostapd_cli
|
|
|
|
|
|
|
|
all: verify_config $(ALL)
|
|
|
|
|
2009-07-24 02:11:29 +02:00
|
|
|
Q=@
|
|
|
|
E=echo
|
|
|
|
ifeq ($(V), 1)
|
|
|
|
Q=
|
|
|
|
E=true
|
|
|
|
endif
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
|
|
|
|
@$(E) " CC " $<
|
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
verify_config:
|
|
|
|
@if [ ! -r .config ]; then \
|
|
|
|
echo 'Building hostapd requires a configuration file'; \
|
|
|
|
echo '(.config). See README for more instructions. You can'; \
|
|
|
|
echo 'run "cp defconfig .config" to create an example'; \
|
|
|
|
echo 'configuration.'; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
install: all
|
2010-04-06 16:12:17 +02:00
|
|
|
for i in $(ALL); do cp -f $$i /usr/local/bin/$$i; done
|
2008-02-28 02:34:43 +01:00
|
|
|
|
2009-08-14 19:40:37 +02:00
|
|
|
../src/drivers/build.hostapd:
|
2010-04-17 16:15:23 +02:00
|
|
|
@if [ -f ../src/drivers/build.wpa_supplicant ]; then \
|
2009-08-14 19:40:37 +02:00
|
|
|
$(MAKE) -C ../src/drivers clean; \
|
|
|
|
fi
|
|
|
|
@touch ../src/drivers/build.hostapd
|
|
|
|
|
|
|
|
BCHECK=../src/drivers/build.hostapd
|
|
|
|
|
|
|
|
hostapd: $(BCHECK) $(OBJS)
|
2009-08-16 08:47:56 +02:00
|
|
|
$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
|
2008-02-28 02:34:43 +01:00
|
|
|
|
|
|
|
OBJS_c = hostapd_cli.o ../src/common/wpa_ctrl.o ../src/utils/os_$(CONFIG_OS).o
|
2009-12-19 20:47:56 +01:00
|
|
|
ifdef CONFIG_WPA_TRACE
|
|
|
|
OBJS_c += ../src/utils/trace.o
|
|
|
|
OBJS_c += ../src/utils/wpa_debug.o
|
|
|
|
endif
|
2008-02-28 02:34:43 +01:00
|
|
|
hostapd_cli: $(OBJS_c)
|
2009-12-20 22:35:06 +01:00
|
|
|
$(CC) $(LDFLAGS) -o hostapd_cli $(OBJS_c) $(LIBS_c)
|
2008-02-28 02:34:43 +01:00
|
|
|
|
2010-01-16 09:38:53 +01:00
|
|
|
NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS) ../src/crypto/md5.o
|
|
|
|
ifdef NEED_RC4
|
|
|
|
ifdef CONFIG_INTERNAL_RC4
|
|
|
|
NOBJS += ../src/crypto/rc4.o
|
|
|
|
endif
|
|
|
|
endif
|
2009-07-28 20:36:13 +02:00
|
|
|
ifdef CONFIG_INTERNAL_MD5
|
|
|
|
NOBJS += ../src/crypto/md5-internal.o
|
|
|
|
endif
|
2008-02-28 02:34:43 +01:00
|
|
|
NOBJS += ../src/crypto/crypto_openssl.o ../src/utils/os_$(CONFIG_OS).o
|
2010-01-16 09:38:53 +01:00
|
|
|
NOBJS += ../src/utils/wpa_debug.o
|
|
|
|
NOBJS += ../src/utils/wpabuf.o
|
|
|
|
ifdef CONFIG_WPA_TRACE
|
|
|
|
NOBJS += ../src/utils/trace.o
|
|
|
|
LIBS_n += -lbfd
|
|
|
|
endif
|
2008-02-28 02:34:43 +01:00
|
|
|
ifdef TLS_FUNCS
|
|
|
|
LIBS_n += -lcrypto
|
|
|
|
endif
|
|
|
|
|
2009-12-06 15:33:19 +01:00
|
|
|
HOBJS += hlr_auc_gw.o ../src/utils/common.o ../src/utils/wpa_debug.o ../src/utils/os_$(CONFIG_OS).o ../src/utils/wpabuf.o ../src/crypto/milenage.o
|
2009-08-13 10:50:52 +02:00
|
|
|
HOBJS += ../src/crypto/aes-encblock.o
|
|
|
|
ifdef CONFIG_INTERNAL_AES
|
|
|
|
HOBJS += ../src/crypto/aes-internal.o
|
|
|
|
HOBJS += ../src/crypto/aes-internal-enc.o
|
|
|
|
endif
|
2009-07-28 20:09:57 +02:00
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
nt_password_hash: $(NOBJS)
|
2009-08-16 08:47:56 +02:00
|
|
|
$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n)
|
2008-02-28 02:34:43 +01:00
|
|
|
|
|
|
|
hlr_auc_gw: $(HOBJS)
|
2009-08-16 08:47:56 +02:00
|
|
|
$(CC) $(LDFLAGS) -o hlr_auc_gw $(HOBJS) $(LIBS_h)
|
2008-02-28 02:34:43 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
$(MAKE) -C ../src clean
|
|
|
|
rm -f core *~ *.o hostapd hostapd_cli nt_password_hash hlr_auc_gw
|
|
|
|
rm -f *.d
|
|
|
|
|
|
|
|
-include $(OBJS:%.o=%.d)
|