blob: 3420ef13f32b1859d486fa780fb0c00e4194d6ff [file] [log] [blame]
Guido van Rossumcd16bf62007-06-13 18:07:49 +00001EXTRA_LIBS=
Mark Hammondf229f9f2002-12-03 05:47:26 +00002
3!IFDEF DEBUG
Thomas Wouters00ee7ba2006-08-21 19:07:27 +00004SUFFIX=_d.pyd
5TEMP=x86-temp-debug/
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00006CFLAGS=/Od /Zi /MDd /LDd /DDEBUG /D_DEBUG /DWIN32
Mark Hammondf229f9f2002-12-03 05:47:26 +00007SSL_LIB_DIR=$(SSL_DIR)/out32.dbg
8!ELSE
Thomas Wouters00ee7ba2006-08-21 19:07:27 +00009SUFFIX=.pyd
10TEMP=x86-temp-release/
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011CFLAGS=/Ox /MD /LD /DWIN32
Mark Hammondf229f9f2002-12-03 05:47:26 +000012SSL_LIB_DIR=$(SSL_DIR)/out32
13!ENDIF
14
15INCLUDES=-I ../Include -I ../PC -I $(SSL_DIR)/inc32
Mark Hammondf229f9f2002-12-03 05:47:26 +000016
Thomas Wouters00ee7ba2006-08-21 19:07:27 +000017SSL_LIBS=gdi32.lib wsock32.lib user32.lib advapi32.lib /LIBPATH:$(SSL_LIB_DIR) libeay32.lib ssleay32.lib
18SSL_SOURCE=../Modules/_ssl.c
Mark Hammondf229f9f2002-12-03 05:47:26 +000019
Thomas Wouters00ee7ba2006-08-21 19:07:27 +000020HASH_LIBS=gdi32.lib user32.lib advapi32.lib /libpath:$(SSL_LIB_DIR) libeay32.lib
21HASH_SOURCE=../Modules/_hashopenssl.c
22
23all: _ssl$(SUFFIX) _hashlib$(SUFFIX)
24
25# Split compile/link into two steps to better support VSExtComp
26_ssl$(SUFFIX): $(SSL_SOURCE) $(SSL_LIB_DIR)/libeay32.lib $(SSL_LIB_DIR)/ssleay32.lib ../PC/*.h ../Include/*.h
27 @if not exist "$(TEMP)/_ssl/." mkdir "$(TEMP)/_ssl"
28 cl /nologo /c $(SSL_SOURCE) $(CFLAGS) /Fo$(TEMP)\_ssl\$*.obj $(INCLUDES)
29 link /nologo @<<
Guido van Rossumcd16bf62007-06-13 18:07:49 +000030 /dll /out:_ssl$(SUFFIX) $(TEMP)\_ssl\$*.obj $(SSL_LIBS) $(EXTRA_LIBS)
Thomas Wouters00ee7ba2006-08-21 19:07:27 +000031<<
32
33_hashlib$(SUFFIX): $(HASH_SOURCE) $(SSL_LIB_DIR)/libeay32.lib ../PC/*.h ../Include/*.h
34 @if not exist "$(TEMP)/_hashlib/." mkdir "$(TEMP)/_hashlib"
Thomas Woutersb2137042007-02-01 18:02:27 +000035 cl /nologo /c $(HASH_SOURCE) $(CFLAGS) $(EXTRA_CFLAGS) /Fo$(TEMP)\_hashlib\$*.obj $(INCLUDES)
Thomas Wouters00ee7ba2006-08-21 19:07:27 +000036 link /nologo @<<
Guido van Rossumcd16bf62007-06-13 18:07:49 +000037 /dll /out:_hashlib$(SUFFIX) $(HASH_LIBS) $(EXTRA_LIBS) $(TEMP)\_hashlib\$*.obj
Thomas Wouters00ee7ba2006-08-21 19:07:27 +000038<<