Buildsys1.1
[henge/webcc.git] / src / .make / libwolfssl.mk
index ae1bcf2..d9b77e4 100644 (file)
@@ -4,8 +4,8 @@
 #Date:   2016
 ##################################################
 #Included from Makefile
-#Defines rules for automatically making and
-#linking the external wolfssl library
+#Defines rules for automatically downloading,
+#compiling, and linking the wolfssl library
 ##################################################
 
 #wolfssl module compilation rules
@@ -19,8 +19,17 @@ CONFCL   += --enable-cryptonly=yes
 CONFCL   += CFLAGS=-w
 GITADDR  := git@github.com:wolfSSL/wolfssl.git
 
+#Remove the WOLFSO after compile since it is
+#compiler-dependent, and we copy it to WOLFTARG
+#which is a compiler-dependent location
 .INTERMEDIATE: $(WOLFSO)
+
+#WOLFTARG is the target file to generate for the
+#missing library.  It depends on WOLFSO, an
+#intermediate file generated only when we need
+#to copy it to WOLFTARG
 $(WOLFTARG): $(WOLFSO)
+       @mkdir -p $(dir $(WOLFTARG))
        @cp -H $(WOLFSO) $(WOLFTARG)
        @echo "WolfSSL library created"
 
@@ -33,8 +42,6 @@ $(WOLFSO): $(WOLFDIR)
 $(WOLFDIR):
        @mkdir -p $(WOLFDIR)
        @git clone $(GITADDR) $(WOLFDIR)
-       @mkdir -p $(dir $(WOLFTARG))
-
 
-scrub:
+clean_wolfssl:
        cd $(WOLFDIR) && make clean