summaryrefslogtreecommitdiff
path: root/code/ecp/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'code/ecp/crypto')
-rw-r--r--code/ecp/crypto/chacha/Makefile5
-rw-r--r--code/ecp/crypto/compat/Makefile5
-rw-r--r--code/ecp/crypto/crypto.c1
-rw-r--r--code/ecp/crypto/crypto.h2
-rw-r--r--code/ecp/crypto/curve25519/Makefile5
-rw-r--r--code/ecp/crypto/poly1305/Makefile5
-rw-r--r--code/ecp/crypto/sha/Makefile5
-rw-r--r--code/ecp/crypto/test/Makefile17
8 files changed, 12 insertions, 33 deletions
diff --git a/code/ecp/crypto/chacha/Makefile b/code/ecp/crypto/chacha/Makefile
index e64aac3..1bafa7f 100644
--- a/code/ecp/crypto/chacha/Makefile
+++ b/code/ecp/crypto/chacha/Makefile
@@ -4,14 +4,11 @@ CFLAGS=$(CFLAGS_PL) $(PIC) -I../include -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_D
obj = chacha.o
-all: libchacha.a
+all: $(obj)
dep: all
%.o: %.c
$(CC) $(CFLAGS) -c $<
-libchacha.a: $(obj)
- $(AR) rcs $@ $(obj)
-
clean:
rm -f *.o *.a
diff --git a/code/ecp/crypto/compat/Makefile b/code/ecp/crypto/compat/Makefile
index 9e96d9e..fc32fe7 100644
--- a/code/ecp/crypto/compat/Makefile
+++ b/code/ecp/crypto/compat/Makefile
@@ -5,14 +5,11 @@ getentropy = getentropy_osx
obj = explicit_bzero.o timingsafe_memcmp.o timingsafe_bcmp.o # arc4random.o arc4random_uniform.o $(getentropy).o
-all: libcompat.a
+all: $(obj)
dep: all
%.o: %.c
$(CC) $(CFLAGS) -c $<
-libcompat.a: $(obj)
- $(AR) rcs $@ $(obj)
-
clean:
rm -f *.o *.a
diff --git a/code/ecp/crypto/crypto.c b/code/ecp/crypto/crypto.c
index f57e8d8..81bf3cc 100644
--- a/code/ecp/crypto/crypto.c
+++ b/code/ecp/crypto/crypto.c
@@ -1,6 +1,5 @@
#include <core.h>
-#include <string.h>
#include <curve25519.h>
static int dh_mkpair(ecp_dh_public_t *pub, ecp_dh_private_t *priv, ecp_rng_t *rand_buf) {
diff --git a/code/ecp/crypto/crypto.h b/code/ecp/crypto/crypto.h
index 7bd27d5..86b072c 100644
--- a/code/ecp/crypto/crypto.h
+++ b/code/ecp/crypto/crypto.h
@@ -1,5 +1,3 @@
-#include <stddef.h>
-
#define CURVE25519_SIZE_KEY 32
#define CHACHA20_SIZE_KEY 32
#define POLY1305_SIZE_TAG 16
diff --git a/code/ecp/crypto/curve25519/Makefile b/code/ecp/crypto/curve25519/Makefile
index 5799e0e..e9c2c1b 100644
--- a/code/ecp/crypto/curve25519/Makefile
+++ b/code/ecp/crypto/curve25519/Makefile
@@ -4,14 +4,11 @@ CFLAGS=$(CFLAGS_PL) $(PIC) -I../include -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_D
obj = curve25519.o curve25519-generic.o
-all: libcurve25519.a
+all: $(obj)
dep: all
%.o: %.c
$(CC) $(CFLAGS) -c $<
-libcurve25519.a: $(obj)
- $(AR) rcs $@ $(obj)
-
clean:
rm -f *.o *.a
diff --git a/code/ecp/crypto/poly1305/Makefile b/code/ecp/crypto/poly1305/Makefile
index 5751602..418e3a5 100644
--- a/code/ecp/crypto/poly1305/Makefile
+++ b/code/ecp/crypto/poly1305/Makefile
@@ -4,14 +4,11 @@ CFLAGS=$(CFLAGS_PL) $(PIC) -I../include -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_D
obj = poly1305.o
-all: libpoly1305.a
+all: $(obj)
dep: all
%.o: %.c
$(CC) $(CFLAGS) -c $<
-libpoly1305.a: $(obj)
- $(AR) rcs $@ $(obj)
-
clean:
rm -f *.o *.a
diff --git a/code/ecp/crypto/sha/Makefile b/code/ecp/crypto/sha/Makefile
index 4dc3f39..b775c83 100644
--- a/code/ecp/crypto/sha/Makefile
+++ b/code/ecp/crypto/sha/Makefile
@@ -4,14 +4,11 @@ CFLAGS=$(CFLAGS_PL) $(PIC) -I../include -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_D
obj = sha1dgst.o sha1_one.o sha256.o sha512.o
-all: libsha.a
+all: $(obj)
dep: all
%.o: %.c
$(CC) $(CFLAGS) -c $<
-libsha.a: $(obj)
- $(AR) rcs $@ $(obj)
-
clean:
rm -f *.o *.a
diff --git a/code/ecp/crypto/test/Makefile b/code/ecp/crypto/test/Makefile
index 8ea463d..ae19e4b 100644
--- a/code/ecp/crypto/test/Makefile
+++ b/code/ecp/crypto/test/Makefile
@@ -2,10 +2,7 @@ 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 \
- ../sha/sha512.o ../e_chacha20poly1305.o
-dsa_dep=../*/*.a
+dep=../e_chacha20poly1305.o ../curve25519/*.o ../chacha/*.o ../poly1305/*.o ../sha/*.o ../compat/*.o
%.o: %.c
@@ -14,22 +11,22 @@ dsa_dep=../*/*.a
all: aead aead_enc aead_dec ed25519 ed25519_sign ed25519_open
aead: aead.o
- $(CC) $(LDFLAGS) -o $@ $< $(aead_dep)
+ $(CC) $(LDFLAGS) -o $@ $< $(dep)
aead_enc: aead_enc.o
- $(CC) $(LDFLAGS) -o $@ $< $(aead_dep)
+ $(CC) $(LDFLAGS) -o $@ $< $(dep)
aead_dec: aead_dec.o
- $(CC) $(LDFLAGS) -o $@ $< $(aead_dep)
+ $(CC) $(LDFLAGS) -o $@ $< $(dep)
ed25519: ed25519.o
- $(CC) $(LDFLAGS) -o $@ $< $(dsa_dep)
+ $(CC) $(LDFLAGS) -o $@ $< $(dep)
ed25519_sign: ed25519_sign.o
- $(CC) $(LDFLAGS) -o $@ $< $(dsa_dep)
+ $(CC) $(LDFLAGS) -o $@ $< $(dep)
ed25519_open: ed25519_open.o
- $(CC) $(LDFLAGS) -o $@ $< $(dsa_dep)
+ $(CC) $(LDFLAGS) -o $@ $< $(dep)
clean: