diff options
Diffstat (limited to 'lib/ssl/c_src/Makefile.win32')
-rw-r--r-- | lib/ssl/c_src/Makefile.win32 | 147 |
1 files changed, 147 insertions, 0 deletions
diff --git a/lib/ssl/c_src/Makefile.win32 b/lib/ssl/c_src/Makefile.win32 new file mode 100644 index 0000000000..668cd2a28d --- /dev/null +++ b/lib/ssl/c_src/Makefile.win32 @@ -0,0 +1,147 @@ +# +# %CopyrightBegin% +# +# Copyright Ericsson AB 1999-2009. All Rights Reserved. +# +# The contents of this file are subject to the Erlang Public License, +# Version 1.1, (the "License"); you may not use this file except in +# compliance with the License. You should have received a copy of the +# Erlang Public License along with this software. If not, it can be +# retrieved online at http://www.erlang.org/. +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights and limitations +# under the License. +# +# %CopyrightEnd% +# + +# +# SSL - Makefile for Windows NT +# +# It is assumed that the following environment variables have been set: +# +# INCLUDE X:\MSDEV\INCLUDE +# LIB X:\MSDEV\LIB +# +# so that standard include files, and the socket library can be found. +# +# When ssl_esock.exe is run, the PATH environment variable must contain +# the name of a directory that contains ssleay32.dll and libeay32.dll, +# and windows socket dll. +# + +# Roots +!ifndef OPENSSL_ROOT +! error "Makefile.win32: ssl: OPENSSL_ROOT not set" +!endif + +TARGET = win32 + +BINDIR = ..\priv\bin\$(TARGET) +OBJDIR = ..\priv\obj\$(TARGET) + +!if !exist($(BINDIR)) +! if [mkdir $(BINDIR)] +! error "SSL: cannot create BINDIR" +! endif +!endif + +!if !exist($(OBJDIR)) +! if [mkdir $(OBJDIR)] +! error "SSL: cannot create OBJDIR" +! endif +!endif + +# Includes +# +OPENSSL_INCLUDE = $(OPENSSL_ROOT)\inc32 + +INCLUDES = /I. /I$(OPENSSL_INCLUDE) + +# Libraries +# +OPENSSL_LIBDIR = $(OPENSSL_ROOT)\out32dll +OPENSSL_LIBS = \ + $(OPENSSL_LIBDIR)\ssleay32.lib \ + $(OPENSSL_LIBDIR)\libeay32.lib + +!ifdef ESOCK_WINSOCK2 +WINSOCK_LIB = ws2_32.lib +DEFS = -DESOCK_WINSOCK2 +!else +WINSOCK_LIB = wsock32.lib +!endif + +# Compiler options +# +# NOTE: Size of fd_set is set in esock_winsock.h but can be overridden +# with a -D option here. +# +OPTS = /MDd /G5 /Ox /O2 /Ob2 /Z7 +DEFS = -D__WIN32__ -DWIN32 $(DEFS) +CFLAGS = $(INCLUDES) /nologo $(OPTS) $(DEFS) + +# Object files +# +SSL_BASE_OBJS = \ + $(OBJDIR)\esock.obj \ + $(OBJDIR)\debuglog.obj \ + $(OBJDIR)\esock_poll$(obj) \ + $(OBJDIR)\esock_osio.obj \ + $(OBJDIR)\esock_utils.obj \ + $(OBJDIR)\esock_posix_str.obj + +OPENSSL_OBJS = \ + $(OBJDIR)\esock_openssl.obj + +# +# Targets +# + +all: $(SSL_BASE_OBJS) $(OPENSSL_OBJS) $(BINDIR)\ssl_esock.exe + +clean: + del $(BINDIR)\*.exe + del $(OBJDIR)\*.obj + +# Inference rule .c.obj: +# +{.}.c{$(OBJDIR)}.obj: + $(CC) $(CFLAGS) /c /Fo$@ $(*B).c + +# Binary +# +$(BINDIR)\ssl_esock.exe: $(SSL_BASE_OBJS) $(OPENSSL_OBJS) + $(CC) /nologo $(SSL_BASE_OBJS) $(OPENSSL_OBJS) $(OPENSSL_LIBS) \ + $(WINSOCK_LIB) /Fe$(BINDIR)\ssl_esock.exe + + + +# Dependencies +# +$(OBJDIR)\esock.o: esock.h debuglog.h esock_ssl.h esock_osio.h \ + esock_utils.h esock_winsock.h +$(OBJDIR)\debuglog.o: debuglog.h esock_ssl.h esock_utils.h +$(OBJDIR)\esock_osio.o: esock_osio.h esock.h debuglog.h esock_utils.h \ + esock_winsock.h +$(OBJDIR)\esock_utils.o: esock_utils.h +$(OBJDIR)\esock_posix_str.o: esock_posix_str.h esock_winsock.h + +$(OBJDIR)\esock_openssl.o: esock.h esock_ssl.h debuglog.h esock_utils.h \ + $(OPENSSL_INCLUDE)\crypto.h \ + $(OPENSSL_INCLUDE)\ssl.h \ + $(OPENSSL_INCLUDE)\err.h + + + + + + + + + + + + |