1 1.1 christos # 2 1.1 christos # To run the demos when linked with a shared library (default) ensure 3 1.1 christos # that libcrypto is on the library path. For example: 4 1.1 christos # 5 1.1 christos # LD_LIBRARY_PATH=../.. ./EVP_MD_demo 6 1.1 christos 7 1.1 christos TESTS = EVP_MD_demo \ 8 1.1 christos EVP_MD_stdin \ 9 1.1 christos EVP_MD_xof \ 10 1.1 christos BIO_f_md 11 1.1 christos 12 1.1 christos CFLAGS = -I../../include -g -Wall 13 1.1 christos LDFLAGS = -L../.. 14 1.1 christos LDLIBS = -lcrypto 15 1.1 christos 16 1.1 christos all: $(TESTS) 17 1.1 christos 18 1.1 christos EVP_MD_demo: EVP_MD_demo.o 19 1.1 christos EVP_MD_stdin: EVP_MD_stdin.o 20 1.1 christos EVP_MD_xof: EVP_MD_xof.o 21 1.1 christos BIO_f_md: BIO_f_md.o 22 1.1 christos 23 1.1 christos $(TESTS): 24 1.1 christos $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS) 25 1.1 christos 26 1.1 christos clean: 27 1.1 christos $(RM) *.o $(TESTS) 28 1.1 christos 29 1.1 christos .PHONY: test 30 1.1 christos # Since some of these tests use stdin, we use the source file as stdin 31 1.1 christos # when running the tests 32 1.1 christos test: all 33 1.1 christos @echo "\nDigest tests:" 34 1.1 christos @set -e; for tst in $(TESTS); do \ 35 1.1 christos echo "\n"$$tst; \ 36 1.1 christos cat $$tst.c | ./$$tst; \ 37 1.1 christos done 38