xref: /openssl/demos/guide/Makefile (revision f4b4a185)
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:
4#
5#    LD_LIBRARY_PATH=../.. ./tls-client-block www.example.com 443
6
7TESTS = tls-client-block \
8        tls-server-block \
9        quic-client-block \
10        quic-multi-stream \
11        tls-client-non-block \
12        quic-client-non-block
13
14CFLAGS  = -I../../include -g -Wall
15LDFLAGS = -L../..
16LDLIBS  = -lcrypto -lssl
17
18all: $(TESTS) chain
19
20tls-client-block: tls-client-block.o
21tls-server-block: tls-server-block.o
22quic-client-block: quic-client-block.o
23quic-multi-stream: quic-multi-stream.o
24tls-client-non-block: tls-client-non-block.o
25quic-client-non-block: quic-client-non-block.o
26
27chain: chain.pem
28pkey.pem:
29	openssl genpkey -algorithm rsa -out pkey.pem -pkeyopt rsa_keygen_bits:2048
30chain.pem: pkey.pem
31	openssl req -x509 -new -key pkey.pem -days 36500 -subj / -out chain.pem
32
33$(TESTS):
34	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LDLIBS)
35
36clean:
37	$(RM) $(TESTS) *.o
38
39.PHONY: test chain
40test: all
41	@echo "\nTLS and QUIC tests:"
42	@echo "skipped"
43