1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
# STEP 1: Set DSDPROOT in this file or comment out and make it an environment variable
#DSDPROOT = /home/benson/dsdp/DSDP5.8
#DSDPROOT = Y:\dsdp\DSDP5.8
# LINUX and GCC USERS can probably stop here,
# the defaults below should work, although fast BLAS and LAPACK recommended.
# STEP 2: Set the name of the C compiler.
CC = gcc
#CC = cc
#CC = g++
#CC = mpicc
#CC = g++ # GNU C++
#CC = icc # INTEL
#CC = pgcc # Portland Group
#CC = ecc -KPIC
#CC = cl # CYGWIN
# STEP 3: Set three compiler options.
# STEP 3a: Compiler Optimization. You should probably add a -On where
# n is the maximum optimization allowed by your C compiler.
OPTFLAGS = -O3
#OPTFLAGS = /O2
# STEP 3b: Add timing support by uncommenting one of the following lines.
# no timing is completely portable, DSDP_MS_TIME for Microsoft compiler,
# and DSDP_TIME for gcc and many other Linux/Unix compilers.
#DSDPTIMER = NONE
DSDPTIMER = DSDP_TIME
#DSDPTIMER = DSDP_MS_TIME
# STEP 3c: Add other compiler flags.
DSDPCFLAGS =
#DSDPCFLAGS = -Wall
#DSDPCFLAGS = -DDSDPMATLAB
# Other flags concern BLAS and LAPACK libraries -- see next step.
# -DCAPSBLAS if BLAS and LAPACK routine names are capitalized.
# -DNOUNDERBLAS if BLAS and LAPACK routine names have no underscore.
# -D__DSDP_NONAMEMANGLING if using C++ compiler and BLAS LAPACK names should not be mangled. This should be picked up automatically.
# STEP 4. Set Linker and FLAGS: Link the DSDP library to application
CFLAGS = ${OPTFLAGS} -I. -I${DSDPROOT}/include ${DSDPCFLAGS}
CLINKER = ${CC} ${OPTFLAGS}
#CLINKER = ${CXX} ${OPTFLAGS} -static
#CLINKER = link /out:dsdp5.exe
#SH_LD = ${CC} -shared -W1,-soname,
# STEP 5:
# Location of BLAS AND LAPACK libraries.
# Not needed to compile library or matlab executable
# Needed to link DSDP library to the driver ( read SDPA files, maxcut example, ...)
# Also include the math library and other libraries needed to link the BLAS to the C files that call them.
LAPACKBLAS = -llapack -lblas -lg2c -lm
#LAPACKBLAS = -L/usr/lib/ -llapack -lblas -lg2c -lm
#LAPACKBLAS = -L/home/benson/ATLAS/Linux_P4SSE2/lib -llapack -lcblas -lf77blas -latlas -lg2c -lm
#LAPACKBLAS = -L/sandbox/benson/ATLAS-3.6/lib/Linux_P4SSE2 -llapack -lcblas -lf77blas -latlas -lg2c -lm
#LAPACKBLAS = /soft/apps/packages/lapack-3.0/lib/lapack_LINUX.a -L/soft/apps/packages/atlas-3.6.0/lib -lcblas -lf77blas -latlas -lg2c -lm
# STEP 6, MATLAB MACROS - If compiling Matlab interface, check MEX flag.
MEX = mex -O
#MEX = C:\Matlab\bin\mex
DSDPMATLABDIR = ${DSDPROOT}/matlab
# Location of the DSDP library
DSDPLIB = ${DSDPROOT}/lib/libdsdp.a
DSDPLIBSO = ${DSDPROOT}/lib/libdsdp.so
# Link drivers to the following libraries.
# EXAMPLE_LIBS = ${DSDPLIB} ${LAPACKBLAS}
#Directory to put the examples after compiling them.
EXECDIR = ${DSDPROOT}/bin/
# STEP 7 SET Operating system commands
# Other build information, archive, remove, move, copy
ARCH = ar cr
RANLIB = ranlib
#RANLIB = echo
RM = rm -f
MV = mv
CP = cp
DD = ./
PP = ../
dsdplib: ${DSDPOBJ}
${ARCH} ${DSDPLIB} ${DSDPOBJ}
${RANLIB} ${DSDPLIB}
make clean
.c.o:
${CC} ${CFLAGS} ${DCFLAGS} -c $*.c
info:
-@echo "=========================================="
-@echo " "
-@echo "Compiling DSDP5"
-@echo " "
-@echo "For help with installation problems, please send EVERYTHING"
-@echo "printed out below to the developers"
-@echo "=========================================="
-@echo On `date` on `hostname`
-@echo Machine characteristics: `uname -a`
-@echo "-----------------------------------------"
-@echo "Using C compiler: ${CC}"
-@echo "Using compiler options: ${CFLAGS}"
-@echo "-----------------------------------------"
-@echo "Current Directory: ${PWD}"
-@echo "Using DSDP directory: ${DSDPROOT}"
-@echo "=========================================="
-@echo " "
#
chkroot:
@if [ ${DSDPROOT}foo = foo ] ; then \
echo "*********************** ERROR **********************" ; \
echo "Set the variable DSDPROOT " ; \
echo " to the location of the DSDP5 package" ; \
echo "Either"; \
echo " edit the file 'DSDP5.x/make.include', or "; \
echo " set it as an environment variable "; \
echo "****************************************************" ; \
false; fi
|