2009-07-31 09:11:33 -04:00
|
|
|
#ifneq ($(OS),"Win ")
|
|
|
|
#dummy:
|
|
|
|
# echo "ERROR OS = $(OS)"
|
|
|
|
# echo "ERROR MinGW configuration file included, but (OS != Win)
|
2007-11-15 23:45:00 -05:00
|
|
|
#
|
2009-07-31 09:11:33 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
############ LINUX CONFIGURATION ########################
|
|
|
|
|
|
|
|
# flags for components....
|
|
|
|
#PQI_USE_XPGP = 1
|
|
|
|
#PQI_USE_PROXY = 1
|
|
|
|
#PQI_USE_CHANNELS = 1
|
|
|
|
#USE_FILELOOK = 1
|
2007-11-15 23:45:00 -05:00
|
|
|
|
|
|
|
###########################################################################
|
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
#### DrBobs Versions.... Please Don't Delete.
|
|
|
|
### Comment out if needed.
|
|
|
|
SRC_ROOT_PKG=/home/Mark/prog/retroshare/package/rs-win-v0.5.0/src
|
|
|
|
SRC_ROOT_GPG=/local
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
#ALT_SRC_ROOT=/cygdrive/c/home/rmfern/prog/MinGW
|
|
|
|
#SRC_ROOT=../../../..
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
PTHREADS_DIR=$(SRC_ROOT_PKG)/pthreads-w32-2-8-0/Pre-built.2
|
|
|
|
ZLIB_DIR=$(SRC_ROOT_PKG)/zlib-1.2.3
|
|
|
|
SSL_DIR=$(SRC_ROOT_PKG)/openssl-tmp
|
|
|
|
UPNPC_DIR=$(SRC_ROOT_PKG)/miniupnpc-1.3
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-09-05 13:23:58 -04:00
|
|
|
###########################################################################
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-09-05 13:23:58 -04:00
|
|
|
#### Enable this section for compiling with MSYS/MINGW compile
|
|
|
|
#SRC_ROOT=/home/linux
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-09-05 13:23:58 -04:00
|
|
|
#SSL_DIR=$(SRC_ROOT)/OpenSSL
|
|
|
|
#GPGME_DIR=$(SRC_ROOT)/gpgme-1.1.8
|
|
|
|
#GPG_ERROR_DIR=$(SRC_ROOT)/libgpg-error-1.7
|
2009-07-31 09:11:33 -04:00
|
|
|
|
2009-09-05 13:23:58 -04:00
|
|
|
#ZLIB_DIR=$(SRC_ROOT)/zlib-1.2.3
|
2009-07-31 09:11:33 -04:00
|
|
|
#UPNPC_DIR=$(SRC_ROOT)/miniupnpc-1.0
|
2009-09-05 13:23:58 -04:00
|
|
|
#PTHREADS_DIR=$(SRC_ROOT)/pthreads-w32-2-8-0-release
|
2009-07-31 09:11:33 -04:00
|
|
|
|
|
|
|
include $(RS_TOP_DIR)/scripts/checks.mk
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-09-05 13:23:58 -04:00
|
|
|
############ ENFORCE DIRECTORY NAMING #######################################
|
2007-11-15 23:45:00 -05:00
|
|
|
|
|
|
|
CC = g++
|
2009-07-31 09:11:33 -04:00
|
|
|
RM = /bin/rm
|
|
|
|
RANLIB = ranlib
|
|
|
|
LIBDIR = $(RS_TOP_DIR)/lib
|
|
|
|
LIBRS = $(LIBDIR)/libretroshare.a
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
# Unix: Linux/Cygwin
|
|
|
|
INCLUDE = -I $(RS_TOP_DIR)
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
ifdef PQI_DEBUG
|
|
|
|
CFLAGS = -Wall -g $(INCLUDE)
|
2007-11-15 23:45:00 -05:00
|
|
|
else
|
2009-07-31 09:11:33 -04:00
|
|
|
CFLAGS = -Wall -O2 $(INCLUDE)
|
2007-11-15 23:45:00 -05:00
|
|
|
endif
|
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
# These aren't used anymore.... really.
|
2007-11-15 23:45:00 -05:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
# SSL / pthreads / Zlib
|
|
|
|
# included by default for Windows compilation.
|
|
|
|
INCLUDE += -I $(SSL_DIR)/include
|
|
|
|
INCLUDE += -I$(PTHREADS_DIR)
|
|
|
|
INCLUDE += -I$(ZLIB_DIR)
|
2007-11-15 23:45:00 -05:00
|
|
|
|
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
#########################################################################
|
|
|
|
# OS Compile Options
|
|
|
|
#########################################################################
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
# For the SSL BIO compilation. (Copied from OpenSSL compilation flags)
|
|
|
|
BIOCC = gcc
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
# 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
|
|
|
|
BIOCFLAGS += -DWINDOWS_SYS
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
#########################################################################
|
|
|
|
# OS specific Linking.
|
|
|
|
#########################################################################
|
2007-11-15 23:45:00 -05:00
|
|
|
|
|
|
|
# for static pthread libs....
|
2009-07-31 09:11:33 -04:00
|
|
|
#WININC += -DPTW32_STATIC_LIB
|
|
|
|
#WININC += -mno-cygwin -mwindows -fno-exceptions
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
WININC += -DWINDOWS_SYS
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
WINLIB = -lws2_32 -luuid -lole32 -liphlpapi
|
|
|
|
WINLIB += -lcrypt32 -lwinmm
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
CFLAGS += -I$(SSL_DIR)/include
|
|
|
|
CFLAGS += -I$(PTHREADS_DIR)/include
|
|
|
|
CFLAGS += -I$(ZLIB_DIR)
|
|
|
|
CFLAGS += -I$(SRC_ROOT_GPG)/include
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-09-05 13:23:58 -04:00
|
|
|
### Enable this for GPGME and GPG ERROR dirs
|
|
|
|
#CFLAGS += -I$(GPGME_DIR)/src
|
|
|
|
#CFLAGS += -I$(GPG_ERROR_DIR)/src
|
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
CFLAGS += $(WININC)
|
2007-11-15 23:45:00 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
LIBS = -L$(LIBDIR) -lretroshare
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
LIBS += -L$(SSL_DIR)
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
LIBS += -lssl -lcrypto
|
|
|
|
LIBS += -L$(UPNPC_DIR) -lminiupnpc
|
|
|
|
LIBS += -L$(ZLIB_DIR) -lz
|
|
|
|
LIBS += -L$(PTHREADS_DIR) -lpthreadGC2d
|
|
|
|
LIBS += $(WINLIB)
|
2007-11-15 23:45:00 -05:00
|
|
|
|
2009-07-31 09:11:33 -04:00
|
|
|
#RSCFLAGS = -Wall -g $(INCLUDE)
|
|
|
|
#RSCFLAGS += $(WININC)
|
2007-11-15 23:45:00 -05:00
|
|
|
|
|
|
|
|