4
# Copyright Ericsson AB 1999-2009. All Rights Reserved.
6
# The contents of this file are subject to the Erlang Public License,
7
# Version 1.1, (the "License"); you may not use this file except in
8
# compliance with the License. You should have received a copy of the
9
# Erlang Public License along with this software. If not, it can be
10
# retrieved online at http://www.erlang.org/.
12
# Software distributed under the License is distributed on an "AS IS"
13
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
# the License for the specific language governing rights and limitations
21
# SSL - Makefile for Windows NT
23
# It is assumed that the following environment variables have been set:
25
# INCLUDE X:\MSDEV\INCLUDE
28
# so that standard include files, and the socket library can be found.
30
# When ssl_esock.exe is run, the PATH environment variable must contain
31
# the name of a directory that contains ssleay32.dll and libeay32.dll,
32
# and windows socket dll.
37
! error "Makefile.win32: ssl: OPENSSL_ROOT not set"
42
BINDIR = ..\priv\bin\$(TARGET)
43
OBJDIR = ..\priv\obj\$(TARGET)
46
! if [mkdir $(BINDIR)]
47
! error "SSL: cannot create BINDIR"
52
! if [mkdir $(OBJDIR)]
53
! error "SSL: cannot create OBJDIR"
59
OPENSSL_INCLUDE = $(OPENSSL_ROOT)\inc32
61
INCLUDES = /I. /I$(OPENSSL_INCLUDE)
65
OPENSSL_LIBDIR = $(OPENSSL_ROOT)\out32dll
67
$(OPENSSL_LIBDIR)\ssleay32.lib \
68
$(OPENSSL_LIBDIR)\libeay32.lib
71
WINSOCK_LIB = ws2_32.lib
72
DEFS = -DESOCK_WINSOCK2
74
WINSOCK_LIB = wsock32.lib
79
# NOTE: Size of fd_set is set in esock_winsock.h but can be overridden
80
# with a -D option here.
82
OPTS = /MDd /G5 /Ox /O2 /Ob2 /Z7
83
DEFS = -D__WIN32__ -DWIN32 $(DEFS)
84
CFLAGS = $(INCLUDES) /nologo $(OPTS) $(DEFS)
90
$(OBJDIR)\debuglog.obj \
91
$(OBJDIR)\esock_poll$(obj) \
92
$(OBJDIR)\esock_osio.obj \
93
$(OBJDIR)\esock_utils.obj \
94
$(OBJDIR)\esock_posix_str.obj
97
$(OBJDIR)\esock_openssl.obj
103
all: $(SSL_BASE_OBJS) $(OPENSSL_OBJS) $(BINDIR)\ssl_esock.exe
109
# Inference rule .c.obj:
111
{.}.c{$(OBJDIR)}.obj:
112
$(CC) $(CFLAGS) /c /Fo$@ $(*B).c
116
$(BINDIR)\ssl_esock.exe: $(SSL_BASE_OBJS) $(OPENSSL_OBJS)
117
$(CC) /nologo $(SSL_BASE_OBJS) $(OPENSSL_OBJS) $(OPENSSL_LIBS) \
118
$(WINSOCK_LIB) /Fe$(BINDIR)\ssl_esock.exe
124
$(OBJDIR)\esock.o: esock.h debuglog.h esock_ssl.h esock_osio.h \
125
esock_utils.h esock_winsock.h
126
$(OBJDIR)\debuglog.o: debuglog.h esock_ssl.h esock_utils.h
127
$(OBJDIR)\esock_osio.o: esock_osio.h esock.h debuglog.h esock_utils.h \
129
$(OBJDIR)\esock_utils.o: esock_utils.h
130
$(OBJDIR)\esock_posix_str.o: esock_posix_str.h esock_winsock.h
132
$(OBJDIR)\esock_openssl.o: esock.h esock_ssl.h debuglog.h esock_utils.h \
133
$(OPENSSL_INCLUDE)\crypto.h \
134
$(OPENSSL_INCLUDE)\ssl.h \
135
$(OPENSSL_INCLUDE)\err.h