blob: 8476a6379e2428616fbd2a223ab9a0d60afd6b95 [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
Christian Heimesd9a4d1d2008-01-01 14:42:15 +000015INCLUDES=-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
Christian Heimesd9a4d1d2008-01-01 14:42:15 +000018SSL_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
Christian Heimesd9a4d1d2008-01-01 14:42:15 +000021HASH_SOURCE=../../Modules/_hashopenssl.c
Thomas Wouters00ee7ba2006-08-21 19:07:27 +000022
23all: _ssl$(SUFFIX) _hashlib$(SUFFIX)
24
25# Split compile/link into two steps to better support VSExtComp
Christian Heimesd9a4d1d2008-01-01 14:42:15 +000026_ssl$(SUFFIX): $(SSL_SOURCE) $(SSL_LIB_DIR)/libeay32.lib $(SSL_LIB_DIR)/ssleay32.lib ../../PC/*.h ../../Include/*.h
Thomas Wouters00ee7ba2006-08-21 19:07:27 +000027 @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
Christian Heimesd9a4d1d2008-01-01 14:42:15 +000033_hashlib$(SUFFIX): $(HASH_SOURCE) $(SSL_LIB_DIR)/libeay32.lib ../../PC/*.h ../../Include/*.h
Thomas Wouters00ee7ba2006-08-21 19:07:27 +000034 @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<<