source: issm/trunk-jpl/externalpackages/parmetis/configs/4.0/win/msys2/Makefile@ 26034

Last change on this file since 26034 was 26034, checked in by jdquinn, 4 years ago

CHG: Modifications to build system and additional configurations in support of Windows 10 MSYS2 MinGW build

File size: 3.2 KB
Line 
1# Configuration options.
2gdb = not-set
3assert = not-set
4assert2 = not-set
5debug = not-set
6openmp = not-set
7prefix = not-set
8gklib_path = not-set
9metis_path = not-set
10msmpi_root = not-set
11shared = not-set
12cc = mpicc
13cxx = mpicxx
14ar = not-set
15gcc-ar = not-set
16ranlib = not-set
17gcc-ranlib = not-set
18linker = not-set
19nm = not-set
20objcopy = not-set
21objdump = not-set
22rc = not-set
23strip = not-set
24
25
26# Basically proxies everything to the builddir cmake.
27
28PKGNAME = parmetis-4.0.3
29
30cputype = $(shell uname -m | sed "s/\\ /_/g")
31systype = $(shell uname -s)
32
33BUILDDIR = build/$(systype)-$(cputype)
34
35# Process configuration options.
36CONFIG_FLAGS = -DCMAKE_VERBOSE_MAKEFILE=1
37ifeq ($(gklib_path), not-set)
38 gklib_path = metis/GKlib
39endif
40ifeq ($(metis_path), not-set)
41 metis_path = metis
42endif
43CONFIG_FLAGS += -DGKLIB_PATH=$(abspath $(gklib_path)) -DMETIS_PATH=$(abspath $(metis_path))
44ifneq ($(local_msmpi), not-set)
45 CONFIG_FLAGS += -DLOCAL_MSMPI=1 -DMSMPI_ROOT=$(abspath $(msmpi_root))
46endif
47ifneq ($(gdb), not-set)
48 CONFIG_FLAGS += -DGDB=$(gdb)
49endif
50ifneq ($(assert), not-set)
51 CONFIG_FLAGS += -DASSERT=$(assert)
52endif
53ifneq ($(assert2), not-set)
54 CONFIG_FLAGS += -DASSERT2=$(assert2)
55endif
56ifneq ($(debug), not-set)
57 CONFIG_FLAGS += -DDEBUG=$(debug)
58endif
59ifneq ($(openmp), not-set)
60 CONFIG_FLAGS += -DOPENMP=$(openmp)
61endif
62ifneq ($(prefix), not-set)
63 CONFIG_FLAGS += -DCMAKE_INSTALL_PREFIX=$(prefix)
64endif
65ifneq ($(shared), not-set)
66 CONFIG_FLAGS += -DSHARED=1
67endif
68ifneq ($(cc), not-set)
69 CONFIG_FLAGS += -DCMAKE_C_COMPILER=$(cc)
70endif
71ifneq ($(cxx), not-set)
72 CONFIG_FLAGS += -DCMAKE_CXX_COMPILER=$(cxx)
73endif
74ifneq ($(ar), not-set)
75 CONFIG_FLAGS += -DCMAKE_AR=$(ar)
76endif
77ifneq ($(gcc-ar), not-set)
78 CONFIG_FLAGS += -DCMAKE_C_COMPILER_AR=$(gcc-ar) -DCMAKE_CXX_COMPILER_AR=$(gcc-ar)
79endif
80ifneq ($(ranlib), not-set)
81 CONFIG_FLAGS += -DCMAKE_RANLIB=$(ranlib)
82endif
83ifneq ($(gcc-ranlib), not-set)
84 CONFIG_FLAGS += -DCMAKE_C_COMPILER_RANLIB=$(gcc-ranlib) -DCMAKE_CXX_COMPILER_RANLIB=$(gcc-ranlib)
85endif
86ifneq ($(linker), not-set)
87 CONFIG_FLAGS += -DCMAKE_LINKER=$(linker)
88endif
89ifneq ($(nm), not-set)
90 CONFIG_FLAGS += -DCMAKE_NM=$(nm)
91endif
92ifneq ($(objcopy), not-set)
93 CONFIG_FLAGS += -DCMAKE_OBJCOPY=$(objcopy)
94endif
95ifneq ($(objdump), not-set)
96 CONFIG_FLAGS += -DCMAKE_OBJDUMP=$(objdump)
97endif
98ifneq ($(rc), not-set)
99 CONFIG_FLAGS += -DCMAKE_RC_COMPILER=$(rc)
100endif
101ifneq ($(strip), not-set)
102 CONFIG_FLAGS += -DCMAKE_STRIP=$(strip)
103endif
104
105define run-config
106mkdir -p $(BUILDDIR)
107cd $(BUILDDIR) && cmake $(CURDIR) $(CONFIG_FLAGS)
108endef
109
110all clean install:
111 @if [ ! -f $(BUILDDIR)/Makefile ]; then \
112 more BUILD.txt; \
113 else \
114 make -C $(BUILDDIR) $@ $(MAKEFLAGS); \
115 fi
116
117uninstall:
118 xargs rm < $(BUILDDIR)/install_manifest.txt
119
120config: distclean
121 $(run-config)
122
123distclean:
124 rm -rf $(BUILDDIR)
125
126remake:
127 find . -name CMakeLists.txt -exec touch {} ';'
128
129dist:
130 util/mkdist.sh $(PKGNAME)
131
132
133.PHONY: config distclean dist all clean install uninstall remake
Note: See TracBrowser for help on using the repository browser.