17871dc3eSAndrew Rist#************************************************************** 2cdf0e10cSrcweir# 37871dc3eSAndrew Rist# Licensed to the Apache Software Foundation (ASF) under one 47871dc3eSAndrew Rist# or more contributor license agreements. See the NOTICE file 57871dc3eSAndrew Rist# distributed with this work for additional information 67871dc3eSAndrew Rist# regarding copyright ownership. The ASF licenses this file 77871dc3eSAndrew Rist# to you under the Apache License, Version 2.0 (the 87871dc3eSAndrew Rist# "License"); you may not use this file except in compliance 97871dc3eSAndrew Rist# with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir# 117871dc3eSAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir# 137871dc3eSAndrew Rist# Unless required by applicable law or agreed to in writing, 147871dc3eSAndrew Rist# software distributed under the License is distributed on an 157871dc3eSAndrew Rist# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 167871dc3eSAndrew Rist# KIND, either express or implied. See the License for the 177871dc3eSAndrew Rist# specific language governing permissions and limitations 187871dc3eSAndrew Rist# under the License. 19cdf0e10cSrcweir# 207871dc3eSAndrew Rist#************************************************************** 217871dc3eSAndrew Rist 227871dc3eSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweirPRJ=. 25cdf0e10cSrcweir 26cdf0e10cSrcweirPRJNAME=openssl 27cdf0e10cSrcweirTARGET=openssl 28cdf0e10cSrcweir 29cdf0e10cSrcweir# --- Settings ----------------------------------------------------- 30cdf0e10cSrcweir 31cdf0e10cSrcweir.INCLUDE : settings.mk 32cdf0e10cSrcweir 33cdf0e10cSrcweir# --- Files -------------------------------------------------------- 34cdf0e10cSrcweir 35cdf0e10cSrcweir.IF "$(SYSTEM_OPENSSL)" == "YES" 36cdf0e10cSrcweir@all: 37cdf0e10cSrcweir @echo "Using system openssl...." 38cdf0e10cSrcweir.ENDIF 39cdf0e10cSrcweir 40cdf0e10cSrcweir.IF "$(DISABLE_OPENSSL)" == "TRUE" 41cdf0e10cSrcweir@all: 42cdf0e10cSrcweir @echo "openssl disabled...." 43cdf0e10cSrcweir.ENDIF 44cdf0e10cSrcweir 45*c2b382cfSJim JagielskiOPENSSL_NAME=openssl-1.0.2u 46cdf0e10cSrcweir 47cdf0e10cSrcweirTARFILE_NAME=$(OPENSSL_NAME) 48*c2b382cfSJim JagielskiTARFILE_MD5=cdc2638f789ecc2db2c91488265686c1 49cdf0e10cSrcweir 50cdf0e10cSrcweirCONFIGURE_DIR=. 51cdf0e10cSrcweirCONFIGURE_ACTION=config 52cdf0e10cSrcweirCONFIGURE_FLAGS=-I$(SYSBASE)$/usr$/include -L$(SYSBASE)$/usr$/lib shared 53cdf0e10cSrcweir 54cdf0e10cSrcweirBUILD_DIR=. 558d4c92f7StruckmanBUILD_ACTION=make CC='$(CC)' build_libs 56cdf0e10cSrcweir 57cdf0e10cSrcweirOUT2LIB = libssl.* 58cdf0e10cSrcweirOUT2LIB += libcrypto.* 59cdf0e10cSrcweirOUT2INC += include/openssl/* 60cdf0e10cSrcweir 61cdf0e10cSrcweirUNAME=$(shell uname) 62cdf0e10cSrcweir 638d4c92f7Struckman.IF "$(COM)"=="GCC" && "$(CCNUMVER)">="000400060000" || "$(OS)"=="WNT" && "$(NASM_PATH)"=="NO_NASM_HOME" 648d4c92f7Struckman NO_ASM="no-asm" 658d4c92f7Struckman.ELSE 668d4c92f7Struckman NO_ASM= 678d4c92f7Struckman.ENDIF 688d4c92f7Struckman 69cdf0e10cSrcweir.IF "$(OS)" == "LINUX" || "$(OS)" == "FREEBSD" 70cdf0e10cSrcweir PATCH_FILES=openssllnx.patch 71cdf0e10cSrcweir .IF "$(CPU)" == "I" 72cdf0e10cSrcweir .IF "$(UNAME)" == "GNU/kFreeBSD" 738d4c92f7Struckman CONFIGURE_ACTION=Configure debian-kfreebsd-i386 no-dso no-shared $(NO_ASM) 748d4c92f7Struckman .ELIF "$(UNAME)" == "FreeBSD" 758d4c92f7Struckman CONFIGURE_ACTION=Configure BSD-x86-elf no-dso no-shared $(NO_ASM) 76cdf0e10cSrcweir .ELSE 778d4c92f7Struckman CONFIGURE_ACTION=Configure linux-generic32 no-dso no-shared $(NO_ASM) 78cdf0e10cSrcweir .ENDIF 79cdf0e10cSrcweir .ELIF "$(BUILD64)" == "1" 80cdf0e10cSrcweir .IF "$(UNAME)" == "GNU/kFreeBSD" 818d4c92f7Struckman CONFIGURE_ACTION=Configure debian-kfreebsd-amd64 no-dso no-shared $(NO_ASM) 828d4c92f7Struckman .ELIF "$(UNAME)" == "FreeBSD" 838d4c92f7Struckman CONFIGURE_ACTION=Configure BSD-x86_64 no-dso no-shared $(NO_ASM) 84cdf0e10cSrcweir .ELSE 858d4c92f7Struckman CONFIGURE_ACTION=Configure linux-x86_64 no-dso no-shared $(NO_ASM) 86cdf0e10cSrcweir .ENDIF 87cdf0e10cSrcweir .ELSE 888d4c92f7Struckman CONFIGURE_ACTION=Configure linux-generic32 no-dso no-shared $(NO_ASM) 89cdf0e10cSrcweir .ENDIF 90cdf0e10cSrcweir # if you build openssl as shared library you have to patch the Makefile.Shared "LD_LIBRARY_PATH=$$LD_LIBRARY_PATH \" 91cdf0e10cSrcweir #BUILD_ACTION=make 'SHARED_LDFLAGS=-Wl,--version-script=./lib$$(SHLIBDIRS)_OOo_0_9_8e.map' 92cdf0e10cSrcweir.ENDIF 93cdf0e10cSrcweir 94cdf0e10cSrcweir.IF "$(OS)" == "SOLARIS" 95cdf0e10cSrcweir PATCH_FILES=opensslsol.patch 96cdf0e10cSrcweir #BUILD_ACTION=make 'SHARED_LDFLAGS=-G -dy -z text -M./lib$$$$$$$$(SHLIBDIRS)_OOo_0_9_8e.map' 97cdf0e10cSrcweir 98cdf0e10cSrcweir # Use BUILD64 when 1 to select new specific 64bit Configurations if necessary 99cdf0e10cSrcweir 100cdf0e10cSrcweir .IF "$(CPUNAME)" == "INTEL" # Solaris INTEL 101cdf0e10cSrcweir .IF "$(CPU)" == "X" 102cdf0e10cSrcweir CONFIGURE_ACTION=Configure solaris64-x86_64-cc 103cdf0e10cSrcweir .ELSE 104cdf0e10cSrcweir CONFIGURE_ACTION=Configure solaris-x86-cc 105cdf0e10cSrcweir .ENDIF 106cdf0e10cSrcweir .ELIF "$(CPU)" == "U" # Solaris SPARC 107cdf0e10cSrcweir CONFIGURE_ACTION=Configure solaris64-sparcv9-cc 108cdf0e10cSrcweir .ELSE 109cdf0e10cSrcweir CONFIGURE_ACTION=Configure solaris-sparcv9-cc 110cdf0e10cSrcweir .ENDIF 111cdf0e10cSrcweir.ENDIF 112cdf0e10cSrcweir 113cdf0e10cSrcweir.IF "$(OS)" == "WNT" 114cdf0e10cSrcweir 115cdf0e10cSrcweir.IF "$(COM)"=="GCC" 116cdf0e10cSrcweirPATCH_FILES=opensslmingw.patch 117cdf0e10cSrcweir.IF "$(USE_MINGW)" == "cygwin" 118cdf0e10cSrcweirCONFIGURE_ACTION=$(PERL) configure 119cdf0e10cSrcweirCONFIGURE_FLAGS=mingw shared 120cdf0e10cSrcweirINSTALL_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 121cdf0e10cSrcweirOUT2LIB = libcrypto_static.* 122cdf0e10cSrcweirOUT2LIB += libssl_static.* 123cdf0e10cSrcweirOUT2LIB += libcrypto.* 124cdf0e10cSrcweirOUT2LIB += libssl.* 125cdf0e10cSrcweirOUT2BIN = ssleay32.dll 126cdf0e10cSrcweirOUT2BIN += libeay32.dll 127cdf0e10cSrcweir.ELSE 128cdf0e10cSrcweirCONFIGURE_ACTION= 129cdf0e10cSrcweirBUILD_ACTION=cmd /c "ms\mingw32" 130cdf0e10cSrcweirOUT2LIB = out/libcrypto_static.* 131cdf0e10cSrcweirOUT2LIB += out/libssl_static.* 132cdf0e10cSrcweirOUT2LIB += out/libcrypto.* 133cdf0e10cSrcweirOUT2LIB += out/libssl.* 134cdf0e10cSrcweirOUT2BIN = out/ssleay32.dll 135cdf0e10cSrcweirOUT2BIN += out/libeay32.dll 136cdf0e10cSrcweir.ENDIF 137cdf0e10cSrcweir.ELSE 138cdf0e10cSrcweir 139cdf0e10cSrcweir PATCH_FILES=openssl.patch 140cdf0e10cSrcweir .IF "$(MAKETARGETS)" == "" 141cdf0e10cSrcweir # The env. vars CC and PERL are used by nmake, and nmake insists on '\'s 142cdf0e10cSrcweir # If WRAPCMD is set it is prepended before the compiler, don't touch that. 143cdf0e10cSrcweir .IF "$(WRAPCMD)"=="" 144cdf0e10cSrcweir CC!:=$(subst,/,\ $(normpath,1 $(CC))) 145cdf0e10cSrcweir .EXPORT : CC 146cdf0e10cSrcweir .ENDIF 147cdf0e10cSrcweir PERL_bak:=$(PERL) 148cdf0e10cSrcweir PERL!:=$(subst,/,\ $(normpath,1 $(PERL))) 149cdf0e10cSrcweir .EXPORT : PERL 150cdf0e10cSrcweir PERL!:=$(PERL_bak) 151cdf0e10cSrcweir .ENDIF 152cdf0e10cSrcweir 153cdf0e10cSrcweir #CONFIGURE_ACTION=cmd /c $(PERL:s!\!/!) configure 154f26b964fSDamjan Jovanovic .IF "$(CPUNAME)"=="INTEL" 1558d4c92f7Struckman CONFIGURE_ACTION=$(PERL) configure $(NO_ASM) 156cdf0e10cSrcweir CONFIGURE_FLAGS=VC-WIN32 1578d4c92f7Struckman .IF "$(NASM_PATH)"=="NO_NASM_HOME" 158cdf0e10cSrcweir BUILD_ACTION=cmd /c "ms$(EMQ)\do_ms.bat $(subst,/,\ $(normpath,1 $(PERL)))" && nmake -f ms/ntdll.mak 1598d4c92f7Struckman .ELSE 1608d4c92f7Struckman BUILD_ACTION=cmd /c "ms$(EMQ)\do_nasm.bat $(subst,/,\ $(normpath,1 $(PERL)))" && nmake -f ms/ntdll.mak 1618d4c92f7Struckman .ENDIF 162f26b964fSDamjan Jovanovic .ELIF "$(CPUNAME)"=="X86_64" 163f26b964fSDamjan Jovanovic CONFIGURE_ACTION=$(PERL) configure $(NO_ASM) 164f26b964fSDamjan Jovanovic CONFIGURE_FLAGS=VC-WIN64A 165f26b964fSDamjan Jovanovic BUILD_ACTION=cmd /c "ms$(EMQ)\do_win64a.bat $(subst,/,\ $(normpath,1 $(PERL)))" && cmd /c "nmake -f ms/ntdll.mak" 166f26b964fSDamjan Jovanovic .ENDIF 167cdf0e10cSrcweir 168cdf0e10cSrcweir OUT2LIB = out32dll$/ssleay32.lib 169cdf0e10cSrcweir OUT2LIB += out32dll$/libeay32.lib 170cdf0e10cSrcweir OUT2BIN = out32dll$/ssleay32.dll 171cdf0e10cSrcweir OUT2BIN += out32dll$/libeay32.dll 172cdf0e10cSrcweir OUT2INC = inc32$/openssl$/* 173cdf0e10cSrcweir .ENDIF 174cdf0e10cSrcweir.ENDIF 175cdf0e10cSrcweir 176cdf0e10cSrcweir#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 && 177cdf0e10cSrcweir 178cdf0e10cSrcweir# --- Targets ------------------------------------------------------ 179cdf0e10cSrcweir 180cdf0e10cSrcweir.INCLUDE : set_ext.mk 181cdf0e10cSrcweir.INCLUDE : target.mk 182cdf0e10cSrcweir.INCLUDE : tg_ext.mk 183cdf0e10cSrcweir 184