Makefile 764 B

12345678910111213141516171819202122232425262728293031323334353637
  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=../.. ./EVP_MD_demo
  6. TESTS = EVP_MD_demo \
  7. EVP_MD_stdin \
  8. EVP_MD_xof \
  9. BIO_f_md
  10. CFLAGS = -I../../include -g -Wall
  11. LDFLAGS = -L../..
  12. LDLIBS = -lcrypto
  13. all: $(TESTS)
  14. EVP_MD_demo: EVP_MD_demo.o
  15. EVP_MD_stdin: EVP_MD_stdin.o
  16. EVP_MD_xof: EVP_MD_xof.o
  17. BIO_f_md: BIO_f_md.o
  18. $(TESTS):
  19. $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
  20. clean:
  21. $(RM) *.o $(TESTS)
  22. .PHONY: test
  23. # Since some of these tests use stdin, we use the source file as stdin
  24. # when running the tests
  25. test: all
  26. @echo "\nDigest tests:"
  27. @set -e; for tst in $(TESTS); do \
  28. echo "\n"$$tst; \
  29. cat $$tst.c | ./$$tst; \
  30. done