diff --git a/src/CapwapConfig.mak b/src/CapwapConfig.mak index 1f71fdb0..d732e038 100644 --- a/src/CapwapConfig.mak +++ b/src/CapwapConfig.mak @@ -1,4 +1,4 @@ include ../Config.mak WITH_GNUTLS=1 -WITH_OPENSSL=1 +WITH_OPENSSL=0 diff --git a/src/Config.mak b/src/Config.mak index 5ce18cdc..f98690b6 100644 --- a/src/Config.mak +++ b/src/Config.mak @@ -1,26 +1,22 @@ -#Define SSL Library: OPENSSL or GNUTLS (GNUTLS not supported for now) -#SSL_LIBRARY=OPENSSL -SSL_LIBRARY=GNUTLS - -# use openssl library in ../contrib/ -OPENSSL_VERSION=openssl-1.0.1i -USE_CONTRIB_OPENSSL=1 +# +# OpenSSL definitions +# #OPENSSL_VERSION=openssl-1.0.1l # doesn't work #OPENSSL_VERSION=openssl-1.0.2 # doesn't work +OPENSSL_VERSION=openssl-1.0.1i +USE_CONTRIB_OPENSSL=1 -# use gnutls lib in ../contrib/ +# GnuTLS definitions GNUTLS_VERSION=3.3.9 USE_CONTRIB_GNUTLS=1 -CONF_LIBRARY=UCI -USE_CONTRIB_UCI=0 - +# Compiler to use CC=clang - #CC=mips-openwrt-linux-uclibc-gcc #LD=mips-openwrt-linux-uclibc-ld #AR=mips-openwrt-linux-uclibc-ar + diff --git a/src/WtpConfig.mak b/src/WtpConfig.mak index 34e7c535..95ccb9b6 100644 --- a/src/WtpConfig.mak +++ b/src/WtpConfig.mak @@ -1,8 +1,20 @@ -# + +#SSL settings +SSL_LIBRARY=OPENSSL USE_CONTRIB_OPENSSL=1 + +# C compiler settings CC=clang + CFLAGS += -I/usr/include/libnl3 CFLAGS += -I../contrib/uci LDFLAGS += -L../contrib/uci/build LDFLAGS += -L../contrib/libubox/build + + + +CONF_LIBRARY=UCI +USE_CONTRIB_UCI=0 + + diff --git a/src/ac/Makefile b/src/ac/Makefile index b7777fb1..682cdd83 100644 --- a/src/ac/Makefile +++ b/src/ac/Makefile @@ -1,5 +1,5 @@ -include ../Config.mak +include ../ACConfig.mak include ../Macros.mak ifndef CC diff --git a/src/capwap/Makefile b/src/capwap/Makefile index bd64fa08..4264ecfb 100644 --- a/src/capwap/Makefile +++ b/src/capwap/Makefile @@ -1,4 +1,4 @@ -include ../Config.mak +include ../CapwapConfig.mak include ../Macros.mak ifndef CC @@ -13,9 +13,7 @@ ifndef ARCH ARCH = $(shell $(CC) -dumpmachine) endif -ifdef INCLUDE_DIR - XINCLUDE = -I $(INCLUDE_DIR) -endif + #OPENSSLINC=$(OPENSSLINC) #../contrib/openssl-1.0.1i/include @@ -134,23 +132,32 @@ CAPWAPOBJS= \ lw_checksum.o # cwsend_image_data_request.o - - # cwmsg_set_control_header.o # process_msgelems.o \ +# +# SSL objects +# -DTLSOBJS= \ - dtls_openssl.o \ +ifeq ($(WITH_OPENSSL),1) +CFLAGS+=$(OPENSSL_CFLAGS) +CFLAGS+=-DWITH_OPENSSL +DTLSOBJS += dtls_openssl.o \ dtls_openssl_accept.o \ dtls_openssl_connect.o \ dtls_openssl_get_cipher.o \ - dtls_openssl_bio.o \ - dtls_gnutls.o \ + dtls_openssl_bio.o +endif + +ifeq ($(WITH_GNUTLS),1) +CFLAGS+=$(GNUTLS_CFLAGS) +CFLAGS+=-DWITH_GNUTLS +DTLSOBJS+= dtls_gnutls.o \ dtls_gnutls_accept.o \ dtls_bio.o \ dtls_gnutls_bio.o - +endif + CONNOBJS= conn.o \ conn_detect_capwap.o \