aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2014-10-07 12:14:44 -0400
committerSteven Fackler <[email protected]>2014-10-07 12:14:44 -0400
commite4b8b5e697620a543f1f7fe0183193ea7a45dc93 (patch)
tree61a63011ead6a70ab17e3a9b5705534593a4361f /Makefile
parentMerge pull request #60 from vhbit/cert-gen-cleanup (diff)
parentPotential fix for #68 (diff)
downloadrust-openssl-e4b8b5e697620a543f1f7fe0183193ea7a45dc93.tar.xz
rust-openssl-e4b8b5e697620a543f1f7fe0183193ea7a45dc93.zip
Merge pull request #69 from vhbit/bn-zero-fix
Fixes #68: error on linking `bn_is_zero`
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index c88ebeae..5e496b3a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,9 @@
+ifneq ($(findstring i686,$(TARGET)),)
+ CFLAGS += -m32
+else
+ CFLAGS += -m64
+endif
+
default:
- rm -f $(OUT_DIR)/bin_is_zero.o
- $(CC) -O -shared native/bn_is_zero.c -o bn_is_zero.o
- mv bn_is_zero.o $(OUT_DIR)
+ $(CC) $(CFLAGS) -c native/bn_is_zero.c -o $(OUT_DIR)/bn_is_zero.o
+ $(AR) crus $(OUT_DIR)/libwrapped.a $(OUT_DIR)/bn_is_zero.o