File: Makefile

package info (click to toggle)
mumps 5.1.2-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 15,704 kB
  • sloc: fortran: 310,672; ansic: 12,364; xml: 521; makefile: 469
file content (89 lines) | stat: -rw-r--r-- 2,314 bytes parent folder | download | duplicates (2)
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
#
#  This file is part of MUMPS 5.1.2, released
#  on Mon Oct  2 07:37:01 UTC 2017
#
topdir = .
libdir = $(topdir)/lib

default:	dexamples

.PHONY: default alllib all c z s d \
	sexamples dexamples cexamples zexamples multi_example \
	mumps_lib requiredobj libseqneeded clean

alllib:		c z s d
all:		cexamples zexamples sexamples dexamples multi_example

c:
	$(MAKE) ARITH=c mumps_lib
z:
	$(MAKE) ARITH=z mumps_lib
s:
	$(MAKE) ARITH=s mumps_lib
d:
	$(MAKE) ARITH=d mumps_lib


# Is Makefile.inc available ?
Makefile.inc:
	@echo "######################################################################"
	@echo "# BEFORE COMPILING MUMPS, YOU SHOULD HAVE AN APPROPRIATE FILE"
	@echo "# Makefile.inc AVALAIBLE. PLEASE LOOK IN THE DIRECTORY ./Make.inc FOR"
	@echo "# EXAMPLES OF Makefile.inc FILES, AT Make.inc/Makefile.inc.generic"
	@echo "# IN CASE YOU NEED TO BUILD A NEW ONE AND READ THE MAIN README FILE"
	@echo "######################################################################"
	@exit 1

include Makefile.inc

mumps_lib: requiredobj
	(cd src ; $(MAKE) $(ARITH))

cexamples:	c
	(cd examples ; $(MAKE) c)

zexamples:	z
	(cd examples ; $(MAKE) z)

sexamples:	s
	(cd examples ; $(MAKE) s)

dexamples:	d
	(cd examples ; $(MAKE) d)

multi_example:	s d c z
	(cd examples ; $(MAKE) multi)

requiredobj: Makefile.inc $(LIBSEQNEEDED) $(libdir)/libpord$(PLAT).a $(libdir)/libpord$(PLAT).so

# dummy MPI library (sequential version)

libseqneeded:
	(cd libseq; $(MAKE))
	cp libseq/lib* $(libdir)

# Build the libpord.a library and copy it into $(topdir)/lib
$(libdir)/libpord$(PLAT).a:
	if [ "$(LPORDDIR)" != "" ] ; then \
	  cd $(LPORDDIR); \
	  $(MAKE) CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" RANLIB="$(RANLIB)" OUTC="$(OUTC)" LIBEXT=$(LIBEXT); \
	fi;
	if [ "$(LPORDDIR)" != "" ] ; then \
	  cp $(LPORDDIR)/libpord$(PLAT).a $@; \
	fi;

$(libdir)/libpord$(PLAT).so:
	if [ "$(LPORDDIR)" != "" ] ; then \
	cd $(LPORDDIR); make CC="$(CC)" CFLAGS="$(OPTC)" AR="$(AR)" ARFUNCT= RANLIB="$(RANLIB)" libpord$(PLAT).so; fi;
	if [ "$(LPORDDIR)" != "" ] ; then \
	cp -a $(LPORDDIR)/libpord*.so lib/; fi;

clean:
	(cd src; $(MAKE) clean)
	(cd examples; $(MAKE) clean)
	(cd $(libdir); $(RM) *$(PLAT).a *$(PLAT).so)
	(cd libseq; $(MAKE) clean)
	if [ "$(LPORDDIR)" != "" ] ; then \
	  cd $(LPORDDIR); $(MAKE) realclean; \
        fi;