Bug #1267: Integrate METIS graph partitioning library
[charm.git] / src / libs / ck-libs / metis / Makefile
blobb8e2bd2568f0d4b27c1acf7490b307b5cb2c9437
1 # This file in metis was modified by Kavitha Chandrasekar at UIUC
2 # to skip ./configure step and directly make the metis library
4 # Configuration options.
5 gdb = not-set
6 assert = not-set
7 assert2 = not-set
8 debug = not-set
9 gprof = not-set
10 openmp = not-set
11 prefix = not-set
12 gklib_path = not-set
13 shared = not-set
14 cc = not-set
17 # Basically proxies everything to the builddir cmake.
19 cputype = $(shell uname -m | sed "s/\\ /_/g")
20 systype = $(shell uname -s)
22 BUILDDIR = build/$(systype)-$(cputype)
24 # Process configuration options.
25 CONFIG_FLAGS = -DCMAKE_VERBOSE_MAKEFILE=1
26 ifeq ($(gklib_path), not-set)
27 gklib_path = GKlib
28 endif
29 CONFIG_FLAGS += -DGKLIB_PATH=$(abspath $(gklib_path))
30 ifneq ($(gdb), not-set)
31 CONFIG_FLAGS += -DGDB=$(gdb)
32 endif
33 ifneq ($(assert), not-set)
34 CONFIG_FLAGS += -DASSERT=$(assert)
35 endif
36 ifneq ($(assert2), not-set)
37 CONFIG_FLAGS += -DASSERT2=$(assert2)
38 endif
39 ifneq ($(debug), not-set)
40 CONFIG_FLAGS += -DDEBUG=$(debug)
41 endif
42 ifneq ($(gprof), not-set)
43 CONFIG_FLAGS += -DGPROF=$(gprof)
44 endif
45 ifneq ($(openmp), not-set)
46 CONFIG_FLAGS += -DOPENMP=$(openmp)
47 endif
48 ifneq ($(prefix), not-set)
49 CONFIG_FLAGS += -DCMAKE_INSTALL_PREFIX=$(prefix)
50 endif
51 ifneq ($(shared), not-set)
52 CONFIG_FLAGS += -DSHARED=1
53 endif
54 ifneq ($(cc), not-set)
55 CONFIG_FLAGS += -DCMAKE_C_COMPILER=$(cc)
56 endif
58 VERNUM=5.1.0
59 PKGNAME=metis-$(VERNUM)
61 define run-config
62 mkdir -p $(BUILDDIR)
63 cd $(BUILDDIR) && cmake $(CURDIR) $(CONFIG_FLAGS)
64 endef
66 all clean install:
67 make -C GKlib;
68 make -C libmetis;
70 uninstall:
71 xargs rm < $(BUILDDIR)/install_manifest.txt
73 config: distclean
74 $(run-config)
76 distclean:
77 rm -rf $(BUILDDIR)
79 remake:
80 find . -name CMakeLists.txt -exec touch {} ';'
82 dist:
83 utils/mkdist.sh $(PKGNAME)
85 .PHONY: config distclean all clean install uninstall remake dist