Bug #1267: Integrate METIS graph partitioning library
[charm.git] / src / libs / ck-libs / metis / GKlib / test / Makefile.in.old
blobcac4f523a6d4bf4df46b052249da0f3e644a4cbd
1 #*************************************************************************
2 # Global flags
3 #*************************************************************************
4 gdb         = yes
5 debug       = no
6 memdbg      = no
7 openmp      = no
8 x86compiler = gcc
10 VERNUM = 0.1.0
14 #*************************************************************************
15 # System-specific compilation flags
16 #*************************************************************************
17 # Get some basic information about the system that you are working on
18 cputype = $(shell uname -m | sed "s/\\ /_/g")
19 systype = $(shell uname)
20 ifeq ($(findstring CYGWIN, $(systype)),CYGWIN)
21 #  systype = CYGWIN
22   systype = MSWIN
23   cputype = x86
24 endif
27 GKLIBINCDIR   = $(HOME)/work/algorithms/GKlib/trunk/
28 GKLIBBUILDDIR = $(HOME)/work/algorithms/GKlib/builds/$(systype)-$(cputype)
31 ifeq ($(systype),MSWIN)
32   #-------------------------------------------------------------------
33   # These defs are very much Visual Studio Specific
34   #-------------------------------------------------------------------
35   #Compiler information
36   CC = cl
37   OPTFLAGS = /Ox
38   COPTIONS = -DWIN32 -DMSC -D_CRT_SECURE_NO_DEPRECATE 
40   #Compile input/output file specification
41   SOURCEFILE = /c $<
42   OUTPUTFILE = /Fo$@
44   #Output specification for executables
45   EXEOUTPUTFILE = /Fe$@   # This option is when cl is used for linking
46   #EXEOUTPUTFILE = /OUT:$@  # This option is used when link is used for linking
48   #Linker information
49   LDOPTIONS = /MT 
50   #LD = /cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ 8/VC/BIN/link
51   LD = cl 
52   MERGEMANIFEST = 
54   #Library creation information
55   AR = lib /OUT:$@ 
56   RANLIB =
58   ifeq ($(openmp),yes)
59     COPTIONS  += -D__OPENMP__ /openmp 
60     LDOPTIONS += /openmp
61     MERGEMANIFEST = vc_mt -manifest $@.manifest -outputresource:$@\;1
62   endif
64   #Library information
65   ifeq ($(cputype),i386)
66     LIBPLOTDIR = ../Libplot/Win32
67   else
68     LIBPLOTDIR = ../Libplot/Win64
69   endif
70   LIBS = $(LIBPLOTDIR)/libplot.lib  $(BUILDDIR)/libcluto.lib $(GKLIBBUILDDIR)/libGKlib.lib
72   # Standard file extensions 
73   OBJEXT = .obj
74   LIBEXT = .lib
75   EXEEXT = .exe
76 else
77   ifeq ($(systype),Linux)
78     ifeq ($(x86compiler),gcc) 
79       #Compiler information
80       CC = gcc
81       OPTFLAGS = -O6 
82       COPTIONS = -DLINUX -D_FILE_OFFSET_BITS=64 -pedantic -std=c99  -pthread
84       #Linker information
85       LDOPTIONS = 
86       LD = gcc 
87       
88       MERGEMANIFEST = 
90       #Library creation information
91       AR = ar rv
92       RANLIB = ar -ts
93     else
94       #Compiler information
95       CC = icc
96       OPTFLAGS = -O3 
97       COPTIONS = -DLINUX -D_FILE_OFFSET_BITS=64 -std=c99 
99       #Linker information
100       LDOPTIONS = 
101       LD = icc 
103       #Library creation information
104       AR = ar rv
105       RANLIB = ar -ts
107       ifeq ($(openmp),yes)
108         COPTIONS  += -D__OPENMP__ -openmp -openmp-report2
109         LDOPTIONS += -openmp
110       endif
111     endif
113     #Library information
114     ifeq ($(cputype),x86_64) 
115       LIBPLOTDIR = ../Libplot/Linux64
116     else
117       LIBPLOTDIR = ../Libplot/Linux32
118     endif
119   endif
122   ifeq ($(systype),SunOS)
123     #Compiler information
124     CC = /opt/SUNWspro/bin/cc
125     OPTFLAGS = -xO4 
126     COPTIONS =-DSUNOS  
128     #Linker information
129     LDOPTIONS = 
130     LD = /opt/SUNWspro/bin/cc
133     #Library creation information
134     AR = ar rv
135     RANLIB = ar -ts
137     #Library information
138     LIBPLOTDIR = ../Libplot/SunOS
139   endif
142   ifeq ($(systype),Darwin)
143     #Compiler information
144     CC = gcc
145     OPTFLAGS = -O6 
146     COPTIONS = -DDARWIN -D_FILE_OFFSET_BITS=64 -pedantic -std=c99 
148     #Linker information
149     LDOPTIONS = -fvisibility=default
150     LD = gcc 
152     #Library creation information
153     AR = ar rv
154     RANLIB = ar -ts
156     #Library information
157     ifeq ($(cputype),i386)
158       LIBPLOTDIR = ../Libplot/Darwini386
159     else
160       LIBPLOTDIR = ../Libplot/DarwinPPC
161     endif
162   endif
164   ifeq ($(systype),CYGWIN)
165     #Compiler information
166     CC = gcc
167     OPTFLAGS = -O6
168     COPTIONS = -DCYGWIN -DWIN32 -D_FILE_OFFSET_BITS=64 -Wall -std=c99 -pedantic -mno-cygwin
170     #Linker information
171     LDOPTIONS = -mno-cygwin
172     LD = gcc
174     #Library creation information
175     AR = ar crv
176     RANLIB = ar -ts
178     #Library information
179     LIBPLOTDIR = ../Libplot/CYGWIN
180   endif
183   #-------------------------------------------------------------------
184   # These defs are common among the GNU/GCC based systems
185   #-------------------------------------------------------------------
186   #Compile input/output file specification
187   SOURCEFILE = -c $<
188   OUTPUTFILE = -o $@
190   #Output specification for executables
191   EXEOUTPUTFILE = -o $@
193   #Library creation information
194   AR = ar crv $@ 
195   RANLIB = ar -ts $@
197   #Libraries needed for linking
198   LIBSDIR  = -L$(BUILDDIR) -L$(GKLIBBUILDDIR) -L$(HOME)/local/lib
199   LIBS     = -lGKlib -lpcreposix -lpcre -lz -lm
201   # Standard file extensions 
202   OBJEXT = .o
203   LIBEXT = .a
204   EXEEXT = 
205 endif
208 #**************************************************************************
209 DMALLOCINC =
210 DMALLOCFLAGS =
211 DEBUGFLAGS =
213 ifeq ($(dmalloc),yes)
214   DMALLOCINC = -I$(HOME)/local/include
215   DMALLOCFLAGS = -DDMALLOC
216   OPTFLAGS = -g
217 endif
219 ifeq ($(debug),yes)
220   DEBUGFLAGS = -DDEBUG
221   OPTFLAGS = -g
222 endif
224 ifeq ($(gdb),yes)
225   OPTFLAGS += -g
226 endif
227 #**************************************************************************
230 #**************************************************************************
231 # Create the build directory if it does not exist
232 #**************************************************************************
233 ifeq ($(systype),Darwin)
234   BINDIR    = $(HOME)
235 else
236   BINDIR    = $(HOME)/work/bin/$(systype)-$(cputype)
237   $(shell mkdir -p $(BINDIR))
238 endif
240 ifeq ($(openmp),no)
241   BUILDDIR    = ./builds/$(systype)-$(cputype)
242 else
243   BUILDDIR    = ./builds/$(systype)-$(cputype)-openmp
244 endif
246 LIBBUILDDIR = $(BUILDDIR)/lib
247 PRGBUILDDIR = $(BUILDDIR)/prg
248 $(shell mkdir -p $(BUILDDIR))
249 $(shell mkdir -p $(LIBBUILDDIR))
250 $(shell mkdir -p $(PRGBUILDDIR))
255 INCLUDES = -I./ -I$(GKLIBINCDIR) -I$(LIBPLOTDIR) -I$(HOME)/local/include 
256 CFLAGS   = $(COPTIONS) $(OPTFLAGS) $(DEBUGFLAGS) $(INCLUDES)