File: Makefile

package info (click to toggle)
scotch 5.1.8a.dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 7,516 kB
  • ctags: 5,199
  • sloc: ansic: 56,201; makefile: 2,719; yacc: 600; lex: 264; fortran: 90; sh: 30
file content (144 lines) | stat: -rw-r--r-- 4,644 bytes parent folder | download
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
## Copyright 2007-2009 ENSEIRB, INRIA & CNRS
##
## This file is part of the Scotch software package for static mapping,
## graph partitioning and sparse matrix ordering.
##
## This software is governed by the CeCILL-C license under French law
## and abiding by the rules of distribution of free software. You can
## use, modify and/or redistribute the software under the terms of the
## CeCILL-C license as circulated by CEA, CNRS and INRIA at the following
## URL: "http://www.cecill.info".
## 
## As a counterpart to the access to the source code and rights to copy,
## modify and redistribute granted by the license, users are provided
## only with a limited warranty and the software's author, the holder of
## the economic rights, and the successive licensors have only limited
## liability.
## 
## In this respect, the user's attention is drawn to the risks associated
## with loading, using, modifying and/or developing or reproducing the
## software by the user in light of its specific status of free software,
## that may mean that it is complicated to manipulate, and that also
## therefore means that it is reserved for developers and experienced
## professionals having in-depth computer knowledge. Users are therefore
## encouraged to load and test the software's suitability as regards
## their requirements in conditions enabling the security of their
## systems and/or data to be ensured and, more generally, to use and
## operate it in the same conditions as regards security.
## 
## The fact that you are presently reading this means that you have had
## knowledge of the CeCILL-C license and that you accept its terms.
##

bindir		= ../../bin
includedir	= ../../include
libdir		= ../../lib

##
##  General inference rules.
##

include ../Makefile.inc

%$(OBJ)	:	%.c
				$(CC) $(CFLAGS) -I$(includedir) -I../libscotch -c $(<) -o $(@)

%$(EXE)	:	%.c
		 		$(CC) $(CFLAGS) -I$(includedir) -I../libscotch $(<) -o $(@) -L$(libdir) $(LDFLAGS)

##
##  Project rules.
##

.PHONY				:	ptscotch	scotch	ptinstall	install	clean	realclean

scotch				:
					$(MAKE) CC="$(CCS)" SCOTCHLIB=ptscotch						\
					libscotchmetis$(LIB)

ptscotch			:
					$(MAKE) CFLAGS="$(CFLAGS) -DSCOTCH_PTSCOTCH" CC="$(CCP)" SCOTCHLIB=ptscotch	\
					libptscotchparmetis$(LIB)

install				:	scotch
					-$(CP) metis.h $(includedir)
					-$(CP) libscotchmetis$(LIB) $(libdir)

ptinstall			:	ptscotch
					-$(CP) parmetis.h $(includedir)
					-$(CP) libptscotchparmetis$(LIB) $(libdir)

clean				:
					-$(RM) *~ *$(OBJ) lib*$(LIB)

realclean			:	clean

##
##  Todo list.
##

metis_graph_order$(OBJ)		:	metis_graph_order.c			\
					../libscotch/module.h			\
					../libscotch/common.h			\
					$(includedir)/scotch.h			\
					metis.h

metis_graph_order_f$(OBJ)	:	metis_graph_order_f.c			\
					../libscotch/module.h			\
					../libscotch/common.h			\
					$(includedir)/scotch.h			\
					metis.h

metis_graph_part$(OBJ)		:	metis_graph_part.c			\
					../libscotch/module.h			\
					../libscotch/common.h			\
					$(includedir)/scotch.h			\
					metis.h

metis_graph_part_f$(OBJ)	:	metis_graph_part_f.c			\
					../libscotch/module.h			\
					../libscotch/common.h			\
					$(includedir)/scotch.h			\
					metis.h

parmetis_dgraph_order$(OBJ)	:	parmetis_dgraph_order.c			\
					../libscotch/module.h			\
					../libscotch/common.h			\
					$(includedir)/ptscotch.h		\
					parmetis.h

parmetis_dgraph_order_f$(OBJ)	:	parmetis_dgraph_order_f.c		\
					../libscotch/module.h			\
					../libscotch/common.h			\
					$(includedir)/ptscotch.h		\
					parmetis.h

parmetis_dgraph_part$(OBJ)	:	parmetis_dgraph_part.c			\
					../libscotch/module.h			\
					../libscotch/common.h			\
					$(includedir)/ptscotch.h		\
					parmetis.h

parmetis_dgraph_part_f$(OBJ)	:	parmetis_dgraph_part_f.c		\
					../libscotch/module.h			\
					../libscotch/common.h			\
					$(includedir)/ptscotch.h		\
					parmetis.h

libptscotchparmetis$(LIB)	:	parmetis_dgraph_order$(OBJ)		\
					parmetis_dgraph_order_f$(OBJ)		\
					parmetis_dgraph_part$(OBJ)		\
					parmetis_dgraph_part_f$(OBJ)
					$(CC) -shared -Wl,-soname,libptscotchparmetis-5.1.so -L../libscotch -lptscotch -lscotch -o libptscotchparmetis-5.1.so $^
					ln -s libptscotchparmetis-5.1.so libptscotchparmetis.so
					$(AR) $(ARFLAGS) $(@) $(^)
					-$(RANLIB) $(@)

libscotchmetis$(LIB)		:	metis_graph_order$(OBJ)			\
					metis_graph_order_f$(OBJ)		\
					metis_graph_part$(OBJ)			\
					metis_graph_part_f$(OBJ)
					$(CC) -shared -Wl,-soname,libscotchmetis-5.1.so -L../libscotch -lscotch -o libscotchmetis-5.1.so $^
					ln -s libscotchmetis-5.1.so libscotchmetis.so
					$(AR) $(ARFLAGS) $(@) $(^)
					-$(RANLIB) $(@)