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
.8o
51 TARFILE_NAME
=$(OPENSSL_NAME
)
52 TARFILE_MD5
=63ddc5116488985e820075e65fbe6aa4
55 CONFIGURE_ACTION
=config
56 CONFIGURE_FLAGS
=-I
$(SYSBASE
)$/usr
$/include -L
$(SYSBASE
)$/usr
$/lib shared no-idea
60 COMPILER_AND_FLAGS
=$(CC
)
61 #See fdo#35404 If we're only interested in getting a .a (i.e. not windows) then
62 #force everything, when possible, as hidden symbols
63 .IF
"$(OS)" != "WNT" && "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE"
64 COMPILER_AND_FLAGS
+=-fvisibility
=hidden
67 BUILD_ACTION
=make build_libs CC
='$(COMPILER_AND_FLAGS)'
70 OUT2LIB
+= libcrypto.
*
71 OUT2INC
+= include/openssl
/*
75 .IF
"$(OS)" == "LINUX" ||
"$(OS)" == "FREEBSD" ||
"$(OS)" == "ANDROID"
76 PATCH_FILES
=openssllnx.patch
78 libcrypto_OOo_0_9_8o.map \
81 .IF
"$(UNAME)" == "GNU/kFreeBSD"
82 CONFIGURE_ACTION
=Configure debian-kfreebsd-i386
84 CONFIGURE_ACTION
=Configure linux-elf
86 .ELIF
"$(BUILD64)" == "1"
87 .IF
"$(UNAME)" == "GNU/kFreeBSD"
88 CONFIGURE_ACTION
=Configure debian-kfreebsd-amd64
90 CONFIGURE_ACTION
=Configure linux-generic64
93 CONFIGURE_ACTION
=Configure linux-generic32
95 # if you build openssl as shared library you have to patch the Makefile.Shared "LD_LIBRARY_PATH=$$LD_LIBRARY_PATH \"
96 #BUILD_ACTION=make 'SHARED_LDFLAGS=-Wl,--version-script=./lib$$(SHLIBDIRS)_OOo_0_9_8e.map'
99 .IF
"$(OS)" == "SOLARIS"
100 PATCH_FILES
=opensslsol.patch
102 libcrypto_OOo_0_9_8o.map \
103 libssl_OOo_0_9_8o.map
104 #BUILD_ACTION=make 'SHARED_LDFLAGS=-G -dy -z text -M./lib$$$$$$$$(SHLIBDIRS)_OOo_0_9_8e.map'
106 # Use BUILD64 when 1 to select new specific 64bit Configurations if necessary
108 .IF
"$(CPUNAME)" == "INTEL" # Solaris INTEL
110 CONFIGURE_ACTION
=Configure solaris64-x86_64-cc
112 CONFIGURE_ACTION
=Configure solaris-x86-cc
114 .ELIF
"$(CPU)" == "U" # Solaris SPARC
115 CONFIGURE_ACTION
=Configure solaris64-sparcv9-cc
117 CONFIGURE_ACTION
=Configure solaris-sparcv9-cc
122 PATCH_FILES
=opensslios.patch
123 CONFIGURE_ACTION
=Configure ios-armv7
124 CONFIGURE_FLAGS
=no-shared no-idea
130 PATCH_FILES
=opensslmingw.patch
131 CONFIGURE_ACTION
=$(PERL
) configure
132 CONFIGURE_FLAGS
=mingw shared
133 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
134 OUT2LIB
= libcrypto_static.
*
135 OUT2LIB
+= libssl_static.
*
136 OUT2LIB
+= libcrypto.
*
138 OUT2BIN
= ssleay32.dll
139 OUT2BIN
+= libeay32.dll
142 PATCH_FILES
=openssl.patch
143 .IF
"$(MAKETARGETS)" == ""
144 # The env. vars CC and PERL are used by nmake, and nmake insists on '\'s
145 # If WRAPCMD is set it is prepended before the compiler, don't touch that.
147 CC
!:=$(subst,/,\
$(normpath
,1 $(CC
)))
151 PERL
!:=$(subst,/,\
$(normpath
,1 $(PERL
)))
156 #CONFIGURE_ACTION=cmd /c $(PERL:s!\!/!) configure
157 CONFIGURE_ACTION
=$(PERL
) configure
159 OPENSSL_PLATFORM
=VC-WIN32
161 OPENSSL_PLATFORM
=VC-WIN64A
163 CONFIGURE_FLAGS
=$(OPENSSL_PLATFORM
) no-idea
164 BUILD_ACTION
=cmd
/c
"ms$(EMQ)\do_ms.bat $(subst,/,\ $(normpath,1 $(PERL))) $(OPENSSL_PLATFORM)" && nmake
-f ms
/ntdll.mak
166 OUT2LIB
= out32dll
$/ssleay32.lib
167 OUT2LIB
+= out32dll
$/libeay32.lib
168 OUT2BIN
= out32dll
$/ssleay32.dll
169 OUT2BIN
+= out32dll
$/libeay32.dll
170 OUT2INC
= inc32
$/openssl
$/*
174 #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 &&
176 # --- Targets ------------------------------------------------------
178 .INCLUDE
: set_ext.mk