xref: /openssl/doc/designs/ddd/Makefile (revision d1338fcf)
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
12TESTS_BASE = ddd-01-conn-blocking \
13             ddd-02-conn-nonblocking \
14             ddd-02-conn-nonblocking-threads \
15             ddd-03-fd-blocking \
16             ddd-04-fd-nonblocking \
17             ddd-05-mem-nonblocking \
18             ddd-06-mem-uv
19
20TESTS = $(foreach x,$(TESTS_BASE),$(x)-tls $(x)-quic)
21
22CFLAGS  = -I../../../include -g -Wall -Wsign-compare
23LDFLAGS = -L../../..
24LDLIBS  = -lcrypto -lssl
25
26CC_CMD = $(CC) $(CFLAGS) $(LDFLAGS) -o "$@" "$<" $(LDLIBS)
27
28all: $(TESTS)
29
30clean:
31	rm -f $(TESTS) *.o
32
33ddd-%-tls: ddd-%.c
34	$(CC_CMD)
35
36ddd-%-quic: ddd-%.c
37	$(CC_CMD) -DUSE_QUIC
38
39ddd-%-uv-tls: ddd-%-uv.c
40	$(CC_CMD) -luv
41
42ddd-%-uv-quic: ddd-%-uv.c
43	$(CC_CMD) -luv -DUSE_QUIC
44