Makefile 541 B

123456789101112131415161718192021222324252627282930
  1. #
  2. # To run the demos when linked with a shared library (default) ensure
  3. # that libcrypto is on the library path. For example:
  4. #
  5. # LD_LIBRARY_PATH=../.. ./x25519
  6. TESTS = x25519 ecdh
  7. CFLAGS = -I../../include -g -Wall
  8. LDFLAGS = -L../..
  9. LDLIBS = -lcrypto
  10. all: $(TESTS)
  11. x25519: x25519.o
  12. ecdh: ecdh.o
  13. $(TESTS):
  14. $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
  15. clean:
  16. $(RM) *.o $(TESTS)
  17. .PHONY: test
  18. test: all
  19. @echo "\nKeyExchange tests:"
  20. @set -e; for tst in $(TESTS); do \
  21. echo "\n"$$tst; \
  22. LD_LIBRARY_PATH=../.. ./$$tst; \
  23. done