1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22 23 24PRJ=. 25 26PRJNAME=openssl 27TARGET=openssl 28 29# --- Settings ----------------------------------------------------- 30 31.INCLUDE : settings.mk 32 33# --- Files -------------------------------------------------------- 34 35.IF "$(SYSTEM_OPENSSL)" == "YES" 36@all: 37 @echo "Using system openssl...." 38.ENDIF 39 40.IF "$(DISABLE_OPENSSL)" == "TRUE" 41@all: 42 @echo "openssl disabled...." 43.ENDIF 44 45OPENSSL_NAME=openssl-0.9.8o 46 47TARFILE_NAME=$(OPENSSL_NAME) 48TARFILE_MD5=63ddc5116488985e820075e65fbe6aa4 49 50CONFIGURE_DIR=. 51CONFIGURE_ACTION=config 52CONFIGURE_FLAGS=-I$(SYSBASE)$/usr$/include -L$(SYSBASE)$/usr$/lib shared 53 54BUILD_DIR=. 55BUILD_ACTION=make CC='$(CC)' 56 57OUT2LIB = libssl.* 58OUT2LIB += libcrypto.* 59OUT2INC += include/openssl/* 60 61UNAME=$(shell uname) 62 63.IF "$(OS)" == "LINUX" || "$(OS)" == "FREEBSD" 64 PATCH_FILES=openssllnx.patch 65 ADDITIONAL_FILES:= \ 66 libcrypto_OOo_0_9_8o.map \ 67 libssl_OOo_0_9_8o.map 68 .IF "$(CPU)" == "I" 69 .IF "$(UNAME)" == "GNU/kFreeBSD" 70 CONFIGURE_ACTION=Configure debian-kfreebsd-i386 71 .ELSE 72 CONFIGURE_ACTION=Configure linux-elf 73 .ENDIF 74 .ELIF "$(BUILD64)" == "1" 75 .IF "$(UNAME)" == "GNU/kFreeBSD" 76 CONFIGURE_ACTION=Configure debian-kfreebsd-amd64 77 .ELSE 78 CONFIGURE_ACTION=Configure linux-generic64 79 .ENDIF 80 .ELSE 81 CONFIGURE_ACTION=Configure linux-generic32 82 .ENDIF 83 # if you build openssl as shared library you have to patch the Makefile.Shared "LD_LIBRARY_PATH=$$LD_LIBRARY_PATH \" 84 #BUILD_ACTION=make 'SHARED_LDFLAGS=-Wl,--version-script=./lib$$(SHLIBDIRS)_OOo_0_9_8e.map' 85.ENDIF 86 87.IF "$(OS)" == "SOLARIS" 88 PATCH_FILES=opensslsol.patch 89 ADDITIONAL_FILES:= \ 90 libcrypto_OOo_0_9_8o.map \ 91 libssl_OOo_0_9_8o.map 92 #BUILD_ACTION=make 'SHARED_LDFLAGS=-G -dy -z text -M./lib$$$$$$$$(SHLIBDIRS)_OOo_0_9_8e.map' 93 94 # Use BUILD64 when 1 to select new specific 64bit Configurations if necessary 95 96 .IF "$(CPUNAME)" == "INTEL" # Solaris INTEL 97 .IF "$(CPU)" == "X" 98 CONFIGURE_ACTION=Configure solaris64-x86_64-cc 99 .ELSE 100 CONFIGURE_ACTION=Configure solaris-x86-cc 101 .ENDIF 102 .ELIF "$(CPU)" == "U" # Solaris SPARC 103 CONFIGURE_ACTION=Configure solaris64-sparcv9-cc 104 .ELSE 105 CONFIGURE_ACTION=Configure solaris-sparcv9-cc 106 .ENDIF 107.ENDIF 108 109.IF "$(OS)" == "WNT" 110 111.IF "$(COM)"=="GCC" 112PATCH_FILES=opensslmingw.patch 113.IF "$(USE_MINGW)" == "cygwin" 114CONFIGURE_ACTION=$(PERL) configure 115CONFIGURE_FLAGS=mingw shared 116INSTALL_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 117OUT2LIB = libcrypto_static.* 118OUT2LIB += libssl_static.* 119OUT2LIB += libcrypto.* 120OUT2LIB += libssl.* 121OUT2BIN = ssleay32.dll 122OUT2BIN += libeay32.dll 123.ELSE 124CONFIGURE_ACTION= 125BUILD_ACTION=cmd /c "ms\mingw32" 126OUT2LIB = out/libcrypto_static.* 127OUT2LIB += out/libssl_static.* 128OUT2LIB += out/libcrypto.* 129OUT2LIB += out/libssl.* 130OUT2BIN = out/ssleay32.dll 131OUT2BIN += out/libeay32.dll 132.ENDIF 133.ELSE 134 135 PATCH_FILES=openssl.patch 136 .IF "$(MAKETARGETS)" == "" 137 # The env. vars CC and PERL are used by nmake, and nmake insists on '\'s 138 # If WRAPCMD is set it is prepended before the compiler, don't touch that. 139 .IF "$(WRAPCMD)"=="" 140 CC!:=$(subst,/,\ $(normpath,1 $(CC))) 141 .EXPORT : CC 142 .ENDIF 143 PERL_bak:=$(PERL) 144 PERL!:=$(subst,/,\ $(normpath,1 $(PERL))) 145 .EXPORT : PERL 146 PERL!:=$(PERL_bak) 147 .ENDIF 148 149 #CONFIGURE_ACTION=cmd /c $(PERL:s!\!/!) configure 150 CONFIGURE_ACTION=$(PERL) configure 151 CONFIGURE_FLAGS=VC-WIN32 152 BUILD_ACTION=cmd /c "ms$(EMQ)\do_ms.bat $(subst,/,\ $(normpath,1 $(PERL)))" && nmake -f ms/ntdll.mak 153 154 OUT2LIB = out32dll$/ssleay32.lib 155 OUT2LIB += out32dll$/libeay32.lib 156 OUT2BIN = out32dll$/ssleay32.dll 157 OUT2BIN += out32dll$/libeay32.dll 158 OUT2INC = inc32$/openssl$/* 159 .ENDIF 160.ENDIF 161 162PATCH_FILES += openssl-0.9.8o-clang.patch 163 164#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 && 165 166# --- Targets ------------------------------------------------------ 167 168.INCLUDE : set_ext.mk 169.INCLUDE : target.mk 170.INCLUDE : tg_ext.mk 171 172