2023-03-20 13:08:38 +08:00
|
|
|
#
|
2023-11-11 03:02:00 +08:00
|
|
|
# To run the demos when linked with a shared library (default) ensure
|
|
|
|
# that libcrypto is on the library path. For example:
|
2023-03-20 13:08:38 +08:00
|
|
|
#
|
|
|
|
# LD_LIBRARY_PATH=../.. ./x25519
|
|
|
|
|
2023-11-11 03:02:00 +08:00
|
|
|
TESTS = x25519
|
2023-03-20 13:08:38 +08:00
|
|
|
|
2023-11-11 03:02:00 +08:00
|
|
|
CFLAGS = -I../../include -g -Wall
|
|
|
|
LDFLAGS = -L../..
|
|
|
|
LDLIBS = -lcrypto
|
2023-03-20 13:08:38 +08:00
|
|
|
|
|
|
|
all: $(TESTS)
|
|
|
|
|
2023-11-11 03:02:00 +08:00
|
|
|
x25519: x25519.o
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
2023-03-20 13:08:38 +08:00
|
|
|
|
2023-11-11 03:02:00 +08:00
|
|
|
clean:
|
|
|
|
$(RM) *.o $(TESTS)
|
2023-03-20 13:08:38 +08:00
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
test: all
|
|
|
|
@echo "\nKeyExchange tests:"
|
|
|
|
@set -e; for tst in $(TESTS); do \
|
|
|
|
echo "\n"$$tst; \
|
|
|
|
LD_LIBRARY_PATH=../.. ./$$tst; \
|
|
|
|
done
|