2008-02-03 01:17:33 -05:00
|
|
|
|
|
|
|
ifneq ($(OS),MacOSX)
|
|
|
|
dummy:
|
|
|
|
echo "ERROR MacOSX configuration file included, but (OS != MacOSX)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
############ LINUX CONFIGURATION ########################
|
|
|
|
|
2008-04-03 14:37:33 -04:00
|
|
|
|
|
|
|
# FLAGS to decide if we want i386 Build or ppc Build
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
# PPC is default
|
|
|
|
# Could define both for combined compilation...
|
|
|
|
# except might not work for bio_tou.c file!
|
|
|
|
#
|
|
|
|
# MAC_I386_BUILD = 1
|
|
|
|
# MAC_PPC_BUILD = 1
|
|
|
|
|
|
|
|
#MAC_I386_BUILD = 1
|
|
|
|
#MAC_PPC_BUILD = 1
|
|
|
|
|
|
|
|
ifndef MAC_I386_BUILD
|
|
|
|
MAC_PPC_BUILD = 1
|
|
|
|
endif
|
|
|
|
|
2008-02-03 01:17:33 -05:00
|
|
|
# flags for components....
|
2009-05-24 06:33:08 -04:00
|
|
|
#PQI_USE_SSLONLY = 1
|
|
|
|
#PQI_USE_XPGP = 1
|
|
|
|
|
2008-02-03 01:17:33 -05:00
|
|
|
#PQI_USE_PROXY = 1
|
|
|
|
#PQI_USE_CHANNELS = 1
|
|
|
|
#USE_FILELOOK = 1
|
|
|
|
|
|
|
|
SSL_DIR=../../../../../src/openssl-0.9.7g-xpgp-0.1c
|
2008-03-26 11:35:09 -04:00
|
|
|
UPNPC_DIR=../../../../../src/miniupnpc-1.0
|
2008-02-03 01:17:33 -05:00
|
|
|
|
|
|
|
include $(RS_TOP_DIR)/scripts/checks.mk
|
|
|
|
|
|
|
|
############ ENFORCE DIRECTORY NAMING ########################
|
|
|
|
|
|
|
|
CC = g++
|
|
|
|
RM = /bin/rm
|
2008-03-22 10:34:53 -04:00
|
|
|
|
2008-04-03 14:37:33 -04:00
|
|
|
RANLIB = ranlib
|
|
|
|
|
2008-03-22 10:34:53 -04:00
|
|
|
# Dummy ranlib -> can't do it until afterwards with universal binaries.
|
2008-04-03 14:37:33 -04:00
|
|
|
# RANLIB = ls -l
|
2008-03-22 10:34:53 -04:00
|
|
|
|
2008-02-03 01:17:33 -05:00
|
|
|
LIBDIR = $(RS_TOP_DIR)/lib
|
|
|
|
LIBRS = $(LIBDIR)/libretroshare.a
|
|
|
|
|
2009-05-24 06:33:08 -04:00
|
|
|
OPT_DIR = /opt/local
|
|
|
|
OPT_INCLUDE = $(OPT_DIR)/include
|
|
|
|
OPT_LIBS = $(OPT_DIR)/lib
|
|
|
|
|
|
|
|
INCLUDE = -I $(RS_TOP_DIR) -I $(OPT_INCLUDE)
|
2008-11-02 06:38:11 -05:00
|
|
|
#CFLAGS = -Wall -O3
|
|
|
|
CFLAGS = -Wall -g
|
2008-03-22 10:34:53 -04:00
|
|
|
|
2008-04-03 14:37:33 -04:00
|
|
|
# Flags for architecture builds.
|
|
|
|
ifdef MAC_I386_BUILD
|
|
|
|
CFLAGS += -arch i386
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MAC_PPC_BUILD
|
|
|
|
CFLAGS += -arch ppc
|
|
|
|
endif
|
|
|
|
|
|
|
|
CFLAGS += $(INCLUDE)
|
|
|
|
|
|
|
|
# This Line is for Universal BUILD for 10.4 + 10.5
|
|
|
|
# (but unlikely to work unless Qt Libraries are build properly)
|
|
|
|
# CFLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk
|
2008-03-24 10:20:48 -04:00
|
|
|
|
2008-02-03 01:17:33 -05:00
|
|
|
ifdef PQI_USE_XPGP
|
2009-05-24 06:33:08 -04:00
|
|
|
INCLUDE += -I $(SSL_DIR)/include
|
|
|
|
CFLAGS += -DPQI_USE_XPGP
|
2008-02-03 01:17:33 -05:00
|
|
|
endif
|
|
|
|
|
2009-05-24 06:33:08 -04:00
|
|
|
ifdef PQI_USE_SSLONLY
|
|
|
|
CFLAGS += -DPQI_USE_SSLONLY
|
2008-02-03 01:17:33 -05:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2008-04-03 14:37:33 -04:00
|
|
|
# RSCFLAGS = -Wall -O3 $(INCLUDE)
|
2008-02-03 01:17:33 -05:00
|
|
|
|
|
|
|
#########################################################################
|
|
|
|
# OS Compile Options
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
# For the SSL BIO compilation. (Copied from OpenSSL compilation flags)
|
|
|
|
BIOCC = gcc
|
|
|
|
|
2008-04-03 14:37:33 -04:00
|
|
|
|
|
|
|
# Flags for architecture builds.
|
|
|
|
ifdef MAC_I386_BUILD
|
|
|
|
BIOCFLAGS = -arch i386 -I $(SSL_DIR)/include -DOPENSSL_SYSNAME_MACOSX -DOPENSSL_THREADS -D_REENTRANT -DOPENSSL_NO_KRB5 -O3 -fomit-frame-pointer -fno-common
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef MAC_PPC_BUILD
|
|
|
|
BIOCFLAGS = -arch ppc -I $(SSL_DIR)/include -DOPENSSL_SYSNAME_MACOSX -DOPENSSL_THREADS -D_REENTRANT -DOPENSSL_NO_KRB5 -O3 -fomit-frame-pointer -fno-common -DB_ENDIAN
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-02-03 01:17:33 -05:00
|
|
|
# MacOSX flags
|
2008-04-03 14:37:33 -04:00
|
|
|
# BIOCFLAGS = -I $(SSL_DIR)/include -DOPENSSL_SYSNAME_MACOSX -DOPENSSL_THREADS -D_REENTRANT -DOPENSSL_NO_KRB5 -O3 -fomit-frame-pointer -fno-common -DB_ENDIAN
|
2008-03-24 10:20:48 -04:00
|
|
|
|
|
|
|
# This is for the Universal Build...
|
|
|
|
# but is unlikely to work... as options are PPC specific....
|
|
|
|
#
|
|
|
|
# BIOCFLAGS = -arch ppc -arch i386 -I $(SSL_DIR)/include -DOPENSSL_SYSNAME_MACOSX -DOPENSSL_THREADS -D_REENTRANT -DOPENSSL_NO_KRB5 -O3 -fomit-frame-pointer -fno-common -DB_ENDIAN
|
2008-02-03 01:17:33 -05:00
|
|
|
|
|
|
|
|
|
|
|
#########################################################################
|
|
|
|
# OS specific Linking.
|
|
|
|
#########################################################################
|
|
|
|
|
|
|
|
LIBS = -Wl,-search_paths_first
|
2008-03-24 10:20:48 -04:00
|
|
|
|
|
|
|
# for Univeral BUILD
|
|
|
|
# LIBS += -arch ppc -arch i386
|
2008-03-22 10:34:53 -04:00
|
|
|
# LIBS += -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386
|
|
|
|
|
2008-02-03 01:17:33 -05:00
|
|
|
LIBS += -L$(LIBDIR) -lretroshare
|
|
|
|
ifdef PQI_USE_XPGP
|
|
|
|
LIBS += -L$(SSL_DIR)
|
|
|
|
endif
|
|
|
|
LIBS += -lssl -lcrypto -lpthread
|
2009-05-24 06:33:08 -04:00
|
|
|
LIBS += -L$(OPT_LIBS)
|
|
|
|
LIBS += -lgpgme -lgpg-error
|
2008-02-03 01:17:33 -05:00
|
|
|
LIBS += -L$(UPNPC_DIR) -lminiupnpc
|
|
|
|
LIBS += $(XLIB) -ldl -lz
|
|
|
|
|
|
|
|
RSLIBS = $(LIBS)
|
|
|
|
|
|
|
|
|