##############################################################################
##############################################################################
#                                                                            #
# This file is part of the SYMPHONY MILP Solver Framework.                   #
#                                                                            #
# SYMPHONY was jointly developed by Ted Ralphs (ted@lehigh.edu) and          #
# Laci Ladanyi (ladanyi@us.ibm.com).                                         #
#                                                                            #
# (c) Copyright 2000-2005  Ted Ralphs. All Rights Reserved.                  #
#                                                                            #
# This software is licensed under the Common Public License. Please see      #
# accompanying file for terms.                                               #
#                                                                            #
##############################################################################
##############################################################################

##############################################################################
##############################################################################
# The architecture should be detected and set automatically if you are working
# on one of the following: 
#
# LINUX, CYGWIN, RS6K, SUN4SOL2, SUNMP, X86SOL2, ALPHA
#
# Note that these architecture names are the ones used to define the
# various architectures recognized by the Parallel Virtual Machine (PVM)
# library. If your arcitecture is not listed, simply set it below and then
# search for the places in the Makefile where there are architecture-specific 
# variables set and make sure to set them properly for your specific 
# architecture. For each architecture, there will be three subdirectories 
# created called $(SYMBUILDDIR)/bin/$(ARCH), $(SYMBUILDDIR)/dep/$(ARCH) and
# ${SYMBUILDDIR)/objects/$(ARCH) where the corresponding objects, binaries, 
# and dependencies for each architecture type will reside.
##############################################################################
##############################################################################

#ARCH = LINUX

##############################################################################
# If you have PVM installed, this will set the variable ARCH automatically.
##############################################################################

#ARCH=${PVM_ARCH}

##############################################################################
# If you want to build SYMPHONY in a directory outside the source tree, 
# uncomment this and fill in the directory here. Setting this variable will 
# cause all object, library, and binary files to be built and installed in this
# root directory. This is helpful if you don't have write access to the 
# directory where SYMPHONY is installed.
##############################################################################

#SYMBUILDDIR = .

##############################################################################
# System command definitions
##############################################################################

##############################################################################
# Note: If you are getting errors using make, try changing MAKE to "gmake" 
# and also using gmake on the command line.  
##############################################################################

MAKE = make

AWK = awk

AR = ar -r

RANLIB = ranlib

##############################################################################
# COINROOT is the path to the root directory of the COIN libraries. Many of
# the new features of SYMPHONY require the COIN libraries to be installed.
# BY default, SYMPHONY should be located in the COINROOT directory.
##############################################################################

COINROOT = $(HOME)/COIN-SYMPHONY

##############################################################################
# LIBTYPE is the variable to indicate what type of SYMPHONY library 
# (SHARED or STATIC) is to be created. Also note that, the COIN libraries 
# will be having the same type if they are to be installed through SYMPHONY, 
# i.e., by typing "make coin". 
##############################################################################

LIBTYPE = SHARED

##############################################################################
##############################################################################
# LP solver dependent definitions
##############################################################################
##############################################################################

##############################################################################
# OSL definitions
##############################################################################

#Uncomment the line below if you want to use the native OSL interface.
#Note that OSL can also be used through the OSI (see below).
#LP_SOLVER = OSL

#Set the paths and the name of the library
ifeq ($(LP_SOLVER),OSL)
       LPSINCDIR = /usr/local/include/
       LPLIBPATHS = /home/tkr/src/osllib/lib
       LPLIB = -losl
endif

##############################################################################
# CPLEX definitions
##############################################################################

#Uncomment the line below if you want to use the native CPLEX interface.
#Note that CPLEX can also be used through the OSI (see below).
#LP_SOLVER = CPLEX

ifeq ($(LP_SOLVER),CPLEX)
       LPSINCDIR = /usr/local/include/
       LPLIBPATHS = /usr/local/lib/
       LPLIB = -lcplex
endif

##############################################################################
# OSI definitions
##############################################################################

#Uncomment the line below if you want to use a solver with an OSI interface.
LP_SOLVER = OSI

#The following variable defines what Lp solver to use
OSI_INTERFACE = CLP

#Set the paths and the name of the library
ifeq ($(LP_SOLVER),OSI)
       LPINCDIR = $(COINROOT)/include
       LPLIBPATHS = $(COINROOT)/lib
       LPLIB = -lOsi -lCoinUtils
ifeq ($(OSI_INTERFACE),CPLEX)
       LPSINCDIR = /usr/local/include
       LPLIBPATHS += /usr/local/lib/
       LPLIB += -lOsiCpx -lcplex
endif
ifeq ($(OSI_INTERFACE),OSL)
       LPSINCDIR += $(HOME)/OSL/osllib/include
       LPLIBPATHS += $(HOME)/OSL/osllib/lib
       LPLIB += -lOsiOsl -losl
endif
ifeq ($(OSI_INTERFACE),CLP)
       LPSINCDIR += 
       LPLIBPATHS +=
       LPLIB += -lOsiClp -lClp
endif
ifeq ($(OSI_INTERFACE),XPRESS)
       LPSINCDIR += /usr/local/xpress/include
       LPLIBPATHS += /usr/local/xpress/lib
       LPLIB += -lOsiXpr -lxprs
endif
ifeq ($(OSI_INTERFACE),SOPLEX)
       LPSINCDIR += ${HOME}/include
       LPLIBPATHS += ${HOME}/lib
       LPLIB += -lOsiSpx -lsoplex.linux.x86.gnu.opt
endif
ifeq ($(OSI_INTERFACE),VOL)
       LPSINCDIR += 
       LPLIBPATHS +=
       LPLIB += -lOsiVol
endif
ifeq ($(OSI_INTERFACE),DYLP)
       LPSINCDIR += ${HOME}/include
       LPLIBPATHS += ${HOME}/lib
       LPLIB += -lOsiDylp -lOsiDylpSolver -ldylpstd
endif
ifeq ($(OSI_INTERFACE),GLPK)
       LPSINCDIR += ${HOME}/src/glpk-4.7/include
       LPLIBPATHS += ${HOME}/src/glpk-4.7/src
       LPLIB += -lOsiGlpk -lglpk
endif
endif

##############################################################################
# Interactive optimizer definitions
##############################################################################

##############################################################################
# If you want to use the GNU readline library, then simply set the following 
# flag. It will allow the interactive shell to be able to behave exactly like 
# the Linux terminal command line, i.e., it will keep the history of the used 
# commands, will complete the input word to possible commands, etc. Make sure
# that you have the needed package (readline.h and history.h include files 
# and their libraries) on the system files path. 
##############################################################################

# This flag is automatically set to FALSE for the archs CYGWIN and Darwin...

HAS_READLINE = TRUE

##############################################################################
# GLPMPL definitions
##############################################################################

##############################################################################
# SYMPHONY includes the GMPL parser from GLPK by default. If you don't want 
# to compile those files, simply set the following flag off. 
##############################################################################

USE_GLPMPL = TRUE

##############################################################################
##############################################################################
# Generate generic cutting planes. If you are using the OSI interface, you 
# can now add generic cutting planes from the CGL by setting the flag below.
# Which cutting planes are added can be controlled by SYMPHONY parameters (see
# the user's manual
##############################################################################
##############################################################################

USE_CGL_CUTS = TRUE

##############################################################################
# If you wish to compile and use SYMPHONY or one of the application through 
# the SYMPHONY OSI interface, set USE_OSI_INTERFACE to TRUE below. This will 
# only have the main function to call the OSI SYMPHONY interface. See the 
# corresponding main function for the implementation. Note that
# you must have COIN and OSI SYMPHONY interface installed to use this 
# capability. See above to set the path to the COIN root directory. 
##############################################################################

USE_OSI_INTERFACE = FALSE

##############################################################################
##############################################################################
# COMM Protocol definitions
##############################################################################
##############################################################################

##############################################################################
# If you want something other than PVM, add it here. 
##############################################################################

##############################################################################
# Setting COMM_PROTOCOL to NONE will allow compilation without linking the 
# PVM library, but only works if a single executable is produced (either 
# sequential or shared-memory). Change the COMM_PROTOCOL if you want to
# compile a distributed version of the code.
##############################################################################

COMM_PROTOCOL = NONE
#COMM_PROTOCOL = PVM

##############################################################################
##############################################################################
# Set the compiler -- If an OpenMP compliant copiler is used, then a shared
# memory version of the code will result as long as at least COMPILE_IN_LP is
# set to TRUE (see comments above). Note that if you do not plan to install 
# the COIN libraries, you can change the the compiler to be gcc for faster
# compilation. Also note that, this compiler will be used to make COIN 
# libraries if they are to be installed through SYMPHONY, i.e., by typing
# "make coin". 
##############################################################################
##############################################################################

CC = g++

##############################################################################
# Set the optimization level
# NOTE: if it is set to "-g" then everything is compiled debugging enabled.
#       if it is set to "-O" then it'll be reset to the highest possible opt
#       otherwise it'll left alone 
##############################################################################

OPT = -O

##############################################################################
# Set the optimization level for the COIN libraries.
##############################################################################

COIN_OPT = -O

##############################################################################
##############################################################################
# These options are for configuring the modules and have the following
# meanings:
#
# SYM_COMPILE_IN_CG: If set to true, then the CG function will be called
#       directly from each LP solver instead of running as a separate 
#       executable. Note that the parameter "use_cg" should be set to FALSE 
#       (the default) if this option is set. The executable containing the LP 
#       solver will have the suffix _cg added to it to denote the inclusion of
#       the cut generator function.
# SYM_COMPILE_IN_CP: As above, if this flag is set, then the cut pool resides
#	in the LP solver and the pool is scanned directly from there. Note that
#	if this option is chosen when multiple LP processes are running, then
#	they will all have their own cut pool. The executable containing the 
#	LP solver will have the suffix _cp added to it to denote the inclusion
#	of the cut generator function.
# SYM_COMPILE_IN_LP: If this flag is set, the LP solver will be called 
#       directly from the tree manager. Note that this necessarily implies 
#       that there only be one LP solver. This DOES NOT automatically imply 
#       that the cut generator and/or cut pool will be compiled in. The tree 
#	manager executable name will have the appropriate suffix added to it
#	to denote the inclusion of the LP solver function.
# SYM_COMPILE_IN_TM: If this flag is set, the tree manager function will be 
#	compiled directly from the master module instead of running as a 
#	separate executable. This DOES NOT imply that the LP, cut generator 
#	or cut pool functions will be compiled in. The master executable
#	name will contain a suffix indicating what functions are compiled in.
#
# Note that if an OpenMP compliant compiler is used to make a shared-memory
#	version of the code, then it is recommended to set all these
#	variables to TRUE. However, it should work with only COMPILE_IN_LP
#	set to TRUE.
##############################################################################
##############################################################################

# !!!These variables will be overriden if user's or one of the application's 
# Makefile is called!!!                                                    

##############################################################################
##############################################################################
# Note: The only parallel configuration currently supported is 
# to set SYM_COMPILE_IN_LP = FALSE 
##############################################################################
##############################################################################

SYM_COMPILE_IN_CG = TRUE
SYM_COMPILE_IN_CP = TRUE
SYM_COMPILE_IN_LP = TRUE
SYM_COMPILE_IN_TM = TRUE

##############################################################################
##############################################################################
# A bunch of other compile-time options
##############################################################################
##############################################################################

##############################################################################
# Compile in the sensitivity analysis features
##############################################################################

SENSITIVITY_ANALYSIS = FALSE

##############################################################################
# Option to only process the root node (for testing root lower bounds)
##############################################################################

ROOT_NODE_ONLY = FALSE

##############################################################################
# ccmalloc related flags
##############################################################################

CCMALLOC = ccmalloc

######################################################################
# Whether to compile in the fractional branching option
######################################################################

COMPILE_FRAC_BRANCHING = FALSE

#######################################################################
# Whether to perform additional sanity checks (for debugging purposes)
#######################################################################

DO_TESTS = FALSE

#######################################################################
# More testing ....
#######################################################################

TM_BASIS_TESTS = FALSE

#######################################################################
# Additional debugging options 
#######################################################################

TRACE_PATH = FALSE
CHECK_CUT_VALIDITY = FALSE

#######################################################################
# Additional statistics
#######################################################################

STATISTICS = FALSE

##############################################################################
# Some experimental pseudo-cost branching stuff
##############################################################################

PSEUDO_COSTS = FALSE

##############################################################################
# Set this to true if you are going to use the IGD graph drawing application
##############################################################################

DRAWGRAPH = FALSE

