mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-23 14:40:51 +01:00
Remove broken MSVC support
MSVC compilation has been broken since at least 1e417b7275
("All remaining
files in src/common belong to the event loop.") deleted
src/common/Makefile.nmake in 2018.
This commit is contained in:
parent
4259bc36af
commit
65ea7eed1f
11 changed files with 2 additions and 464 deletions
|
@ -185,7 +185,6 @@ EXTRA_DIST+= \
|
|||
CODE_OF_CONDUCT \
|
||||
INSTALL \
|
||||
LICENSE \
|
||||
Makefile.nmake \
|
||||
README.md \
|
||||
ReleaseNotes \
|
||||
scripts/build/combine_libs \
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
all:
|
||||
cd src/common
|
||||
$(MAKE) /F Makefile.nmake
|
||||
cd ../../src/ext
|
||||
$(MAKE) /F Makefile.nmake
|
||||
cd ../../src/or
|
||||
$(MAKE) /F Makefile.nmake
|
||||
cd ../../src/test
|
||||
$(MAKE) /F Makefile.nmake
|
||||
|
||||
clean:
|
||||
cd src/common
|
||||
$(MAKE) /F Makefile.nmake clean
|
||||
cd ../../src/ext
|
||||
$(MAKE) /F Makefile.nmake clean
|
||||
cd ../../src/or
|
||||
$(MAKE) /F Makefile.nmake clean
|
||||
cd ../../src/test
|
||||
$(MAKE) /F Makefile.nmake clean
|
|
@ -5,8 +5,8 @@
|
|||
; NOTE: This file might be obsolete. Look at tor-mingw.nsi.in instead.
|
||||
;-----------------------------------------
|
||||
; How to make an installer:
|
||||
; Step 0. If you are a Tor maintainer, make sure that tor.nsi and
|
||||
; src/win32/orconfig.h all have the correct version number.
|
||||
; Step 0. If you are a Tor maintainer, make sure that tor.nsi has
|
||||
; the correct version number.
|
||||
; Step 1. Download and install OpenSSL. Make sure that the OpenSSL
|
||||
; version listed below matches the one you downloaded.
|
||||
; Step 2. Download and install NSIS (http://nsis.sourceforge.net)
|
||||
|
|
|
@ -1,122 +0,0 @@
|
|||
Building Tor with MSVC.
|
||||
=======================
|
||||
|
||||
NOTE: This is not the preferred method for building Tor on windows: we use
|
||||
mingw for our packages.
|
||||
|
||||
Last updated 9 September 2014.
|
||||
|
||||
|
||||
Requirements:
|
||||
-------------
|
||||
|
||||
* Visual Studio 2010
|
||||
https://go.microsoft.com/fwlink/?LinkId=323467
|
||||
* CMake 2.8.12.2
|
||||
https://www.cmake.org/download/
|
||||
* Perl 5.16
|
||||
https://www.activestate.com/activeperl/downloads
|
||||
* Latest stable OpenSSL tarball
|
||||
https://www.openssl.org/source/
|
||||
* Latest stable zlib tarball
|
||||
https://zlib.net/
|
||||
* Latest stable libevent Libevent tarball
|
||||
https://github.com/libevent/libevent/releases
|
||||
|
||||
Make sure you check signatures for all these packages.
|
||||
|
||||
Steps:
|
||||
------
|
||||
|
||||
Building OpenSSL from source as a shared library:
|
||||
|
||||
cd <openssl source dir>
|
||||
perl Configure VC-WIN32
|
||||
perl util\mkfiles.pl >MINFO
|
||||
perl util\mk1mf.pl no-asm dll VC-WIN32 >32dll.mak
|
||||
perl util\mkdef.pl 32 libeay > ms\libeay32.def
|
||||
perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
|
||||
nmake -f 32dll.mak
|
||||
|
||||
Making OpenSSL final package:
|
||||
|
||||
Create <openssl final package dir>, I'd recommend using a name like <openssl
|
||||
source dir>-vc10.
|
||||
|
||||
Copy the following directories and files to their respective locations
|
||||
<openssl source dir>\inc32\openssl => <openssl final package dir>\include\openssl
|
||||
<openssl source dir>\out32dll\libeay32.lib => <openssl final package dir>\lib\libeay32.lib
|
||||
<openssl source dir>\out32dll\ssleay32.lib => <openssl final package dir>\lib\ssleay32.lib
|
||||
<openssl source dir>\out32dll\libeay32.dll => <openssl final package dir>\bin\libeay32.dll
|
||||
<openssl source dir>\out32dll\openssl.exe => <openssl final package dir>\bin\openssl.exe
|
||||
<openssl source dir>\out32dll\ssleay32.dll => <openssl final package dir>\bin\ssleay32.dll
|
||||
|
||||
Building Zlib from source:
|
||||
|
||||
cd <zlib source dir>
|
||||
nmake -f win32/Makefile.msc
|
||||
|
||||
Building libevent:
|
||||
|
||||
cd <libevent source dir>
|
||||
mkdir build && cd build
|
||||
SET OPENSSL_ROOT_DIR=<openssl final package dir>
|
||||
cmake -G "NMake Makefiles" .. -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="/MT /Zi /O2 /Ob1 /D NDEBUG" -DZLIB_LIBRARY:FILEPATH="<zlib source dir>\zdll.lib" -DZLIB_INCLUDE_DIR:PATH="<zlib source dir>"
|
||||
nmake event
|
||||
|
||||
Building Tor:
|
||||
|
||||
Create a dir above tor source dir named build-alpha and two subdirs include
|
||||
and lib.
|
||||
|
||||
Your build tree should now be similar to this one:
|
||||
* build-alpha
|
||||
- include
|
||||
- lib
|
||||
* <libevent source dir>
|
||||
- build
|
||||
- cmake
|
||||
- ...
|
||||
* <openssl source dir>
|
||||
- ...
|
||||
- ms
|
||||
- util
|
||||
- ...
|
||||
* <openssl final package dir>
|
||||
- bin
|
||||
- include
|
||||
- lib
|
||||
* <tor source dir>
|
||||
- ...
|
||||
- src
|
||||
- ...
|
||||
* <zlib source dir>
|
||||
- ...
|
||||
- win32
|
||||
- ...
|
||||
|
||||
Copy the following dirs and files to the following locations:
|
||||
<openssl final package dir>\include\openssl => build-alpha\include\openssl
|
||||
<libevent source dir>\include => build-alpha\include
|
||||
<libevent source dir>\WIN32-Code\nmake\event2 => build-alpha\include\event2
|
||||
<zlib source dir>\z*.h => build-alpha\include\z*.h
|
||||
|
||||
Now copy the following files to the following locations and rename them
|
||||
according new names:
|
||||
|
||||
<libevent source dir>\build\lib\event.lib => build-alpha\lib\libevent.lib
|
||||
<openssl final package dir>\lib\libeay32.lib => build-alpha\lib\libcrypto.lib
|
||||
<openssl final package dir>\lib\ssleay32.lib => build-alpha\lib\libssl.lib
|
||||
<zlib source dir>\zdll.lib => build-alpha\lib\libz.lib
|
||||
|
||||
And we are now ready for the build process:
|
||||
|
||||
cd <tor source dir>
|
||||
nmake -f Makefile.nmake
|
||||
|
||||
After the above process is completed there should be a tor.exe in <tor
|
||||
source dir>\src\or
|
||||
|
||||
Copy tor.exe to desired location and also copy zlib1.dll, libeay32.dll and
|
||||
ssleay32.dll from built zlib and openssl packages
|
||||
|
|
@ -129,8 +129,3 @@ update_file(P("contrib/win32build/tor-mingw.nsi.in"),
|
|||
re.compile(r'!define VERSION .*'),
|
||||
u'!define VERSION "{}"'.format(version),
|
||||
encoding="iso-8859-1")
|
||||
|
||||
# In src/win32/orconfig.h, we replace the definition of VERSION.
|
||||
update_file(P("src/win32/orconfig.h"),
|
||||
re.compile(r'#define VERSION .*'),
|
||||
u'#define VERSION "{}"'.format(version))
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
all: csiphash.lib
|
||||
|
||||
CFLAGS = /O2 /MT /I ..\win32 /I ..\..\..\build-alpha\include /I ..\common \
|
||||
/I ..\ext
|
||||
|
||||
CSIPHASH_OBJECTS = csiphash.obj
|
||||
|
||||
csiphash.lib: $(CSIPHASH_OBJECTS)
|
||||
lib $(CSIPHASH_OBJECTS) $(CURVE25519_DONNA_OBJECTS) /out:csiphash.lib
|
||||
|
||||
clean:
|
||||
del *.obj *.lib
|
|
@ -87,6 +87,5 @@ include src/app/include.am
|
|||
|
||||
include src/test/include.am
|
||||
include src/tools/include.am
|
||||
include src/win32/include.am
|
||||
include src/config/include.am
|
||||
include src/test/fuzz/include.am
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
all: test.exe bench.exe
|
||||
|
||||
CFLAGS = /I ..\win32 /I ..\..\..\build-alpha\include /I ..\common /I ..\or \
|
||||
/I ..\ext
|
||||
|
||||
LIBS = ..\..\..\build-alpha\lib\libevent.lib \
|
||||
..\..\..\build-alpha\lib\libcrypto.lib \
|
||||
..\..\..\build-alpha\lib\libssl.lib \
|
||||
..\..\..\build-alpha\lib\libz.lib \
|
||||
..\or\libtor.lib \
|
||||
ws2_32.lib advapi32.lib shell32.lib \
|
||||
crypt32.lib gdi32.lib user32.lib
|
||||
|
||||
TEST_OBJECTS = test.obj test_addr.obj test_channel.obj test_channeltls.obj \
|
||||
test_consdiff.obj test_containers.obj \
|
||||
test_controller_events.obj test_crypto.obj test_data.obj test_dir.obj \
|
||||
test_checkdir.obj test_microdesc.obj test_pt.obj test_util.obj \
|
||||
test_config.obj test_connection.obj \
|
||||
test_cell_formats.obj test_relay.obj test_replay.obj \
|
||||
test_channelpadding.obj \
|
||||
test_circuitstats.obj \
|
||||
test_circuitpadding.obj \
|
||||
test_scheduler.obj test_introduce.obj test_hs.obj tinytest.obj
|
||||
|
||||
tinytest.obj: ..\ext\tinytest.c
|
||||
$(CC) $(CFLAGS) /D snprintf=_snprintf /c ..\ext\tinytest.c
|
||||
|
||||
test.exe: $(TEST_OBJECTS)
|
||||
$(CC) $(CFLAGS) $(LIBS) ..\common\*.lib $(TEST_OBJECTS) /Fe$@
|
||||
|
||||
bench.exe: bench.obj
|
||||
$(CC) $(CFLAGS) bench.obj $(LIBS) ..\common\*.lib /Fe$@
|
||||
|
||||
clean:
|
||||
del *.obj *.lib test.exe bench.exe
|
|
@ -1,22 +0,0 @@
|
|||
all: tor-resolve.exe tor-gencert.exe tor-print-ed-signing-cert.exe
|
||||
|
||||
CFLAGS = /I ..\win32 /I ..\..\..\build-alpha\include /I ..\common /I ..\or
|
||||
|
||||
LIBS = ..\..\..\build-alpha\lib\libevent.lib \
|
||||
..\..\..\build-alpha\lib\libcrypto.lib \
|
||||
..\..\..\build-alpha\lib\libssl.lib \
|
||||
..\..\..\build-alpha\lib\libz.lib \
|
||||
ws2_32.lib advapi32.lib shell32.lib \
|
||||
crypt32.lib gdi32.lib user32.lib
|
||||
|
||||
tor-gencert.exe: tor-gencert.obj
|
||||
$(CC) $(CFLAGS) $(LIBS) ..\common\*.lib tor-gencert.obj
|
||||
|
||||
tor-resolve.exe: tor-resolve.obj
|
||||
$(CC) $(CFLAGS) $(LIBS) ..\common\*.lib tor-resolve.obj
|
||||
|
||||
tor-print-ed-signing-cert.exe: tor-print-ed-signing-cert.obj
|
||||
$(CC) $(CFLAGS) $(LIBS) ..\common\*.lib tor-print-ed-signing-cert.obj
|
||||
|
||||
clean:
|
||||
del *.obj *.lib *.exe
|
|
@ -1,3 +0,0 @@
|
|||
|
||||
EXTRA_DIST+= src/win32/orconfig.h
|
||||
|
|
@ -1,242 +0,0 @@
|
|||
/* orconfig.h for Windows -- This file is *not* generated by autoconf.
|
||||
* Instead, it has to be hand-edited to keep Win32 happy.
|
||||
*/
|
||||
|
||||
/* Windows-only defines. */
|
||||
#define CONFDIR ""
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
/* Define to 1 if you have the <assert.h> header file. */
|
||||
#define HAVE_ASSERT_H
|
||||
|
||||
/* Define to 1 if you have the <ctype.h> header file. */
|
||||
#define HAVE_CTYPE_H
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#define HAVE_ERRNO_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `ftime' function. */
|
||||
#define HAVE_FTIME
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define to 1 if you have the <grp.h> header file. */
|
||||
#undef HAVE_GRP_H
|
||||
|
||||
/* Define to 1 if you have the `inet_aton' function. */
|
||||
#undef HAVE_INET_ATON
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
/* #define HAVE_INTTYPES_H */
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H
|
||||
|
||||
/* Define to 1 if you have the <machine/limits.h> header file. */
|
||||
#undef HAVE_MACHINE_LIMITS_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#undef HAVE_NETDB_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#undef HAVE_POLL_H
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#undef HAVE_PWD_H
|
||||
|
||||
/* Define to 1 if you have the <signal.h> header file. */
|
||||
#define HAVE_SIGNAL_H
|
||||
|
||||
/* Define to 1 if you have the `socketpair' function. */
|
||||
#undef HAVE_SOCKETPAIR
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the `strlcat' function. */
|
||||
#undef HAVE_STRLCAT
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
#undef HAVE_STRLCPY
|
||||
|
||||
/* Define to 1 if you have the `strptime' function. */
|
||||
#undef HAVE_STRPTIME
|
||||
|
||||
/* Define to 1 if your timeval has a tv_sec element. */
|
||||
#define HAVE_STRUCT_TIMEVAL_TV_SEC
|
||||
/* Change to #undef if you're using BCC */
|
||||
|
||||
/* Define to 1 if you have the <sys/fcntl.h> header file. */
|
||||
#undef HAVE_SYS_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/limits.h> header file. */
|
||||
#undef HAVE_SYS_LIMITS_H
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
#undef HAVE_SYS_POLL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <sys/utime.h> header file. */
|
||||
#define HAVE_SYS_UTIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H
|
||||
|
||||
/* Define to 1 if you have the `uname' function. */
|
||||
#undef HAVE_UNAME
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the `_vscprintf' function. */
|
||||
#define HAVE__VSCPRINTF 1
|
||||
|
||||
/* Define to 1 iff NULL is represented by a 0 in memory. */
|
||||
#define NULL_REP_IS_ZERO_BYTES 1
|
||||
|
||||
/* Define to 1 iff memset(0) sets doubles to 0.0 */
|
||||
#define DOUBLE_0_REP_IS_ZERO_BYTES 1
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "tor"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* The size of a `char', as computed by sizeof. */
|
||||
#define SIZEOF_CHAR 1
|
||||
|
||||
/* The size of a `int', as computed by sizeof. */
|
||||
#define SIZEOF_INT 4
|
||||
|
||||
/* The size of a `int16_t', as computed by sizeof. */
|
||||
#undef SIZEOF_INT16_T
|
||||
|
||||
/* The size of a `int32_t', as computed by sizeof. */
|
||||
#undef SIZEOF_INT32_T
|
||||
|
||||
/* The size of a `int64_t', as computed by sizeof. */
|
||||
#undef SIZEOF_INT64_T
|
||||
|
||||
/* The size of a `int8_t', as computed by sizeof. */
|
||||
#undef SIZEOF_INT8_T
|
||||
|
||||
/* The size of a `long', as computed by sizeof. */
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
/* The size of a `long long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG_LONG
|
||||
|
||||
/* The size of `pid_t', as computed by sizeof. */
|
||||
#define SIZEOF_PID_T 0
|
||||
|
||||
/* The size of a `short', as computed by sizeof. */
|
||||
#define SIZEOF_SHORT 2
|
||||
|
||||
/* The size of a `time_t', as computed by sizeof. */
|
||||
#define SIZEOF_TIME_T 4
|
||||
|
||||
/* The size of a `uint16_t', as computed by sizeof. */
|
||||
#undef SIZEOF_UINT16_T
|
||||
|
||||
/* The size of a `uint32_t', as computed by sizeof. */
|
||||
#undef SIZEOF_UINT32_T
|
||||
|
||||
/* The size of a `uint64_t', as computed by sizeof. */
|
||||
#undef SIZEOF_UINT64_T
|
||||
|
||||
/* The size of a `uint8_t', as computed by sizeof. */
|
||||
#undef SIZEOF_UINT8_T
|
||||
|
||||
/* The size of a `void *', as computed by sizeof. */
|
||||
#define SIZEOF_VOID_P 4
|
||||
|
||||
/* The size of a `__int64', as computed by sizeof. */
|
||||
#define SIZEOF___INT64 8
|
||||
|
||||
/* The sizeof a size_t, as computed by sizeof. */
|
||||
#define SIZEOF_SIZE_T 4
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS
|
||||
|
||||
/* Define to 1 iff unaligned int access is allowed */
|
||||
#define UNALIGNED_INT_ACCESS_OK
|
||||
|
||||
/* Define to 1 iff we represent negative integers with two's complement */
|
||||
#define USING_TWOS_COMPLEMENT
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "0.4.8.0-alpha-dev"
|
||||
|
||||
#define HAVE_STRUCT_SOCKADDR_IN6
|
||||
#define HAVE_STRUCT_IN6_ADDR
|
||||
#define RSHIFT_DOES_SIGN_EXTEND
|
||||
#define FLEXIBLE_ARRAY_MEMBER 0
|
||||
#define SHARE_DATADIR ""
|
||||
#define USE_CURVE25519_DONNA
|
||||
|
||||
#define ENUM_VALS_ARE_SIGNED 1
|
||||
|
||||
#ifndef STDOUT_FILENO
|
||||
#define STDOUT_FILENO 1
|
||||
#endif
|
||||
|
||||
#ifndef STDERR_FILENO
|
||||
#define STDERR_FILENO 2
|
||||
#endif
|
||||
|
||||
#define WINVER 0x0501
|
||||
#define _WIN32_WINNT 0x0501
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
|
Loading…
Add table
Reference in a new issue