Makefile 539 B

1234567891011121314151617181920212223242526272829
  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=../.. ./rsa_encrypt
  6. TESTS = rsa_encrypt
  7. CFLAGS = -I../../include -g -Wall
  8. LDFLAGS = -L../..
  9. LDLIBS = -lcrypto
  10. all: $(TESTS)
  11. rsa_encrypt: rsa_encrypt.o
  12. $(TESTS):
  13. $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
  14. clean:
  15. $(RM) *.o $(TESTS)
  16. .PHONY: test
  17. test: all
  18. @echo "\nEncrypt tests:"
  19. @set -e; for tst in $(TESTS); do \
  20. echo "\n"$$tst; \
  21. LD_LIBRARY_PATH=../.. ./$$tst; \
  22. done