Makefile 609 B

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