Home | History | Annotate | Line # | Download | only in digest
      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 
      7 TESTS = EVP_MD_demo \
      8         EVP_MD_stdin \
      9         EVP_MD_xof \
     10         BIO_f_md
     11 
     12 CFLAGS  = -I../../include -g -Wall
     13 LDFLAGS = -L../..
     14 LDLIBS  = -lcrypto
     15 
     16 all: $(TESTS)
     17 
     18 EVP_MD_demo: EVP_MD_demo.o
     19 EVP_MD_stdin: EVP_MD_stdin.o
     20 EVP_MD_xof: EVP_MD_xof.o
     21 BIO_f_md: BIO_f_md.o
     22 
     23 $(TESTS):
     24 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
     25 
     26 clean:
     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
     32 test: 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