Changes to libretroshare to make the system compile on Mac OSX 10.3

* minor changes to networking headers.
* addition of several virtual destructors (remove warnings)
* switched Makefiles to new system.
* added macosx specific configuration file.
* removed KadC compilation checks.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@324 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-02-03 06:17:33 +00:00
parent 789e3a1f62
commit 3451af6152
23 changed files with 288 additions and 279 deletions

View file

@ -11,17 +11,13 @@ dummy:
endif
ifndef KADC_DIR
dummy:
echo "you must define KADC_DIR before you can compile"
endif
ifneq ($(OS),Linux)
ifndef PTHREADS_DIR
ifneq ($(OS),MacOSX)
ifndef PTHREADS_DIR
dummy:
echo "you must define PTHREADS_DIR before you can compile"
endif
endif
endif

View file

@ -28,7 +28,8 @@ LIBDIR = $(RS_TOP_DIR)/lib
LIBRS = $(LIBDIR)/libretroshare.a
# Unix: Linux/Cygwin
INCLUDE = -I $(RS_TOP_DIR) -I$(KADC_DIR)
INCLUDE = -I $(RS_TOP_DIR)
#-I$(KADC_DIR)
CFLAGS = -Wall -g $(INCLUDE)
ifdef PQI_USE_XPGP
@ -53,6 +54,15 @@ endif
RSCFLAGS = -Wall -g $(INCLUDE)
#########################################################################
# OS Compile Options
#########################################################################
# For the SSL BIO compilation. (Copied from OpenSSL compilation flags)
BIOCC = gcc
# 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.
@ -63,7 +73,7 @@ ifdef PQI_USE_XPGP
LIBS += -L$(SSL_DIR)
endif
LIBS += -lssl -lcrypto -lpthread
LIBS += -L$(KADC_DIR) -lKadC
#LIBS += -L$(KADC_DIR) -lKadC
LIBS += -L$(UPNPC_DIR) -lminiupnpc
LIBS += $(XLIB) -ldl -lz

View file

@ -0,0 +1,82 @@
ifneq ($(OS),MacOSX)
dummy:
echo "ERROR MacOSX configuration file included, but (OS != MacOSX)
endif
############ LINUX CONFIGURATION ########################
# flags for components....
PQI_USE_XPGP = 1
#PQI_USE_PROXY = 1
#PQI_USE_CHANNELS = 1
#USE_FILELOOK = 1
SSL_DIR=../../../../../src/openssl-0.9.7g-xpgp-0.1c
UPNPC_DIR=../../../../../src/miniupnpc-20070515
include $(RS_TOP_DIR)/scripts/checks.mk
############ ENFORCE DIRECTORY NAMING ########################
CC = g++
RM = /bin/rm
RANLIB = ranlib
LIBDIR = $(RS_TOP_DIR)/lib
LIBRS = $(LIBDIR)/libretroshare.a
# Unix: Linux/Cygwin
INCLUDE = -I $(RS_TOP_DIR)
CFLAGS = -Wall -g $(INCLUDE)
ifdef PQI_USE_XPGP
INCLUDE += -I $(SSL_DIR)/include
endif
ifdef PQI_USE_XPGP
CFLAGS += -DPQI_USE_XPGP
endif
ifdef PQI_USE_PROXY
CFLAGS += -DPQI_USE_PROXY
endif
ifdef PQI_USE_CHANNELS
CFLAGS += -DPQI_USE_CHANNELS
endif
ifdef USE_FILELOOK
CFLAGS += -DUSE_FILELOOK
endif
RSCFLAGS = -Wall -g $(INCLUDE)
#########################################################################
# OS Compile Options
#########################################################################
# For the SSL BIO compilation. (Copied from OpenSSL compilation flags)
BIOCC = gcc
# MacOSX flags
BIOCFLAGS = -I $(SSL_DIR)/include -DOPENSSL_SYSNAME_MACOSX -DOPENSSL_THREADS -D_REENTRANT -DOPENSSL_NO_KRB5 -O3 -fomit-frame-pointer -fno-common -DB_ENDIAN
#########################################################################
# OS specific Linking.
#########################################################################
LIBS = -Wl,-search_paths_first
LIBS += -L$(LIBDIR) -lretroshare
ifdef PQI_USE_XPGP
LIBS += -L$(SSL_DIR)
endif
LIBS += -lssl -lcrypto -lpthread
LIBS += -L$(UPNPC_DIR) -lminiupnpc
LIBS += $(XLIB) -ldl -lz
RSLIBS = $(LIBS)

View file

@ -4,7 +4,8 @@
###########################################################################
#Define OS.
#
OS = Linux
#OS = Linux
OS = MacOSX
#OS = Cygwin
#OS = Win # MinGw.
###########################################################################
@ -12,10 +13,14 @@ OS = Linux
ifeq ($(OS),Linux)
include $(RS_TOP_DIR)/scripts/config-linux.mk
else
ifeq ($(OS),Cygwin)
include $(RS_TOP_DIR)/scripts/config-cygwin.mk
ifeq ($(OS),MacOSX)
include $(RS_TOP_DIR)/scripts/config-macosx.mk
else
include $(RS_TOP_DIR)/scripts/config-mingw.mk
ifeq ($(OS),Cygwin)
include $(RS_TOP_DIR)/scripts/config-cygwin.mk
else
include $(RS_TOP_DIR)/scripts/config-mingw.mk
endif
endif
endif