1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval
$(call gb_ExternalProject_ExternalProject
,openssl
))
12 $(eval
$(call gb_ExternalProject_register_targets
,openssl
,\
16 # For multi-line conditionals, align the $(if and the corresponding ),
17 # putting the latter on a line of its own. Also put the "else" comma
18 # on a line of its own. Hopefully should make the logic more clear.
21 $(if
$(filter LINUX FREEBSD ANDROID
,$(OS
)),\
22 $(if
$(filter INTEL
,$(CPUNAME
)),\
23 $(if
$(filter GNU
/kFreeBSD
,$(shell uname
)),debian-kfreebsd-i386
,linux-elf
)\
25 $(if
$(filter X86_64
,$(CPUNAME
)),\
26 $(if
$(filter GNU
/kFreeBSD
,$(shell uname
)),\
27 debian-kfreebsd-amd64\
29 $(if
$(filter FreeBSD
,$(shell uname
)), BSD-x86_64
,\
30 $(if
$(filter TRUE
, $(ENABLE_DBGUTIL
)), debug-linux-generic64
, linux-generic64
) no-asm\
34 $(if
$(filter TRUE
, $(ENABLE_DBGUTIL
)), debug-linux-generic32
, linux-generic32
)\
38 $(if
$(filter SOLARIS
,$(OS
)),\
39 $(if
$(filter INTEL
,$(CPUNAME
)),solaris-x86-cc
,\
40 $(if
$(filter X86_64
,$(CPUNAME
)),solaris64-x86_64-cc
,solaris-sparcv9-cc
)\
43 $(if
$(filter iOS
,$(OS
)),\
46 $(if
$(filter WNT
,$(OS
)),\
47 $(if
$(filter INTEL
,$(CPUNAME
)),VC-WIN32
)\
48 $(if
$(filter X86_64
,$(CPUNAME
)),VC-WIN64A
)\
49 $(if
$(filter AARCH64
,$(CPUNAME
)),VC-WIN64-ARM
)\
51 $(if
$(filter MACOSX
,$(OS
)),\
52 $(if
$(filter X86_64
,$(CPUNAME
)),darwin64-x86_64-cc
)\
53 $(if
$(filter AARCH64
,$(CPUNAME
)),darwin64-arm64-cc
)\
55 $(if
$(filter EMSCRIPTEN
,$(OS
)),no-engine no-dso no-dgram no-srtp no-err no-ocsp no-psk no-ts no-asm
) \
63 $(eval
$(call gb_ExternalProject_use_nmake
,openssl
,build
))
65 $(call gb_ExternalProject_get_state_target
,openssl
,build
):
66 $(call gb_Trace_StartRange
,openssl
,EXTERNAL
)
67 $(call gb_ExternalProject_run
,build
,\
68 CONFIGURE_INSIST
=1 $(PERL
) Configure
$(OPENSSL_PLATFORM
) no-tests no-multilib \
69 && export PERL
="$(shell cygpath -w $(PERL))" \
70 && nmake
-f makefile \
71 $(if
$(call gb_Module__symbols_enabled
,openssl
),DEBUG_FLAGS_VALUE
="$(gb_DEBUGINFO_FLAGS)") \
73 $(call gb_Trace_EndRange
,openssl
,EXTERNAL
)
76 $(call gb_ExternalProject_get_state_target
,openssl
,build
):
77 $(call gb_Trace_StartRange
,openssl
,EXTERNAL
)
78 $(call gb_ExternalProject_run
,build
,\
80 $(if
$(filter LINUX MACOSX FREEBSD ANDROID SOLARIS iOS
,$(OS
)), \
82 $(if
$(filter WNT
,$(OS
)), \
85 $(OPENSSL_PLATFORM
) no-dso no-shared no-tests no-multilib threads \
86 $(if
$(filter-out ANDROID iOS WNT
,$(OS
)), \
87 $(if
$(SYSBASE
),-I
$(SYSBASE
)/usr
/include -L
$(SYSBASE
)/usr
/lib
)) \
88 $(if
$(filter MACOSX
,$(OS
)),--prefix=/@.__________________________________________________OOO
) \
89 && $(MAKE
) build_libs \
91 $(if $(filter -fsanitize=undefined,$(CC)),-fno-sanitize=function) \
92 $(if $(filter TRUE, $(ENABLE_DBGUTIL)), -DPURIFY,) \
93 $(if $(filter-out WNT MACOSX,$(OS)),-fvisibility=hidden)" \
96 $(call gb_Trace_EndRange
,openssl
,EXTERNAL
)
97 # symlink lib dir for python3
100 # vim: set noet sw=4 ts=4: