1*cdf0e10cSrcweir#************************************************************************* 2*cdf0e10cSrcweir# 3*cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir# 5*cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir# 7*cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir# 9*cdf0e10cSrcweir# This file is part of OpenOffice.org. 10*cdf0e10cSrcweir# 11*cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir# only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir# 15*cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir# 21*cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir# version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir# <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir# for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir# 26*cdf0e10cSrcweir#************************************************************************* 27*cdf0e10cSrcweir 28*cdf0e10cSrcweirPRJ=. 29*cdf0e10cSrcweir 30*cdf0e10cSrcweirPRJNAME=openssl 31*cdf0e10cSrcweirTARGET=openssl 32*cdf0e10cSrcweir 33*cdf0e10cSrcweir# --- Settings ----------------------------------------------------- 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir.INCLUDE : settings.mk 36*cdf0e10cSrcweir 37*cdf0e10cSrcweir# --- Files -------------------------------------------------------- 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir.IF "$(SYSTEM_OPENSSL)" == "YES" 40*cdf0e10cSrcweir@all: 41*cdf0e10cSrcweir @echo "Using system openssl...." 42*cdf0e10cSrcweir.ENDIF 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir.IF "$(DISABLE_OPENSSL)" == "TRUE" 45*cdf0e10cSrcweir@all: 46*cdf0e10cSrcweir @echo "openssl disabled...." 47*cdf0e10cSrcweir.ENDIF 48*cdf0e10cSrcweir 49*cdf0e10cSrcweirOPENSSL_NAME=openssl-0.9.8o 50*cdf0e10cSrcweir 51*cdf0e10cSrcweirTARFILE_NAME=$(OPENSSL_NAME) 52*cdf0e10cSrcweirTARFILE_MD5=63ddc5116488985e820075e65fbe6aa4 53*cdf0e10cSrcweir 54*cdf0e10cSrcweirCONFIGURE_DIR=. 55*cdf0e10cSrcweirCONFIGURE_ACTION=config 56*cdf0e10cSrcweirCONFIGURE_FLAGS=-I$(SYSBASE)$/usr$/include -L$(SYSBASE)$/usr$/lib shared 57*cdf0e10cSrcweir 58*cdf0e10cSrcweirBUILD_DIR=. 59*cdf0e10cSrcweirBUILD_ACTION=make CC='$(CC)' 60*cdf0e10cSrcweir 61*cdf0e10cSrcweirOUT2LIB = libssl.* 62*cdf0e10cSrcweirOUT2LIB += libcrypto.* 63*cdf0e10cSrcweirOUT2INC += include/openssl/* 64*cdf0e10cSrcweir 65*cdf0e10cSrcweirUNAME=$(shell uname) 66*cdf0e10cSrcweir 67*cdf0e10cSrcweir.IF "$(OS)" == "LINUX" || "$(OS)" == "FREEBSD" 68*cdf0e10cSrcweir PATCH_FILES=openssllnx.patch 69*cdf0e10cSrcweir ADDITIONAL_FILES:= \ 70*cdf0e10cSrcweir libcrypto_OOo_0_9_8o.map \ 71*cdf0e10cSrcweir libssl_OOo_0_9_8o.map 72*cdf0e10cSrcweir .IF "$(CPU)" == "I" 73*cdf0e10cSrcweir .IF "$(UNAME)" == "GNU/kFreeBSD" 74*cdf0e10cSrcweir CONFIGURE_ACTION=Configure debian-kfreebsd-i386 75*cdf0e10cSrcweir .ELSE 76*cdf0e10cSrcweir CONFIGURE_ACTION=Configure linux-elf 77*cdf0e10cSrcweir .ENDIF 78*cdf0e10cSrcweir .ELIF "$(BUILD64)" == "1" 79*cdf0e10cSrcweir .IF "$(UNAME)" == "GNU/kFreeBSD" 80*cdf0e10cSrcweir CONFIGURE_ACTION=Configure debian-kfreebsd-amd64 81*cdf0e10cSrcweir .ELSE 82*cdf0e10cSrcweir CONFIGURE_ACTION=Configure linux-generic64 83*cdf0e10cSrcweir .ENDIF 84*cdf0e10cSrcweir .ELSE 85*cdf0e10cSrcweir CONFIGURE_ACTION=Configure linux-generic32 86*cdf0e10cSrcweir .ENDIF 87*cdf0e10cSrcweir # if you build openssl as shared library you have to patch the Makefile.Shared "LD_LIBRARY_PATH=$$LD_LIBRARY_PATH \" 88*cdf0e10cSrcweir #BUILD_ACTION=make 'SHARED_LDFLAGS=-Wl,--version-script=./lib$$(SHLIBDIRS)_OOo_0_9_8e.map' 89*cdf0e10cSrcweir.ENDIF 90*cdf0e10cSrcweir 91*cdf0e10cSrcweir.IF "$(OS)" == "SOLARIS" 92*cdf0e10cSrcweir PATCH_FILES=opensslsol.patch 93*cdf0e10cSrcweir ADDITIONAL_FILES:= \ 94*cdf0e10cSrcweir libcrypto_OOo_0_9_8o.map \ 95*cdf0e10cSrcweir libssl_OOo_0_9_8o.map 96*cdf0e10cSrcweir #BUILD_ACTION=make 'SHARED_LDFLAGS=-G -dy -z text -M./lib$$$$$$$$(SHLIBDIRS)_OOo_0_9_8e.map' 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir # Use BUILD64 when 1 to select new specific 64bit Configurations if necessary 99*cdf0e10cSrcweir 100*cdf0e10cSrcweir .IF "$(CPUNAME)" == "INTEL" # Solaris INTEL 101*cdf0e10cSrcweir .IF "$(CPU)" == "X" 102*cdf0e10cSrcweir CONFIGURE_ACTION=Configure solaris64-x86_64-cc 103*cdf0e10cSrcweir .ELSE 104*cdf0e10cSrcweir CONFIGURE_ACTION=Configure solaris-x86-cc 105*cdf0e10cSrcweir .ENDIF 106*cdf0e10cSrcweir .ELIF "$(CPU)" == "U" # Solaris SPARC 107*cdf0e10cSrcweir CONFIGURE_ACTION=Configure solaris64-sparcv9-cc 108*cdf0e10cSrcweir .ELSE 109*cdf0e10cSrcweir CONFIGURE_ACTION=Configure solaris-sparcv9-cc 110*cdf0e10cSrcweir .ENDIF 111*cdf0e10cSrcweir.ENDIF 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir.IF "$(OS)" == "WNT" 114*cdf0e10cSrcweir 115*cdf0e10cSrcweir.IF "$(COM)"=="GCC" 116*cdf0e10cSrcweirPATCH_FILES=opensslmingw.patch 117*cdf0e10cSrcweir.IF "$(USE_MINGW)" == "cygwin" 118*cdf0e10cSrcweirCONFIGURE_ACTION=$(PERL) configure 119*cdf0e10cSrcweirCONFIGURE_FLAGS=mingw shared 120*cdf0e10cSrcweirINSTALL_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 121*cdf0e10cSrcweirOUT2LIB = libcrypto_static.* 122*cdf0e10cSrcweirOUT2LIB += libssl_static.* 123*cdf0e10cSrcweirOUT2LIB += libcrypto.* 124*cdf0e10cSrcweirOUT2LIB += libssl.* 125*cdf0e10cSrcweirOUT2BIN = ssleay32.dll 126*cdf0e10cSrcweirOUT2BIN += libeay32.dll 127*cdf0e10cSrcweir.ELSE 128*cdf0e10cSrcweirCONFIGURE_ACTION= 129*cdf0e10cSrcweirBUILD_ACTION=cmd /c "ms\mingw32" 130*cdf0e10cSrcweirOUT2LIB = out/libcrypto_static.* 131*cdf0e10cSrcweirOUT2LIB += out/libssl_static.* 132*cdf0e10cSrcweirOUT2LIB += out/libcrypto.* 133*cdf0e10cSrcweirOUT2LIB += out/libssl.* 134*cdf0e10cSrcweirOUT2BIN = out/ssleay32.dll 135*cdf0e10cSrcweirOUT2BIN += out/libeay32.dll 136*cdf0e10cSrcweir.ENDIF 137*cdf0e10cSrcweir.ELSE 138*cdf0e10cSrcweir 139*cdf0e10cSrcweir PATCH_FILES=openssl.patch 140*cdf0e10cSrcweir .IF "$(MAKETARGETS)" == "" 141*cdf0e10cSrcweir # The env. vars CC and PERL are used by nmake, and nmake insists on '\'s 142*cdf0e10cSrcweir # If WRAPCMD is set it is prepended before the compiler, don't touch that. 143*cdf0e10cSrcweir .IF "$(WRAPCMD)"=="" 144*cdf0e10cSrcweir CC!:=$(subst,/,\ $(normpath,1 $(CC))) 145*cdf0e10cSrcweir .EXPORT : CC 146*cdf0e10cSrcweir .ENDIF 147*cdf0e10cSrcweir PERL_bak:=$(PERL) 148*cdf0e10cSrcweir PERL!:=$(subst,/,\ $(normpath,1 $(PERL))) 149*cdf0e10cSrcweir .EXPORT : PERL 150*cdf0e10cSrcweir PERL!:=$(PERL_bak) 151*cdf0e10cSrcweir .ENDIF 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir #CONFIGURE_ACTION=cmd /c $(PERL:s!\!/!) configure 154*cdf0e10cSrcweir CONFIGURE_ACTION=$(PERL) configure 155*cdf0e10cSrcweir CONFIGURE_FLAGS=VC-WIN32 156*cdf0e10cSrcweir BUILD_ACTION=cmd /c "ms$(EMQ)\do_ms.bat $(subst,/,\ $(normpath,1 $(PERL)))" && nmake -f ms/ntdll.mak 157*cdf0e10cSrcweir 158*cdf0e10cSrcweir OUT2LIB = out32dll$/ssleay32.lib 159*cdf0e10cSrcweir OUT2LIB += out32dll$/libeay32.lib 160*cdf0e10cSrcweir OUT2BIN = out32dll$/ssleay32.dll 161*cdf0e10cSrcweir OUT2BIN += out32dll$/libeay32.dll 162*cdf0e10cSrcweir OUT2INC = inc32$/openssl$/* 163*cdf0e10cSrcweir .ENDIF 164*cdf0e10cSrcweir.ENDIF 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir#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 && 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir# --- Targets ------------------------------------------------------ 169*cdf0e10cSrcweir 170*cdf0e10cSrcweir.INCLUDE : set_ext.mk 171*cdf0e10cSrcweir.INCLUDE : target.mk 172*cdf0e10cSrcweir.INCLUDE : tg_ext.mk 173*cdf0e10cSrcweir 174