Guido van Rossum | cd16bf6 | 2007-06-13 18:07:49 +0000 | [diff] [blame] | 1 | EXTRA_LIBS= |
Mark Hammond | f229f9f | 2002-12-03 05:47:26 +0000 | [diff] [blame] | 2 | |
| 3 | !IFDEF DEBUG |
Thomas Wouters | 00ee7ba | 2006-08-21 19:07:27 +0000 | [diff] [blame] | 4 | SUFFIX=_d.pyd |
| 5 | TEMP=x86-temp-debug/ |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 6 | CFLAGS=/Od /Zi /MDd /LDd /DDEBUG /D_DEBUG /DWIN32 |
Mark Hammond | f229f9f | 2002-12-03 05:47:26 +0000 | [diff] [blame] | 7 | SSL_LIB_DIR=$(SSL_DIR)/out32.dbg |
| 8 | !ELSE |
Thomas Wouters | 00ee7ba | 2006-08-21 19:07:27 +0000 | [diff] [blame] | 9 | SUFFIX=.pyd |
| 10 | TEMP=x86-temp-release/ |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 11 | CFLAGS=/Ox /MD /LD /DWIN32 |
Mark Hammond | f229f9f | 2002-12-03 05:47:26 +0000 | [diff] [blame] | 12 | SSL_LIB_DIR=$(SSL_DIR)/out32 |
| 13 | !ENDIF |
| 14 | |
Christian Heimes | d9a4d1d | 2008-01-01 14:42:15 +0000 | [diff] [blame] | 15 | INCLUDES=-I ../../Include -I ../../PC -I $(SSL_DIR)/inc32 |
Mark Hammond | f229f9f | 2002-12-03 05:47:26 +0000 | [diff] [blame] | 16 | |
Thomas Wouters | 00ee7ba | 2006-08-21 19:07:27 +0000 | [diff] [blame] | 17 | SSL_LIBS=gdi32.lib wsock32.lib user32.lib advapi32.lib /LIBPATH:$(SSL_LIB_DIR) libeay32.lib ssleay32.lib |
Christian Heimes | d9a4d1d | 2008-01-01 14:42:15 +0000 | [diff] [blame] | 18 | SSL_SOURCE=../../Modules/_ssl.c |
Mark Hammond | f229f9f | 2002-12-03 05:47:26 +0000 | [diff] [blame] | 19 | |
Thomas Wouters | 00ee7ba | 2006-08-21 19:07:27 +0000 | [diff] [blame] | 20 | HASH_LIBS=gdi32.lib user32.lib advapi32.lib /libpath:$(SSL_LIB_DIR) libeay32.lib |
Christian Heimes | d9a4d1d | 2008-01-01 14:42:15 +0000 | [diff] [blame] | 21 | HASH_SOURCE=../../Modules/_hashopenssl.c |
Thomas Wouters | 00ee7ba | 2006-08-21 19:07:27 +0000 | [diff] [blame] | 22 | |
| 23 | all: _ssl$(SUFFIX) _hashlib$(SUFFIX) |
| 24 | |
| 25 | # Split compile/link into two steps to better support VSExtComp |
Christian Heimes | d9a4d1d | 2008-01-01 14:42:15 +0000 | [diff] [blame] | 26 | _ssl$(SUFFIX): $(SSL_SOURCE) $(SSL_LIB_DIR)/libeay32.lib $(SSL_LIB_DIR)/ssleay32.lib ../../PC/*.h ../../Include/*.h |
Thomas Wouters | 00ee7ba | 2006-08-21 19:07:27 +0000 | [diff] [blame] | 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 Rossum | cd16bf6 | 2007-06-13 18:07:49 +0000 | [diff] [blame] | 30 | /dll /out:_ssl$(SUFFIX) $(TEMP)\_ssl\$*.obj $(SSL_LIBS) $(EXTRA_LIBS) |
Thomas Wouters | 00ee7ba | 2006-08-21 19:07:27 +0000 | [diff] [blame] | 31 | << |
| 32 | |
Christian Heimes | d9a4d1d | 2008-01-01 14:42:15 +0000 | [diff] [blame] | 33 | _hashlib$(SUFFIX): $(HASH_SOURCE) $(SSL_LIB_DIR)/libeay32.lib ../../PC/*.h ../../Include/*.h |
Thomas Wouters | 00ee7ba | 2006-08-21 19:07:27 +0000 | [diff] [blame] | 34 | @if not exist "$(TEMP)/_hashlib/." mkdir "$(TEMP)/_hashlib" |
Thomas Wouters | b213704 | 2007-02-01 18:02:27 +0000 | [diff] [blame] | 35 | cl /nologo /c $(HASH_SOURCE) $(CFLAGS) $(EXTRA_CFLAGS) /Fo$(TEMP)\_hashlib\$*.obj $(INCLUDES) |
Thomas Wouters | 00ee7ba | 2006-08-21 19:07:27 +0000 | [diff] [blame] | 36 | link /nologo @<< |
Guido van Rossum | cd16bf6 | 2007-06-13 18:07:49 +0000 | [diff] [blame] | 37 | /dll /out:_hashlib$(SUFFIX) $(HASH_LIBS) $(EXTRA_LIBS) $(TEMP)\_hashlib\$*.obj |
Thomas Wouters | 00ee7ba | 2006-08-21 19:07:27 +0000 | [diff] [blame] | 38 | << |