[btls] Fix library install
[mono.git] / mono / btls / Makefile.am
1 EXTRA_DIST = btls-android-utils.c \
2         btls-bio.c \
3         btls-bio.h \
4         btls-error.c \
5         btls-error.h \
6         btls-key.c \
7         btls-key.h \
8         btls-pkcs12.c \
9         btls-pkcs12.h \
10         btls-ssl.c \
11         btls-ssl-ctx.c \
12         btls-ssl-ctx.h \
13         btls-ssl.h \
14         btls-util.c \
15         btls-util.h \
16         btls-x509.c \
17         btls-x509-chain.c \
18         btls-x509-chain.h \
19         btls-x509-crl.c \
20         btls-x509-crl.h \
21         btls-x509.h \
22         btls-x509-lookup.c \
23         btls-x509-lookup.h \
24         btls-x509-lookup-mono.c \
25         btls-x509-lookup-mono.h \
26         btls-x509-name.c \
27         btls-x509-name.h \
28         btls-x509-revoked.c \
29         btls-x509-revoked.h \
30         btls-x509-store.c \
31         btls-x509-store-ctx.c \
32         btls-x509-store-ctx.h \
33         btls-x509-store.h \
34         btls-x509-verify-param.c \
35         btls-x509-verify-param.h \
36         CMakeLists.txt
37
38 CMAKE_VERBOSE=$(if $(V),VERBOSE=1,)
39
40 CMAKE_ARGS = -D CMAKE_INSTALL_PREFIX:PATH=$(prefix) -D BTLS_ROOT:PATH=$(BTLS_ROOT) \
41         -D SRC_DIR:PATH=$(abs_top_srcdir)/mono/btls -D BTLS_CFLAGS:STRING="$(BTLS_CFLAGS)"
42
43 all-local: build-shared/libmono-btls-shared$(libsuffix) build-static/libmono-btls-static.a
44
45 build-shared/Makefile:
46         -mkdir -p build-shared
47         (cd build-shared && $(CMAKE) $(CMAKE_ARGS) $(BTLS_CMAKE_ARGS) -DBUILD_SHARED_LIBS=1 $(abs_top_srcdir)/mono/btls)
48
49 build-shared/libmono-btls-shared$(libsuffix): build-shared/Makefile
50         $(MAKE) -C build-shared $(CMAKE_VERBOSE)
51
52 build-static/Makefile:
53         -mkdir -p build-static
54         (cd build-static && $(CMAKE) $(CMAKE_ARGS) $(BTLS_CMAKE_ARGS) $(abs_top_srcdir)/mono/btls)
55
56 build-static/libmono-btls-static.a: build-static/Makefile
57         $(MAKE) -C build-static $(CMAKE_VERBOSE)
58
59 clean-local:
60         -rm -rf build-static
61         -rm -rf build-shared
62
63 install-exec-local:
64         $(mkinstalldirs) "$(DESTDIR)$(libdir)"
65         $(install_sh) build-shared/libmono-btls-shared.* "$(DESTDIR)$(libdir)"