-ed25519-test: ed25519-test.o sha512.o f25519.o scaf.o ed25519.o crypto-test.o
- $(CC) $(LDFLAGS) $(ALL_CFLAGS) -o $@ $^
-
-ed25519-test.confirm: ed25519-test ed25519-tests.in
- ./ed25519-test <$(srcdir)/ed25519-tests.in
- touch $@
+keccak1600-test: keccak1600.o
+sha3-test: sha3.o keccak1600.o
+f25519-test: f25519.o
+x25519-test: x25519.o f25519.o
+ed25519-test: sha512.o f25519.o scaf.o ed25519.o
+fgoldi-test: fgoldi.o
+x448-test: x448.o fgoldi.o
+ed448-test: keccak1600.o sha3.o fgoldi.o scaf.o ed448.o
+
+f25519-test.o: ec-field-test.c
+ $(CC) $(CPPFLAGS) $(ALL_CFLAGS) -c -DFIELD=f25519 $< -o $@
+fgoldi-test.o: ec-field-test.c
+ $(CC) $(CPPFLAGS) $(ALL_CFLAGS) -c -DFIELD=fgoldi $< -o $@
+x25519-test.o: xdh-test.c
+ $(CC) $(CPPFLAGS) $(ALL_CFLAGS) -c -DXDH=x25519 -DFIELD=f25519 $< -o $@
+x448-test.o: xdh-test.c
+ $(CC) $(CPPFLAGS) $(ALL_CFLAGS) -c -DXDH=x448 -DFIELD=fgoldi $< -o $@