[coop] Refactor/reuse mono_value_box_handle/mono_value_box_checked and reduce raw...
[mono-project.git] / mono / btls / Makefile.am
blob9b51fcc32b2268904437203553c3cd9edf5cf954
1 MONO_BTLS_SOURCES_FILES = \
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-time64.c \
15         btls-util.c \
16         btls-util.h \
17         btls-x509.c \
18         btls-x509-chain.c \
19         btls-x509-chain.h \
20         btls-x509-crl.c \
21         btls-x509-crl.h \
22         btls-x509.h \
23         btls-x509-lookup.c \
24         btls-x509-lookup.h \
25         btls-x509-lookup-mono.c \
26         btls-x509-lookup-mono.h \
27         btls-x509-name.c \
28         btls-x509-name.h \
29         btls-x509-revoked.c \
30         btls-x509-revoked.h \
31         btls-x509-store.c \
32         btls-x509-store-ctx.c \
33         btls-x509-store-ctx.h \
34         btls-x509-store.h \
35         btls-x509-verify-param.c \
36         btls-x509-verify-param.h \
37         CMakeLists.txt
39 EXTRA_DIST = $(MONO_BTLS_SOURCES_FILES)
41 CMAKE_VERBOSE=$(if $(V),VERBOSE=1,)
42 NINJA_VERBOSE=$(if ($V),-v,)
44 if NINJA
45 NINJA_ARGS = -G Ninja
46 BUILDFILE = build.ninja
47 CMAKE_MAKE_PROGRAM = $(shell which ninja-build || which ninja)
48 else
49 NINJA_ARGS =
50 BUILDFILE = Makefile
51 CMAKE_MAKE_PROGRAM = $(shell which gmake || which gnumake || which make)
52 endif
54 CMAKE_ARGS = -D CMAKE_MAKE_PROGRAM="$(CMAKE_MAKE_PROGRAM)" -D CMAKE_INSTALL_PREFIX:PATH="$(prefix)" -D BTLS_ROOT:PATH="$(BTLS_ROOT)" \
55         -D SRC_DIR:PATH="$(abs_top_srcdir)/mono/btls" -D BTLS_CFLAGS:STRING="$(BTLS_CFLAGS)" $(NINJA_ARGS)
57 all-local: build-shared/libmono-btls-shared$(libsuffix)
59 build-shared/$(BUILDFILE):
60         -mkdir -p build-shared
61         (cd build-shared && CC="$(CC)" CXX="$(CXX)" "$(CMAKE)" $(CMAKE_ARGS) $(BTLS_CMAKE_ARGS) -DBUILD_SHARED_LIBS=1 "$(abs_top_srcdir)/mono/btls")
63 if NINJA
64 build-shared/libmono-btls-shared$(libsuffix): build-shared/$(BUILDFILE) $(MONO_BTLS_SOURCES_FILES)
65         ninja -C build-shared $(NINJA_VERBOSE)
66 else
67 build-shared/libmono-btls-shared$(libsuffix): build-shared/$(BUILDFILE) $(MONO_BTLS_SOURCES_FILES)
68         $(MAKE) -C build-shared $(CMAKE_VERBOSE)
69 endif
71 clean-local:
72         -rm -rf build-shared
74 install-exec-local:
75         $(mkinstalldirs) "$(DESTDIR)$(libdir)"
76 if HOST_WIN32
77         $(mkinstalldirs) "$(DESTDIR)$(bindir)"
78         $(install_sh) build-shared/libmono-btls-shared*.a "$(DESTDIR)$(libdir)"
79         $(install_sh) build-shared/libmono-btls-shared*.dll "$(DESTDIR)$(bindir)"
80 else
81         $(install_sh) build-shared/libmono-btls-shared.* "$(DESTDIR)$(libdir)"
82 endif