Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/umfpack/src/amd/deps.py
3203 views
1
#!/usr/bin/python
2
#
3
# create preprocessing instructions
4
# from sources.lst
5
#
6
import re
7
8
sources="amd_aat amd_1 amd_2 amd_dump amd_postorder amd_post_tree amd_defaults amd_order amd_control amd_info amd_valid amd_preprocess"
9
10
amd_sources=[]
11
12
for f in re.split(" ",sources):
13
nf=re.sub('amd_','amd_i_',f) + ".c"
14
amd_sources.append(nf)
15
print nf + ":\n\t" + "$(CPP) $(INCLUDES) -DINT " + f + ".c > " + nf
16
17
for f in re.split(" ",sources):
18
nf=re.sub('amd_','amd_l_',f) + ".c"
19
amd_sources.append(nf)
20
print nf + ":\n\t" + "$(CPP) $(INCLUDES) -DLONG " + f + ".c > " + nf
21
22
print
23
print "AMD_CPP_SOURCES = \\"
24
for f in amd_sources:
25
if f == amd_sources[len(amd_sources)-1]:
26
print "\t"+f
27
else:
28
print "\t"+f + " \\"
29
30