1SUBDIRS = crypto ssl tls include apps man
2if ENABLE_TESTS
3SUBDIRS += tests
4endif
5ACLOCAL_AMFLAGS = -I m4
6
7pkgconfigdir = $(libdir)/pkgconfig
8pkgconfig_DATA = libtls.pc
9if !ENABLE_LIBTLS_ONLY
10pkgconfig_DATA += libcrypto.pc libssl.pc openssl.pc
11endif
12
13EXTRA_DIST = README.md README.windows VERSION config scripts
14EXTRA_DIST += CMakeLists.txt cmake_export_symbol.cmake cmake_uninstall.cmake.in FindLibreSSL.cmake
15EXTRA_DIST += cert.pem openssl.cnf x509v3.cnf
16
17.PHONY: install_sw
18install_sw: install
19
20install-exec-hook:
21	@if [ "@OPENSSLDIR@x" != "x" ]; then \
22		OPENSSLDIR="$(DESTDIR)@OPENSSLDIR@"; \
23	else \
24		OPENSSLDIR="$(DESTDIR)$(sysconfdir)/ssl"; \
25	fi; \
26	mkdir -p "$$OPENSSLDIR/certs"; \
27	for i in cert.pem openssl.cnf x509v3.cnf; do \
28		if [ ! -f "$$OPENSSLDIR/$i" ]; then \
29			$(INSTALL) -m 644 "$(srcdir)/$$i" "$$OPENSSLDIR/$$i"; \
30		else \
31			echo " $$OPENSSLDIR/$$i already exists, install will not overwrite"; \
32		fi \
33	done
34
35uninstall-local:
36	@if [ "@OPENSSLDIR@x" != "x" ]; then \
37		OPENSSLDIR="$(DESTDIR)@OPENSSLDIR@"; \
38	else \
39		OPENSSLDIR="$(DESTDIR)$(sysconfdir)/ssl"; \
40	fi; \
41	for i in cert.pem openssl.cnf x509v3.cnf; do \
42		if cmp -s "$$OPENSSLDIR/$$i" "$(srcdir)/$$i"; then \
43			rm -f "$$OPENSSLDIR/$$i"; \
44		fi \
45	done
46