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