1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org. If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
26 #*************************************************************************
33 # --- Settings -----------------------------------------------------
35 .INCLUDE
: settings.mk
37 # --- Files --------------------------------------------------------
39 .IF
"$(SYSTEM_OPENSSL)" == "YES"
41 @echo
"Using system openssl...."
44 .IF
"$(DISABLE_OPENSSL)" == "TRUE"
46 @echo
"openssl disabled...."
49 OPENSSL_NAME
=openssl-0.9
.8v
51 TARFILE_NAME
=$(OPENSSL_NAME
)
52 TARFILE_MD5
=51a40a81b3b7abe8a5c33670bd3da0ce
53 PATCH_FILES
=openssl-asm-fix.patch
56 CONFIGURE_ACTION
=config
57 .IF
"$(OS)" == "ANDROID"
58 CONFIGURE_FLAGS
=shared no-idea
60 # explicitly including /usr/include seems hyper-broken anyway but ...
61 CONFIGURE_FLAGS
=-I
$(SYSBASE
)$/usr
$/include -L
$(SYSBASE
)$/usr
$/lib shared no-idea
64 .IF
"$(OS)" == "MACOSX"
66 --prefix=/@.__________________________________________________
$(EXTRPATH
)
71 COMPILER_AND_FLAGS
=$(CC
)
72 #See fdo#35404 If we're only interested in getting a .a (i.e. not windows) then
73 #force everything, when possible, as hidden symbols
74 .IF
"$(OS)" != "WNT" && "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
75 COMPILER_AND_FLAGS
+=-fvisibility
=hidden
78 BUILD_ACTION
=make build_libs CC
='$(COMPILER_AND_FLAGS)' -j1
81 OUT2LIB
+= libcrypto.
*
82 OUT2INC
+= include/openssl
/*
86 .IF
"$(OS)" == "LINUX" ||
"$(OS)" == "FREEBSD" ||
"$(OS)" == "ANDROID"
87 PATCH_FILES
+=openssllnx.patch
89 libcrypto_OOo_0_9_8v.map \
92 .IF
"$(UNAME)" == "GNU/kFreeBSD"
93 CONFIGURE_ACTION
=Configure debian-kfreebsd-i386
95 CONFIGURE_ACTION
=Configure linux-elf
97 .ELIF
"$(BUILD64)" == "1"
98 .IF
"$(UNAME)" == "GNU/kFreeBSD"
99 CONFIGURE_ACTION
=Configure debian-kfreebsd-amd64
101 CONFIGURE_ACTION
=Configure linux-generic64
104 CONFIGURE_ACTION
=Configure linux-generic32
106 # if you build openssl as shared library you have to patch the Makefile.Shared "LD_LIBRARY_PATH=$$LD_LIBRARY_PATH \"
107 #BUILD_ACTION=make 'SHARED_LDFLAGS=-Wl,--version-script=./lib$$(SHLIBDIRS)_OOo_0_9_8v.map'
110 .IF
"$(OS)" == "SOLARIS"
111 PATCH_FILES
+=opensslsol.patch
113 libcrypto_OOo_0_9_8v.map \
114 libssl_OOo_0_9_8v.map
115 #BUILD_ACTION=make 'SHARED_LDFLAGS=-G -dy -z text -M./lib$$$$$$$$(SHLIBDIRS)_OOo_0_9_8v.map'
117 # Use BUILD64 when 1 to select new specific 64bit Configurations if necessary
119 .IF
"$(CPUNAME)" == "INTEL" # Solaris INTEL
121 CONFIGURE_ACTION
=Configure solaris64-x86_64-cc
123 CONFIGURE_ACTION
=Configure solaris-x86-cc
125 .ELIF
"$(CPU)" == "U" # Solaris SPARC
126 CONFIGURE_ACTION
=Configure solaris64-sparcv9-cc
128 CONFIGURE_ACTION
=Configure solaris-sparcv9-cc
133 PATCH_FILES
+=opensslios.patch
134 CONFIGURE_ACTION
=Configure ios-armv7
135 CONFIGURE_FLAGS
=no-shared no-idea
141 PATCH_FILES
+=opensslmingw.patch
142 CONFIGURE_ACTION
=$(PERL
) Configure
143 CONFIGURE_FLAGS
=mingw shared
144 INSTALL_ACTION
=mv libcrypto.a libcrypto_static.a
&& mv libcrypto.dll.a libcrypto.a
&& mv libssl.a libssl_static.a
&& mv libssl.dll.a libssl.a
145 OUT2LIB
= libcrypto_static.
*
146 OUT2LIB
+= libssl_static.
*
147 OUT2LIB
+= libcrypto.
*
149 OUT2BIN
= ssleay32.dll
150 OUT2BIN
+= libeay32.dll
153 PATCH_FILES
+=openssl.patch
154 .IF
"$(MAKETARGETS)" == ""
155 # The env. vars CC and PERL are used by nmake, and nmake insists on '\'s
156 # If WRAPCMD is set it is prepended before the compiler, don't touch that.
158 CC
!:=$(subst,/,\
$(normpath
,1 $(CC
:1)))
159 CC
!:=$(CC
:s
/ccache
/ccache cl.exe
/)
163 PERL
!:=$(subst,/,\
$(normpath
,1 $(PERL
)))
168 #CONFIGURE_ACTION=cmd /c $(PERL:s!\!/!) configure
169 CONFIGURE_ACTION
=$(PERL
) configure
171 OPENSSL_PLATFORM
=VC-WIN32
173 OPENSSL_PLATFORM
=VC-WIN64A
175 CONFIGURE_FLAGS
=$(OPENSSL_PLATFORM
) no-idea
176 BUILD_ACTION
=cmd
/c
"ms$(EMQ)\do_ms.bat $(subst,/,\ $(normpath,1 $(PERL))) $(OPENSSL_PLATFORM)" && nmake
-f ms
/ntdll.mak
178 OUT2LIB
= out32dll
$/ssleay32.lib
179 OUT2LIB
+= out32dll
$/libeay32.lib
180 OUT2BIN
= out32dll
$/ssleay32.dll
181 OUT2BIN
+= out32dll
$/libeay32.dll
182 OUT2INC
= inc32
$/openssl
$/*
186 #set INCLUDE=D:\sol_temp\n\msvc7net3\PlatformSDK\include;D:\sol_temp\n\msvc7net3\include\ && set path=%path%;D:\sol_temp\r\btw\SRC680\perl\bin &&
188 # --- Targets ------------------------------------------------------
190 .INCLUDE
: set_ext.mk