Makefile 645 B

1234567891011121314151617181920212223242526272829303132333435
  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=../.. ./gmac
  6. TESTS = gmac \
  7. hmac-sha512 \
  8. cmac-aes256 \
  9. poly1305
  10. CFLAGS = -I../../include -g -Wall
  11. LDFLAGS = -L../..
  12. LDLIBS = -lcrypto
  13. all: $(TESTS)
  14. gmac: gmac.o
  15. hmac-sha512: hmac-sha512.o
  16. cmac-aes256: cmac-aes256.o
  17. poly1305: poly1305.o
  18. $(TESTS):
  19. $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
  20. clean:
  21. $(RM) *.o $(TESTS)
  22. .PHONY: test
  23. test: all
  24. @echo "\nMAC tests:"
  25. @set -e; for tst in $(TESTS); do \
  26. echo "\n"$$tst; \
  27. LD_LIBRARY_PATH=../.. ./$$tst; \
  28. done