2
0

Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #
  2. # To run the demos when linked with a shared library (default) ensure that
  3. # libcrypto and libssl are on the library path. For example to run the
  4. # ddd-01-conn-blocking-tls demo:
  5. #
  6. # LD_LIBRARY_PATH=../../.. ./ddd-01-conn-blocking-tls
  7. #
  8. # Building ddd-06-mem-uv-tls and ddd-06-mem-uv-quic requires the
  9. # library libuv and header file. On Ubuntu, they are provided by the
  10. # package "libuv1-dev".
  11. TESTS_BASE = ddd-01-conn-blocking \
  12. ddd-02-conn-nonblocking \
  13. ddd-02-conn-nonblocking-threads \
  14. ddd-03-fd-blocking \
  15. ddd-04-fd-nonblocking \
  16. ddd-05-mem-nonblocking \
  17. ddd-06-mem-uv
  18. TESTS = $(foreach x,$(TESTS_BASE),$(x)-tls $(x)-quic)
  19. CFLAGS = -I../../../include -g -Wall -Wsign-compare
  20. LDFLAGS = -L../../..
  21. LDLIBS = -lcrypto -lssl
  22. CC_CMD = $(CC) $(CFLAGS) $(LDFLAGS) -o "$@" "$<" $(LDLIBS)
  23. all: $(TESTS)
  24. clean:
  25. rm -f $(TESTS) *.o
  26. ddd-%-tls: ddd-%.c
  27. $(CC_CMD)
  28. ddd-%-quic: ddd-%.c
  29. $(CC_CMD) -DUSE_QUIC
  30. ddd-%-uv-tls: ddd-%-uv.c
  31. $(CC_CMD) -luv
  32. ddd-%-uv-quic: ddd-%-uv.c
  33. $(CC_CMD) -luv -DUSE_QUIC