Commit 12caebdc753fcaa456644328e629a5a04f91c2fe

Steffen Jaeckel 2013-04-18T16:38:16

update makefile to be able to define a target platform prefix

diff --git a/makefile b/makefile
index 70de306..66c3511 100644
--- a/makefile
+++ b/makefile
@@ -7,6 +7,16 @@ VERSION=0.42.0
 
 CFLAGS  +=  -I./ -Wall -W -Wshadow -Wsign-compare
 
+# Compiler and Linker Names
+ifndef PREFIX
+  PREFIX=
+endif
+
+CC=$(PREFIX)gcc
+LD=$(PREFIX)ld
+AR=$(PREFIX)ar
+RANLIB=$(PREFIX)ranlib
+
 ifndef MAKE
    MAKE=make
 endif
@@ -87,7 +97,7 @@ bn_mp_to_signed_bin_n.o bn_mp_to_unsigned_bin_n.o
 
 $(LIBNAME):  $(OBJECTS)
 	$(AR) $(ARFLAGS) $@ $(OBJECTS)
-	ranlib $@
+	$(RANLIB) $@
 
 #make a profiled library (takes a while!!!)
 #