### This file contains some compilation configuration options.
### The bottom half of this file contains several predefined configurations.
### A predefined configuration can be selected by using using a definition
### "SYS=sysname" at the top of this file, where sysname is the name used
### in this file to describe the configuration.
###
### Or, you can create your own configuration by modifying the default values
### after the comment "DEFAULT VALUES BEGIN HERE"
###
### Note that if you are using cplex, you will have to modify the cplex
### variables even if you use a predefined configuration.
###
### The predefined systems are (the os and compiler versions given are the
### ones on which the configuration has been tested):
###
### vendor/processor       o/s                compiler       configuration name
### -------------------    --------           --------       ------------------
### DEC Alpha              Digital Unix 4.0A  cc             ALPHA
### DEC Alpha              Digital Unix 4.0a  gcc 2.7.2.1    ALPHA_GCC
### DEC Alpha              Linux/Alpha 2.0.27 gcc            ALPHA_LINUX
### Intel x86-compatible   Solaris/x86 2.5    gcc 2.7.2.1    INTEL_SOLARIS
### Intel x86-compatible   Solaris/x86 2.5    cc 3.0.1       INTEL_SOLARIS_CC
### *Intel x86-compatible  Linux/x86 1.2.13   gcc 2.7.2      INTEL_LINUX
### **Intel x86-compatible FreeBSD            gcc            INTEL_BSD
### IBM RS6000             AIX 4.2.1          cc             RS6000
### IBM RS6000             AIX 4.2.1          gcc 2.7.2      RS6000_GCC
### IBM RS6000             AIX 3.2.5          cc             RS6000
### IBM RS6000             AIX 3.2.5          gcc 2.7.2      RS6000_GCC
### Silicon Graphics       IRIX 5.3           cc             SILICON
### Silicon Graphics       IRIX 5.3           gcc 2.7.2.2    SILICON_GCC
### Sun UltraSparc         Solaris 2.5.1      gcc 2.7.2.1    SPARC
### Sun UltraSparc         Solaris 2.5.1      cc 4.0,p42     SPARC_CC
### *Sun Sparc             Solaris 2.5.1      gcc 2.7.2.1    SPARC
### *Sun Sparc             Solaris 2.5.1      cc 4.2         SPARC_CC
### *Sun Sparc             SunOS 4.1.3_U1     acc 3.0.1      SUNOS
### *Sun Sparc             SunOS 4.1.3_U1     gcc 2.7.2      SUNOS_GCC
### *Sun Sparc             SunOS 4.1.3_U1     cc             SUNOS_CC
###

### Uncomment and modify this line to specify a predefined configuration
# SYS=SILICON

### CC is the name of the C compiler
CC=gcc -m32

### OPTFLAGS are optimization flags to the compiler
OPTFLAGS=-O

### COMFLAGS are flags to be passed to the compiler, in addition to
### the OPTFLAGS.  Flags which turn on additional warnings are recommended.
COMFLAGS=

### LOADFLAGS are flags to be passed to the linker, in addition to
### the OPTFLAGS
LOADFLAGS=

### RANLIB is the name of a program which creates index information in
### a library archive.  Some systems (for example, IRIX), don't require
### ranlib.  In this case, set RANLIB=/bin/true.
RANLIB=ranlib
# RANLIB=/bin/true

### OBJNAME is the extension used for the compiled files output by the
### compiler and read by the linker.  It is almost always o.
OBJNAME=o

### CCSYSNAME is the name of the system in INCLUDE/config.h.
### CCSYS_STANDARD is good on several systems with an ANSI C compiler,
### and CCSYS_STANDARD_KNR is good on a few with an older, K&R C compiler.
CCSYSNAME=CCSYS_STANDARD

############################################################
###
### the following are only necessary if you are using CPLEX.
###
############################################################

### CPLEX_LIB is the name (and location) of your cplex library
# CPLEX_LIB=/usr/cplex/libcplex.a

### CPLEX_INCLUDE_DIR is the location of your cplex.h
# CPLEX_INCLUDE_DIR=/usr/cplex/

##########################################################################
###
### PREDEFINED CONFIGURATIONS START HERE
###
##########################################################################

### ALPHA: a DEC Alpha running Digital Unix with cc
ifeq ($(SYS),ALPHA)
OPTFLAGS=-tune host -O4
COMFLAGS=-std1 -warnprotos -portable
CC=cc
CCSYSNAME=CCSYS_STANDARD
endif

### ALPHA_GCC: a DEC Alpha running Digital Unix with gcc
ifeq ($(SYS),ALPHA_GCC)
OPTFLAGS=-O3
COMFLAGS=-ansi -pedantic -Wall -Wshadow -W -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wnested-externs
CC=gcc
CCSYSNAME=CCSYS_STANDARD
endif

### ALPHA_LINUX: a DEC Alpha running Linux with gcc
ifeq ($(SYS),ALPHA_LINUX)
OPTFLAGS=-O3
# -pedantic -Wtraditional -Wmissing-prototypes -Wmissing-declarations
# generate many warnings for header files
COMFLAGS=-ansi -Wall -Wshadow -W -W -Wstrict-prototypes -Wpointer-arith -Wnested-externs
CC=gcc
CCSYSNAME=CCSYS_STANDARD
endif

### INTEL_BSD: an Intel x86-compatible running FreeBSD with gcc
ifeq ($(SYS),INTEL_BSD)
OPTFLAGS=-O3
COMFLAGS=-ansi -pedantic -Wall -Wshadow -W -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wnested-externs
CC=gcc
CCSYSNAME=CCSYS_STANDARD
endif

### INTEL_LINUX: an Intel x86-compatible running Linux with gcc
ifeq ($(SYS),INTEL_LINUX)
OPTFLAGS=-O3
COMFLAGS=-ansi -pedantic -Wall -Wshadow -W -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wnested-externs
CC=gcc
CCSYSNAME=CCSYS_STANDARD
endif

### INTEL_SOLARIS: an Intel x86-compatible running Solaris with gcc
ifeq ($(SYS),INTEL_SOLARIS)
OPTFLAGS=-O3
COMFLAGS=-ansi -pedantic -Wall -Wshadow -W -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wnested-externs
CC=gcc
CCSYSNAME=CCSYS_STANDARD
endif

### INTEL_SOLARIS_CC: a SUN Sparc running Solaris with cc
ifeq ($(SYS),INTEL_SOLARIS_CC)
OPTFLAGS=-xO2
COMFLAGS=-fd -v -Xc
CC=cc
CCSYSNAME=CCSYS_STANDARD
endif

### RS6000: an IBM RS6000 running AIX with cc
ifeq ($(SYS),RS6000)
OPTFLAGS=-O
CC=cc
COMFLAGS=-D_POSIX_SOURCE -qlanglvl=ansi
CCSYSNAME=CCSYS_STANDARD
endif

### RS6000_GCC: an IBM RS6000 running AIX with gcc
ifeq ($(SYS),RS6000_GCC)
OPTFLAGS=-O3
COMFLAGS=-ansi -pedantic -Wall -Wshadow -W -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wnested-externs
CC=gcc
CCSYSNAME=CCSYS_STANDARD
endif

### SILICON: A Silicon Graphics running IRIX with cc
ifeq ($(SYS),SILICON)
OPTFLAGS=-O2
COMFLAGS=-ansi -fullwarn
CC=cc
RANLIB=/bin/true
CCSYSNAME=CCSYS_STANDARD
endif

### SILICON_GCC: A Silicon Graphics running IRIX with gcc
ifeq ($(SYS),SILICON_GCC)
OPTFLAGS=-O3
COMFLAGS=-ansi -pedantic -Wall -Wshadow -W -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wnested-externs
CC=gcc
RANLIB=/bin/true
CCSYSNAME=CCSYS_STANDARD
endif

### SPARC: a SUN Sparc running Solaris with gcc
ifeq ($(SYS),SPARC)
OPTFLAGS=-O3
COMFLAGS=-ansi -pedantic -Wall -Wshadow -W -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wnested-externs
CC=gcc
CCSYSNAME=CCSYS_STANDARD
endif

### SPARC_CC: a SUN Sparc running Solaris with cc
ifeq ($(SYS),SPARC_CC)
OPTFLAGS=-xO2
COMFLAGS=-fd -v -Xc
CC=cc
CCSYSNAME=CCSYS_STANDARD
endif

### SUNOS: A Sun Sparc running SunOS with acc
ifeq ($(SYS),SUNOS)
OPTFLAGS=-O2 -fast
CC=/usr/lang/acc
COMFLAGS=-Xc
CCSYSNAME=CCSYS_STANDARD
endif

### SUNOS_CC: A Sun Sparc running SunOS with cc
ifeq ($(SYS),SUNOS_CC)
OPTFLAGS=-O2
CC=cc
CCSYSNAME=CCSYS_STANDARD_KNR
endif

### SUNOS_GCC: a SUN Sparc running SunOS with gcc
ifeq ($(SYS),SUNOS_GCC)
OPTFLAGS=-O3
COMFLAGS=-ansi -pedantic -Wall -Wshadow -W -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wnested-externs
CC=gcc
CCSYSNAME=CCSYS_SUNOS_GCC
endif

##########################################################################
###
### PREDEFINED CONFIGURATIONS END HERE
###
##########################################################################

ifeq ($(CCSYSNAME),)
CCSYSFLAG=-DCCSYS_UNKNOWN
else
CCSYSFLAG=-D$(CCSYSNAME)
endif

ifeq ($(CPLEX_INCLUDE_DIR),)
CPLEX_INCFLAG=
else
CPLEX_INCFLAG=-I$(CPLEX_INCLUDE_DIR)
endif

CFLAGS=$(CCSYSFLAG) -I$(INCLUDE) $(CPLEX_INCFLAG) $(COMFLAGS) $(OPTFLAGS)
LDFLAGS=$(OPTFLAGS) $(LOADFLAGS)

o=$(OBJNAME)
