Changes required to get Retroshare V0.4 working under windows.

Most of these changes relate to:
 (1) rand() is different 
 (2) sleep() don't exist on Windows.
 (3) networking headers are different - these need to be cleaned up in general.
 (4) disabled tests that won't compile on Windows.

Will probably have to rollback some of these changes for Unix later.





git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@372 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-03-03 14:41:15 +00:00
parent 9e954e9c0f
commit 9bdd44d0f5
29 changed files with 218 additions and 86 deletions

View file

@ -34,7 +34,12 @@ LIBRS = $(LIBDIR)/libretroshare.a
# Unix: Linux/Cygwin
INCLUDE = -I $(RS_TOP_DIR) -I$(KADC_DIR)
CFLAGS = -Wall -g $(INCLUDE)
ifdef PQI_DEBUG
CFLAGS = -Wall -g $(INCLUDE)
else
CFLAGS = -Wall -O2 $(INCLUDE)
endif
ifdef PQI_USE_XPGP
INCLUDE += -I $(SSL_DIR)/include
@ -59,6 +64,16 @@ endif
RSCFLAGS = -Wall -g $(INCLUDE)
#########################################################################
# OS Compile Options
#########################################################################
# For the SSL BIO compilation. (Copied from OpenSSL compilation flags)
BIOCC = gcc
# Cygwin - ?same? as Linux flags
BIOCFLAGS = -I $(SSL_DIR)/include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_NO_KRB5 -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -DSHA1_ASM -DMD5_ASM -DRMD160_ASM
#########################################################################
# OS specific Linking.
#########################################################################
@ -69,7 +84,7 @@ WININC += -mno-cygwin -mwindows -fno-exceptions
WININC += -DWINDOWS_SYS
WINLIB = -lws2_32 -luuid -lole32 -liphlpapi
WINLIB += -lcrypt32
WINLIB += -lcrypt32 -lwinmm
CFLAGS += -I$(PTHREADS_DIR) $(WININC)
CFLAGS += -I$(ZLIB_DIR)
@ -83,12 +98,8 @@ LIBS += -lssl -lcrypto
LIBS += -L$(KADC_DIR) -lKadC
LIBS += -L$(UPNPC_DIR) -lminiupnpc
LIBS += -L$(ZLIB_DIR) -lz
RSLIBS += $(LIBS)
RSLIBS += -L$(PTHREADS_DIR) -lpthreadGC2d
RSLIBS += $(WINLIB)
LIBS += $(WINLIB)
LIBS += -L$(PTHREADS_DIR) -lpthreadGC2d
LIBS += $(WINLIB)
RSCFLAGS += $(WININC)

View file

@ -4,9 +4,9 @@
###########################################################################
#Define OS.
#
OS = Linux
#OS = Linux
#OS = MacOSX
#OS = Cygwin
OS = Cygwin
#OS = Win # MinGw.
###########################################################################