Makefile 893 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #
  2. # To run the demos when linked with a shared library (default) ensure that
  3. # libcrypto is on the library path. For example, to run the
  4. # cms_enc demo:
  5. #
  6. # LD_LIBRARY_PATH=../.. ./cms_enc
  7. TESTS = cms_comp \
  8. cms_ddec \
  9. cms_dec \
  10. cms_denc \
  11. cms_enc \
  12. cms_sign \
  13. cms_sign2 \
  14. cms_uncomp \
  15. cms_ver
  16. CFLAGS = -I../../include -g -Wall
  17. LDFLAGS = -L../..
  18. LDLIBS = -lcrypto
  19. all: $(TESTS)
  20. cms_comp: cms_comp.o
  21. cms_ddec: cms_ddec.o
  22. cms_dec: cms_dec.o
  23. cms_denc: cms_denc.o
  24. cms_enc: cms_enc.o
  25. cms_sign: cms_sign.o
  26. cms_sign2: cms_sign2.o
  27. cms_uncomp: cms_uncomp.o
  28. cms_ver: cms_ver.o
  29. $(TESTS):
  30. $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
  31. clean:
  32. $(RM) $(TESTS) *.o
  33. test: all
  34. @echo "\nCMS tests:"
  35. LD_LIBRARY_PATH=../.. ./cms_enc
  36. LD_LIBRARY_PATH=../.. ./cms_dec
  37. LD_LIBRARY_PATH=../.. ./cms_sign2
  38. LD_LIBRARY_PATH=../.. ./cms_ver