mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Initial patch to build Tor with msvc and nmake
We'll still need to tweak it so that it looks for includes and libraries somewhere more sensible than "where we happened to find them on Erinn's system"; so that tests and tools get built too; so that it's a bit documented; and so that we actually try running the output. Work done with Erinn Clark.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
|
||||
noinst_LIBRARIES = libor.a libor-crypto.a libor-event.a
|
||||
|
||||
EXTRA_DIST = common_sha1.i sha256.c
|
||||
EXTRA_DIST = common_sha1.i sha256.c Makefile.nmake
|
||||
|
||||
#CFLAGS = -Wall -Wpointer-arith -O2
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
all: libor.lib libor-crypto.lib libor-event.lib
|
||||
|
||||
CFLAGS = /I ..\win32 /I ..\..\..\build-alpha\include
|
||||
|
||||
LIBOR_OBJECTS = address.obj compat.obj container.obj di_ops.obj \
|
||||
log.obj memarea.obj mempool.obj procmon.obj util.obj \
|
||||
util_codedigest.obj
|
||||
|
||||
LIBOR_CRYPTO_OBJECTS = aes.obj crypto.obj torgzip.obj tortls.obj
|
||||
|
||||
LIBOR_EVENT_OBJECTS = compat_libevent.obj
|
||||
|
||||
libor.lib: $(LIBOR_OBJECTS)
|
||||
lib $(LIBOR_OBJECTS) /out:libor.lib
|
||||
|
||||
libor-crypto.lib: $(LIBOR_CRYPTO_OBJECTS)
|
||||
lib $(LIBOR_CRYPTO_OBJECTS) /out:libor-crypto.lib
|
||||
|
||||
libor-event.lib: $(LIBOR_EVENT_OBJECTS)
|
||||
lib $(LIBOR_EVENT_OBJECTS) /out:libor-event.lib
|
||||
@@ -43,11 +43,7 @@
|
||||
#define off64_t int64_t
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include "..\..\contrib\zlib\zlib.h"
|
||||
#else
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
|
||||
/** Set to 1 if zlib is a version that supports gzip; set to 0 if it doesn't;
|
||||
* set to -1 if we haven't checked yet. */
|
||||
|
||||
+3
-3
@@ -14,6 +14,9 @@
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include "orconfig.h"
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#define UTIL_PRIVATE
|
||||
#include "util.h"
|
||||
#include "torlog.h"
|
||||
@@ -68,9 +71,6 @@
|
||||
#ifdef HAVE_SYS_FCNTL_H
|
||||
#include <sys/fcntl.h>
|
||||
#endif
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user