cmake_minimum_required(VERSION 2.8.11)

project(libwolfssl)


include (libwolfssl)

include_directories(../../src/
					../../)

ADD_DEFINITIONS(-fvisibility=hidden -fvisibility=hidden)

ADD_DEFINITIONS(-Wall -Wno-unused -O2 -fomit-frame-pointer -Wno-pragmas -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas --param=ssp-buffer-size=1 -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmaybe-uninitialized -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wnormalized=id -Woverride-init -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-overflow=1 -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -fPIE)

file(
	GLOB_RECURSE
	source_files
	../../wolfcrypt/src/hmac.c
	../../wolfcrypt/src/sha256.c
	../../wolfcrypt/src/random.c
	../../wolfcrypt/src/rsa.c
	../../wolfcrypt/src/aes.c
	../../wolfcrypt/src/des3.c	
	../../wolfcrypt/src/sha.c
	../../wolfcrypt/src/logging.c
	../../wolfcrypt/src/wc_port.c
	../../wolfcrypt/src/error.c
	../../wolfcrypt/src/memory.c
	../../wolfcrypt/src/asn.c
	../../wolfcrypt/src/coding.c
	../../wolfcrypt/src/arc4.c
	../../wolfcrypt/src/md5.c
	../../wolfcrypt/src/tfm.c
	../../src/internal.c
	../../src/io.c
	../../src/keys.c
	../../src/ssl.c
	../../src/tls.c
)

add_library(
        wolfssl
        STATIC
        ${source_files}
)
