1 ##################################################
2 #Desc: Wolf SSL lib generator
5 ##################################################
6 #Included from Makefile
7 #Defines rules for automatically downloading,
8 #compiling, and linking the wolfssl library
9 ##################################################
11 #wolfssl module compilation rules
12 WOLFDIR
:= $(MLSRCDIR
)/wolfssl
13 WOLFSO
:= $(WOLFDIR
)/src
/.libs
/libwolfssl.so
14 WOLFTARG
:= $(MLLIBDIR
)/libwolfssl.so
15 CONFCL
:= --enable-singlethreaded
=yes
16 CONFCL
+= --enable-static
=yes
17 CONFCL
+= --enable-fastmath
=no
18 CONFCL
+= --enable-cryptonly
=yes
20 GITADDR
:= git@github.com
:wolfSSL
/wolfssl.git
22 #Remove the WOLFSO after compile since it is
23 #compiler-dependent, and we copy it to WOLFTARG
24 #which is a compiler-dependent location
25 .INTERMEDIATE
: $(WOLFSO
)
27 #WOLFTARG is the target file to generate for the
28 #missing library. It depends on WOLFSO, an
29 #intermediate file generated only when we need
30 #to copy it to WOLFTARG
31 $(WOLFTARG
): $(WOLFSO
)
32 @mkdir
-p
$(dir $(WOLFTARG
))
33 @cp
-H
$(WOLFSO
) $(WOLFTARG
)
34 @echo
"WolfSSL library created"
37 @cd
$(WOLFDIR
) && $(AMGEN
) && $(AMCONF
) $(CONFCL
)
38 @sed
-i
's@SIZEOF_LONG 0@SIZEOF_LONG 4@' $(WOLFDIR
)/config.h
39 @sed
-i
's@SIZEOF_LONG_LONG 0@SIZEOF_LONG_LONG 8@' $(WOLFDIR
)/config.h
40 @cd
$(WOLFDIR
) && export CFLAGS
=-w
&& $(AMMAKE
) src
/libwolfssl.la
44 @git clone
$(GITADDR
) $(WOLFDIR
)
47 cd
$(WOLFDIR
) && make
clean