2015-02-08 12:35:34 +01:00
|
|
|
include ../CapwapConfig.mak
|
2015-02-01 16:49:34 +01:00
|
|
|
include ../Macros.mak
|
2014-11-02 07:34:17 +01:00
|
|
|
|
2014-07-20 07:54:39 +02:00
|
|
|
ifndef CC
|
|
|
|
CC=gcc
|
|
|
|
endif
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2014-07-20 07:54:39 +02:00
|
|
|
ifndef AR
|
|
|
|
AR = ar
|
2014-07-11 22:12:11 +02:00
|
|
|
endif
|
|
|
|
|
2014-07-20 07:54:39 +02:00
|
|
|
ifndef ARCH
|
|
|
|
ARCH = $(shell $(CC) -dumpmachine)
|
|
|
|
endif
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2015-02-08 12:35:34 +01:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2015-02-01 16:49:34 +01:00
|
|
|
#OPENSSLINC=$(OPENSSLINC)
|
|
|
|
#../contrib/openssl-1.0.1i/include
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
NAME=libcapwap.a
|
|
|
|
|
|
|
|
SOCKOBJS=sock_create.o sock_copyaddr.o sock_strtoaddr.o sock_cmpaddr.o sock_addrlen.o \
|
2015-03-28 12:51:34 +01:00
|
|
|
sock_mwait.o sock_addrtostr.o \
|
2014-07-11 22:12:11 +02:00
|
|
|
sock_setport.o \
|
|
|
|
sock_getport.o \
|
|
|
|
sock_getifaddr.o \
|
|
|
|
sock_getifhwaddr.o \
|
|
|
|
sock_hwaddrtostr.o \
|
|
|
|
sock_set_recvtimeout.o \
|
|
|
|
sock_getbroadcastaddr.o \
|
|
|
|
sock_addrinit.o \
|
2014-07-14 22:45:22 +02:00
|
|
|
sock_set_dontfrag.o \
|
2015-03-29 01:55:06 +01:00
|
|
|
sock_get_primary_if.o \
|
|
|
|
sock_receive.o \
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
LOGOBJS=cw_log.o \
|
|
|
|
cw_log_debug.o \
|
|
|
|
cw_log_tofile.o \
|
2015-02-07 10:52:30 +01:00
|
|
|
cw_log_tosyslog.o \
|
2015-04-05 02:07:59 +02:00
|
|
|
cw_log_str2dbglevel.o \
|
|
|
|
cw_dbg_elem.o
|
|
|
|
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
WTPINFOOBJS = wtpinfo_set_location.o \
|
2014-07-20 07:54:39 +02:00
|
|
|
wtpinfo_print.o
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2014-08-18 01:40:35 +02:00
|
|
|
UTILOBJS= \
|
|
|
|
cw_setstr.o \
|
|
|
|
cw_is_printable.o \
|
|
|
|
cw_rand.o \
|
|
|
|
cw_foreach_msgelem.o \
|
|
|
|
avltree.o \
|
2015-04-05 02:07:59 +02:00
|
|
|
avltree_get_node.o \
|
2014-08-18 01:40:35 +02:00
|
|
|
avltree_del_all.o \
|
2015-04-05 02:07:59 +02:00
|
|
|
avltree_foreach_lr.o \
|
|
|
|
avltree_foreach_rl.o \
|
|
|
|
avltree_foreach_from_lr.o \
|
2014-08-18 01:40:35 +02:00
|
|
|
stravltree.o \
|
2015-03-15 14:32:42 +01:00
|
|
|
cw_util.o \
|
2015-04-05 02:07:59 +02:00
|
|
|
cw_format_version.o \
|
|
|
|
cw_msg_init.o
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2015-03-23 07:48:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
# LWAPP objs
|
|
|
|
LWAPPOBJS = \
|
|
|
|
lw_checksum.o \
|
2015-03-23 22:26:05 +01:00
|
|
|
lw_put_ac_descriptor.o \
|
2015-03-24 20:14:26 +01:00
|
|
|
lw_put_cisco_path_mtu.o \
|
2015-03-23 07:48:27 +01:00
|
|
|
lw_readelem_wtp_name.o \
|
2015-03-28 08:29:59 +01:00
|
|
|
lw_put_80211_wtp_wlan_radio_configuration.o \
|
2015-03-28 18:31:33 +01:00
|
|
|
lw_readelem_vendor_specific.o \
|
|
|
|
lw_vendor_id_to_str.o \
|
|
|
|
lw_elem_id_to_str.o \
|
|
|
|
lw_msg_id_to_str.o \
|
2015-04-05 02:07:59 +02:00
|
|
|
lw_cisco_id_to_str.o \
|
|
|
|
lw_put_sockaddr.o \
|
2015-03-28 18:31:33 +01:00
|
|
|
|
2015-03-23 07:48:27 +01:00
|
|
|
|
2015-03-24 20:14:26 +01:00
|
|
|
|
2015-03-23 07:48:27 +01:00
|
|
|
# LWAPP cisco vendor specific objs
|
|
|
|
LWAPPCISCOOBJS = \
|
|
|
|
lw_addelem.o
|
|
|
|
|
|
|
|
|
2014-08-16 15:12:35 +02:00
|
|
|
# cw_tohex.o\
|
2014-07-11 22:12:11 +02:00
|
|
|
#capwap_parse_ctrlhdr.o \
|
|
|
|
|
2015-03-23 07:48:27 +01:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
CAPWAPOBJS= \
|
|
|
|
cwmsg_init.o \
|
|
|
|
cwmsg_init_echo_request.o \
|
|
|
|
cwmsg_addelem.o \
|
2014-08-17 18:29:30 +02:00
|
|
|
cwmsg_vaddelem.o \
|
2014-07-11 22:12:11 +02:00
|
|
|
cwmsg_addelem_ac_descriptor.o \
|
|
|
|
cwmsg_addelem_wtp_descriptor.o \
|
|
|
|
cwmsg_addelem_wtp_radio_infos.o \
|
|
|
|
cwmsg_addelem_wtp_board_data.o \
|
|
|
|
cwmsg_addelem_cw_local_ip_addr.o \
|
|
|
|
cwmsg_addelem_mtu_discovery_padding.o \
|
2014-08-12 15:45:05 +02:00
|
|
|
cwmsg_addelem_ac_timestamp.o \
|
2015-03-23 22:26:05 +01:00
|
|
|
cw_addelem_vendor_specific_payload.o \
|
2014-08-17 18:29:30 +02:00
|
|
|
cwmsg_addelem_maximum_message_length.o \
|
|
|
|
cwmsg_addelem_image_identifier.o \
|
2014-07-11 22:12:11 +02:00
|
|
|
cwmsg_send.o \
|
2014-08-22 22:38:11 +02:00
|
|
|
cwsend_change_state_event_response.o \
|
2014-08-23 09:37:48 +02:00
|
|
|
cwsend_unknow_response.o \
|
2014-07-11 22:12:11 +02:00
|
|
|
cwsend_discovery_response.o \
|
|
|
|
cwread_discovery_response.o \
|
|
|
|
cwsend_discovery_request.o \
|
2015-03-17 01:10:08 +01:00
|
|
|
cw_read_image_data_request.o \
|
|
|
|
cw_send_image_data_response.o \
|
2015-03-29 01:55:06 +01:00
|
|
|
cw_send_configuration_update_response.o \
|
2014-07-11 22:12:11 +02:00
|
|
|
cwread_join_response.o \
|
2015-03-16 21:41:33 +01:00
|
|
|
cwsend_echo_request.o \
|
|
|
|
cw_send_echo_response.o \
|
|
|
|
cw_send_image_file.o \
|
|
|
|
cw_handle_echo_request.o \
|
2014-08-16 09:10:38 +02:00
|
|
|
cwsend_conf_status_response.o\
|
2014-08-18 00:05:46 +02:00
|
|
|
cwread_configuration_status_request.o\
|
2014-08-25 23:37:49 +02:00
|
|
|
cwread_discovery_request.o\
|
2014-08-18 01:40:35 +02:00
|
|
|
cwread_change_state_event_request.o\
|
2014-08-23 09:37:48 +02:00
|
|
|
cwread_wtp_event_request.o \
|
2014-08-15 01:31:17 +02:00
|
|
|
process_conf_status_request.o \
|
2014-07-11 22:12:11 +02:00
|
|
|
wtpinfo_readelem_wtp_board_data.o \
|
|
|
|
wtpinfo_readelem_wtp_mac_type.o \
|
|
|
|
wtpinfo_readelem_wtp_radio_info.o \
|
2015-03-19 21:51:28 +01:00
|
|
|
cw_readelem_80211_wtp_radio_info.o \
|
|
|
|
cwmsg_addelem_80211_add_wlan.o \
|
2014-07-11 22:12:11 +02:00
|
|
|
wtpinfo_readelem_wtp_descriptor.o \
|
|
|
|
wtpinfo_readelem_discovery_type.o \
|
|
|
|
wtpinfo_readelem_wtp_frame_tunnel_mode.o \
|
|
|
|
wtpinfo_readelem_location_data.o \
|
|
|
|
wtpinfo_readelem_wtp_name.o \
|
|
|
|
wtpinfo_readelem_session_id.o \
|
|
|
|
wtpinfo.o \
|
|
|
|
aciplist.o \
|
|
|
|
acinfo.o \
|
2014-07-26 11:10:32 +02:00
|
|
|
acinfo_print.o \
|
2014-07-26 20:27:57 +02:00
|
|
|
lwmsg_init.o \
|
2014-07-26 11:10:32 +02:00
|
|
|
wtpinfo_lwreadelem_wtp_descriptor.o \
|
2014-07-31 17:56:57 +02:00
|
|
|
hdr_print.o \
|
2014-08-14 17:16:54 +02:00
|
|
|
cw_readelem_ecn_support.o \
|
2015-01-08 19:33:00 +01:00
|
|
|
cw_readelem_maximum_message_length.o \
|
2014-08-18 01:40:35 +02:00
|
|
|
cw_readelem_result_code.o\
|
2015-03-15 14:32:42 +01:00
|
|
|
cw_readelem_ac_name.o \
|
|
|
|
cw_readelem_ac_descriptor.o \
|
2014-08-18 00:05:46 +02:00
|
|
|
cw_readelem_radio_administrative_state.o \
|
2014-08-21 21:37:02 +02:00
|
|
|
cw_readelem_radio_operational_state.o \
|
2014-08-18 00:05:46 +02:00
|
|
|
cw_readelem_statistics_timer.o \
|
2014-08-26 00:11:20 +02:00
|
|
|
cw_readelem_mtu_discovery_padding.o \
|
2014-08-26 00:57:13 +02:00
|
|
|
cw_readelem_vendor_specific_payload.o \
|
2015-03-12 23:21:57 +01:00
|
|
|
cw_readelem_capwap_local_ip_addr.o \
|
2014-08-15 01:59:38 +02:00
|
|
|
cw_readelem_wtp_reboot_statistics.o\
|
2015-03-14 10:15:12 +01:00
|
|
|
cwmsg_addelem_vendor_cisco_mwar_addr.o \
|
2015-03-28 12:51:34 +01:00
|
|
|
lw_readelem_wtp_board_data.o \
|
|
|
|
cw_readmsg_configuration_status_response.o \
|
2015-03-29 01:55:06 +01:00
|
|
|
cw_readmsg_configuration_status_request.o \
|
2015-03-28 18:31:33 +01:00
|
|
|
cw_cisco_id_to_str.o\
|
2015-03-29 01:55:06 +01:00
|
|
|
cw_readelem_cisco_wtp_radio_cfg.o \
|
2015-03-31 08:04:03 +02:00
|
|
|
cw_addelem_cisco_wtp_radio_cfg.o \
|
|
|
|
cw_strlist_get_str.o \
|
2015-03-31 14:10:55 +02:00
|
|
|
capwap_strings_msg.o \
|
|
|
|
capwap_strings_state.o \
|
2015-03-31 18:37:07 +02:00
|
|
|
capwap_strings_vendor.o \
|
2015-04-05 02:07:59 +02:00
|
|
|
capwap_strings_elem.o \
|
2015-03-31 12:47:39 +02:00
|
|
|
itemstore.o \
|
|
|
|
cw_in_vendor_specific_payload.o \
|
2015-04-05 02:07:59 +02:00
|
|
|
cw_in_wtp_board_data.o \
|
|
|
|
cw_out_generic.o \
|
|
|
|
cw_out_ac_descriptor.o \
|
2015-04-05 20:27:17 +02:00
|
|
|
cw_out_cisco_ac_descriptor.o \
|
|
|
|
cw_out_cisco_ap_timesync.o \
|
|
|
|
cw_out_capwap_control_ip_addrs.o \
|
|
|
|
strheap.o
|
2015-04-05 02:07:59 +02:00
|
|
|
|
2015-04-05 20:27:17 +02:00
|
|
|
#cw_in_wtp_name.o \
|
2015-04-05 02:07:59 +02:00
|
|
|
#cw_msgtostr.o \
|
|
|
|
#cw_msgelemtostr.o \
|
|
|
|
#cwmsg_addelem_ctrl_ip_addrs.o \
|
|
|
|
#process_join_request.o \
|
2015-03-28 12:51:34 +01:00
|
|
|
|
2015-03-28 18:31:33 +01:00
|
|
|
#cw_ianavendoridtostr.o \
|
2015-03-29 01:55:06 +01:00
|
|
|
#cwmsg_addelem_result_code.o \
|
|
|
|
# cwmsg_addelem_radio_operational_state.o \
|
2015-03-23 22:26:05 +01:00
|
|
|
|
|
|
|
# cwmsg_addelem_vendor_cisco_ap_timesync.o \
|
|
|
|
# cwmsg_addelem_vendor_specific_payload.o \
|
2015-03-15 20:46:16 +01:00
|
|
|
|
2015-03-14 10:15:12 +01:00
|
|
|
#cwmsg_addelem_session_id.o
|
2015-03-14 21:41:50 +01:00
|
|
|
# process_msgelems_discovery_request.o \
|
2015-04-05 02:07:59 +02:00
|
|
|
# cwsend_join_request.o \
|
|
|
|
#
|
2014-08-25 07:56:14 +02:00
|
|
|
# cwsend_image_data_request.o
|
2014-07-11 22:12:11 +02:00
|
|
|
# cwmsg_set_control_header.o
|
|
|
|
# process_msgelems.o \
|
2015-04-05 02:07:59 +02:00
|
|
|
# cwsend_join_response.o \
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2015-02-08 12:35:34 +01:00
|
|
|
#
|
|
|
|
# SSL objects
|
|
|
|
#
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2015-02-08 12:35:34 +01:00
|
|
|
ifeq ($(WITH_OPENSSL),1)
|
|
|
|
CFLAGS+=$(OPENSSL_CFLAGS)
|
|
|
|
CFLAGS+=-DWITH_OPENSSL
|
|
|
|
DTLSOBJS += dtls_openssl.o \
|
2015-02-07 02:59:49 +01:00
|
|
|
dtls_openssl_accept.o \
|
|
|
|
dtls_openssl_connect.o \
|
|
|
|
dtls_openssl_get_cipher.o \
|
2015-02-08 12:35:34 +01:00
|
|
|
dtls_openssl_bio.o
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(WITH_GNUTLS),1)
|
|
|
|
CFLAGS+=$(GNUTLS_CFLAGS)
|
|
|
|
CFLAGS+=-DWITH_GNUTLS
|
|
|
|
DTLSOBJS+= dtls_gnutls.o \
|
2015-02-07 02:59:49 +01:00
|
|
|
dtls_gnutls_accept.o \
|
2015-02-08 21:07:55 +01:00
|
|
|
dtls_gnutls_connect.o \
|
2015-02-08 16:28:04 +01:00
|
|
|
dtls_gnutls_bio.o \
|
2015-02-09 22:04:54 +01:00
|
|
|
dtls_gnutls_get_cipher.o \
|
|
|
|
dtls_gnutls_get_peers_cert.o
|
2015-02-08 12:35:34 +01:00
|
|
|
endif
|
|
|
|
|
2015-02-08 16:28:04 +01:00
|
|
|
DTLSOBJS+=dtls_bio.o
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2015-03-20 22:31:09 +01:00
|
|
|
CONNOBJS= conn_create.o \
|
2015-01-08 21:19:28 +01:00
|
|
|
conn_detect_capwap.o \
|
2014-07-11 22:12:11 +02:00
|
|
|
conn_send_packet.o \
|
|
|
|
conn_send_cwmsg.o \
|
|
|
|
conn_process_packet.o \
|
|
|
|
conn_q_add_packet.o \
|
|
|
|
conn_q_get_packet.o \
|
|
|
|
conn_q_recv_packet.o \
|
|
|
|
conn_recv_packet.o \
|
2014-07-20 12:50:01 +02:00
|
|
|
conn_destroy.o \
|
2014-07-20 16:00:27 +02:00
|
|
|
connlist.o \
|
2014-07-25 00:27:17 +02:00
|
|
|
conn_create_noq.o \
|
2014-08-17 18:29:30 +02:00
|
|
|
conn_send_response.o \
|
|
|
|
conn_get_message.o \
|
2014-08-23 12:00:28 +02:00
|
|
|
conn_get_response.o \
|
|
|
|
conn_prepare_configuration_update_request.o \
|
2015-03-23 07:48:27 +01:00
|
|
|
cw_prepare_configuration_status_request.o \
|
2015-03-29 01:55:06 +01:00
|
|
|
cw_prepare_change_state_event_request.o \
|
2014-08-25 07:56:14 +02:00
|
|
|
conn_prepare_request.o \
|
2015-03-16 21:41:33 +01:00
|
|
|
conn_prepare_image_data_request.o \
|
|
|
|
conn_send_request.o \
|
2015-03-20 22:31:09 +01:00
|
|
|
conn_wait_for_message.o \
|
2015-03-29 01:55:06 +01:00
|
|
|
conn_wait_for_request.o \
|
2015-04-05 02:07:59 +02:00
|
|
|
conn_init.o \
|
|
|
|
conn_send_msg.o
|
2015-03-16 21:41:33 +01:00
|
|
|
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2015-01-31 12:21:20 +01:00
|
|
|
BSTROBJS= bstr_create.o \
|
|
|
|
bstr_create_from_cfgstr.o \
|
2015-03-14 21:41:50 +01:00
|
|
|
bstr_replace.o \
|
|
|
|
bstr_to_str.o
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
FRAGOBJS=fragman.o
|
|
|
|
|
2015-04-05 02:07:59 +02:00
|
|
|
CWACTION=action.o \
|
|
|
|
cw_process_msg.o \
|
|
|
|
capwap_actions_ac.o \
|
|
|
|
cw_in_generic.o \
|
2015-04-05 03:32:50 +02:00
|
|
|
cw_in_wtp_descriptor.o \
|
|
|
|
cipwap_actions_ac.o \
|
2015-04-05 20:27:17 +02:00
|
|
|
cipwap_strings_elem.o \
|
|
|
|
cw_put_msg.o \
|
|
|
|
capwap_action_helpers.o \
|
2015-04-05 02:07:59 +02:00
|
|
|
|
2015-03-30 07:56:42 +02:00
|
|
|
|
|
|
|
|
2015-03-23 07:48:27 +01:00
|
|
|
OBJS=$(CONNOBJS) $(FRAGOBJS) $(SOCKOBJS) $(CAPWAPOBJS) $(WTPINFOOBJS) \
|
|
|
|
$(LOGOBJS) $(UTILOBJS) $(DTLSOBJS) $(BSTROBJS) \
|
|
|
|
$(LWAPPOBJS) \
|
2015-03-30 07:56:42 +02:00
|
|
|
$(LWAPPCISCOOBJS) \
|
|
|
|
$(CWACTION)
|
2015-03-23 07:48:27 +01:00
|
|
|
|
2015-03-28 12:51:34 +01:00
|
|
|
#include $(OBJS:.o=.d)
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
O:=$(OBJS);
|
|
|
|
|
|
|
|
OBJS:=$(patsubst %.o,$(ARCH)/%.o,$(OBJS))
|
|
|
|
|
2015-03-31 11:42:32 +02:00
|
|
|
CFLAGS = -Wall -g -O0 -D_REENTRANT -DWITH_IPV6 -DWITH_RMAC_SUPPORT -I /usr/local/include
|
2015-03-30 07:56:42 +02:00
|
|
|
#CFLAGS += -Wall -g -O0 -D_REENTRANT -DWITH_IPV6 -DWITH_RMAC_SUPPORT -I/usr/local/include
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2015-02-08 11:42:01 +01:00
|
|
|
CFLAGS += $(GNUTLS_CFLAGS) \
|
|
|
|
-DWITH_CW_LOG \
|
2014-07-11 22:12:11 +02:00
|
|
|
-DWITH_CW_LOG_DEBUG \
|
|
|
|
-DWITH_DTLS \
|
2014-08-16 09:10:38 +02:00
|
|
|
$(XINCLUDE)\
|
2015-02-01 16:49:34 +01:00
|
|
|
-I $(OPENSSLINC)\
|
|
|
|
-Werror
|
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
#SRCS = $(OBJS:.o=.c)
|
|
|
|
|
|
|
|
$(ARCH)/%.o:%.c
|
|
|
|
@mkdir -p $(ARCH)
|
|
|
|
@echo " CC "$<
|
|
|
|
@$(CC) -c $(CFLAGS) $< -o $@
|
2015-04-05 02:07:59 +02:00
|
|
|
# @$(CC) -MM $(CFLAGS) $< > $*.d
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
$(ARCH)/$(NAME) : $(OBJS)
|
|
|
|
@echo " AR $(ARCH)/$(NAME)"
|
|
|
|
@$(AR) rcs $(ARCH)/$(NAME) $(OBJS)
|
|
|
|
|
|
|
|
|
|
|
|
SRCS = $(OBJS:.o=.c)
|
|
|
|
DEPS := $(OBJS:.o=.d)
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: deps clean clean_libs libs
|
|
|
|
|
|
|
|
# top-level rule, to compile everything.
|
|
|
|
all: $(ARCH)/$(NAME)
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) $(OBJS)
|
|
|
|
$(RM) $(DEPS)
|
2014-08-25 23:37:49 +02:00
|
|
|
$(RM) $(ARCH)/$(NAME)
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
clean_deps:
|
|
|
|
$(DEPS)
|
|
|
|
|
|
|
|
deps: $(SRCS)
|
|
|
|
$(CC) -MD -E $(SRCS) $(CFLAGS) >/dev/null
|
|
|
|
|
|
|
|
-include $(DEPS)
|