summaryrefslogtreecommitdiff
path: root/code/core/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'code/core/crypto')
-rw-r--r--code/core/crypto/Makefile4
-rw-r--r--code/core/crypto/chacha/Makefile3
-rw-r--r--code/core/crypto/compat/Makefile3
-rw-r--r--code/core/crypto/curve25519/Makefile3
-rw-r--r--code/core/crypto/include/chacha.h2
-rw-r--r--code/core/crypto/poly1305/Makefile3
-rw-r--r--code/core/crypto/sha/Makefile3
-rw-r--r--code/core/crypto/test/Makefile4
8 files changed, 16 insertions, 9 deletions
diff --git a/code/core/crypto/Makefile b/code/core/crypto/Makefile
index 2fabea2..a7145c7 100644
--- a/code/core/crypto/Makefile
+++ b/code/core/crypto/Makefile
@@ -1,5 +1,5 @@
-MAKE=make
-CFLAGS=-Iinclude -I.. -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS= -O3 $(PIC)
+include ../../Makefile.platform
+CFLAGS=$(CFLAGS_PL) $(PIC) -Iinclude -I.. -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS=
obj = e_chacha20poly1305.o crypto.o
obj_dep = compat/explicit_bzero.o compat/timingsafe_memcmp.o compat/timingsafe_bcmp.o \
diff --git a/code/core/crypto/chacha/Makefile b/code/core/crypto/chacha/Makefile
index 071a1b1..8a977ae 100644
--- a/code/core/crypto/chacha/Makefile
+++ b/code/core/crypto/chacha/Makefile
@@ -1,4 +1,5 @@
-CFLAGS=-I../include -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS= -O3 $(PIC)
+include ../../../Makefile.platform
+CFLAGS=$(CFLAGS_PL) $(PIC) -I../include -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS=
obj = chacha.o
diff --git a/code/core/crypto/compat/Makefile b/code/core/crypto/compat/Makefile
index a0dec2d..1afe391 100644
--- a/code/core/crypto/compat/Makefile
+++ b/code/core/crypto/compat/Makefile
@@ -1,4 +1,5 @@
-CFLAGS=-I../include -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS= -O3 $(PIC)
+include ../../../Makefile.platform
+CFLAGS=$(CFLAGS_PL) $(PIC) -I../include -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS=
getentropy = getentropy_osx
obj = explicit_bzero.o timingsafe_memcmp.o timingsafe_bcmp.o # arc4random.o arc4random_uniform.o $(getentropy).o
diff --git a/code/core/crypto/curve25519/Makefile b/code/core/crypto/curve25519/Makefile
index 1a96045..c3f94f0 100644
--- a/code/core/crypto/curve25519/Makefile
+++ b/code/core/crypto/curve25519/Makefile
@@ -1,4 +1,5 @@
-CFLAGS=-I../include -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS= -DED25519 -O3 $(PIC)
+include ../../../Makefile.platform
+CFLAGS=$(CFLAGS_PL) $(PIC) -I../include -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS= -DED25519
obj = curve25519.o curve25519-generic.o
diff --git a/code/core/crypto/include/chacha.h b/code/core/crypto/include/chacha.h
index 11885b7..25a3ef3 100644
--- a/code/core/crypto/include/chacha.h
+++ b/code/core/crypto/include/chacha.h
@@ -32,7 +32,7 @@ typedef struct {
} ChaCha_ctx;
void ChaCha_set_key(ChaCha_ctx *ctx, const unsigned char *key,
- unsigned int keybits);
+ uint32_t keybits);
void ChaCha_set_iv(ChaCha_ctx *ctx, const unsigned char *iv,
const unsigned char *counter);
void ChaCha(ChaCha_ctx *ctx, unsigned char *out, const unsigned char *in,
diff --git a/code/core/crypto/poly1305/Makefile b/code/core/crypto/poly1305/Makefile
index e780491..6bc384f 100644
--- a/code/core/crypto/poly1305/Makefile
+++ b/code/core/crypto/poly1305/Makefile
@@ -1,4 +1,5 @@
-CFLAGS=-I../include -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS= -O3 $(PIC)
+include ../../../Makefile.platform
+CFLAGS=$(CFLAGS_PL) $(PIC) -I../include -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS=
obj = poly1305.o
diff --git a/code/core/crypto/sha/Makefile b/code/core/crypto/sha/Makefile
index f078644..1eb727f 100644
--- a/code/core/crypto/sha/Makefile
+++ b/code/core/crypto/sha/Makefile
@@ -1,4 +1,5 @@
-CFLAGS=-I../include -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS= -O3 $(PIC)
+include ../../../Makefile.platform
+CFLAGS=$(CFLAGS_PL) $(PIC) -I../include -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS=
obj = sha1dgst.o sha1_one.o sha256.o sha512.o
diff --git a/code/core/crypto/test/Makefile b/code/core/crypto/test/Makefile
index f274209..2a5fa3e 100644
--- a/code/core/crypto/test/Makefile
+++ b/code/core/crypto/test/Makefile
@@ -1,4 +1,6 @@
-CFLAGS=-I.. -I../include -O3
+include ../../../Makefile.platform
+CFLAGS=$(CFLAGS_PL) -I.. -I../include
+LDFLAGS=$(LDFLAGS_PL)
aead_dep=../compat/explicit_bzero.o ../compat/timingsafe_memcmp.o ../compat/timingsafe_bcmp.o \
../chacha/chacha.o ../poly1305/poly1305.o ../curve25519/curve25519.o ../curve25519/curve25519-generic.o \