Make ar invocation more portable

armar doesn't understand the syntax without dash. OTOH, the syntax with dash
is the only one specified by POSIX, and it's accepted by GNU ar, BSD ar (as
bundled with OS X) and armar, so it looks like the most portable syntax.

fixes #386
diff --git a/ChangeLog b/ChangeLog
index 9712b15..0f81efe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,7 +5,8 @@
 Bugfix
    * Fix bug in mbedtls_mpi_add_mpi() that caused wrong results when the three
      arguments where the same (in-place doubling). Found and fixed by Janos
-     Follath.
+     Follath. #309
+   * Fix issue in Makefile that prevented building using armar. #386
 
 = mbed TLS 1.3.16 released 2016-01-05
 
diff --git a/library/Makefile b/library/Makefile
index c7c5bf0..6a8d9ba 100644
--- a/library/Makefile
+++ b/library/Makefile
@@ -93,9 +93,9 @@
 
 libmbedtls.a: $(OBJS)
 	echo "  AR    $@"
-	$(AR) rc $@ $(OBJS)
+	$(AR) -rc $@ $(OBJS)
 	echo "  RL    $@"
-	$(AR) s $@
+	$(AR) -s $@
 
 libpolarssl.$(DLEXT): libmbedtls.$(DLEXT)
 	echo "  LN    $@ -> $?"
diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh
index f51bc7f..dfc0061 100755
--- a/tests/scripts/all.sh
+++ b/tests/scripts/all.sh
@@ -213,7 +213,7 @@
 scripts/config.pl unset POLARSSL_THREADING_C
 scripts/config.pl unset POLARSSL_MEMORY_BACKTRACE # execinfo.h
 scripts/config.pl unset POLARSSL_MEMORY_BUFFER_ALLOC_C # calls exit
-CC=armcc WARNING_CFLAGS= make lib 2> armcc.stderr
+CC=armcc AR=armar WARNING_CFLAGS= make lib 2> armcc.stderr
 if [ -s armcc.stderr ]; then
     cat armcc.stderr
     exit 1;