File: makefile

package info (click to toggle)
gwc 0.22.04-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,676 kB
  • sloc: ansic: 40,072; sh: 797; makefile: 661; perl: 37
file content (208 lines) | stat: -rwxr-xr-x 5,556 bytes parent folder | download | duplicates (6)
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# 
#
# Makefile for Meschach for GNU cc/emx (OS/2) 
# 
# Copyright (C) David Stewart & Zbigniew Leyk 1993
# modified by mati1831@perform.ww.tu-berlin.de
#
# $Id: $
#

srcdir = 
VPATH = 

CC = gcc

DEFS = -DHAVE_CONFIG_H
LIBS =  -lm
# we don't have ranlib
RANLIB = ar -s

CFLAGS = -O6


.c.o:
	$(CC) -c $(CFLAGS) $(DEFS) $<

# we do not need the shell
##SHELL = sh
# if we have rm, otherwise use del.
RM= rm -f
MES_PAK = mesch12a
TAR = tar
SHAR = shar -u
ZIP = gzip -r -l

###############################

LIST1 = copy.o err.o matrixio.o memory.o vecop.o matop.o pxop.o \
	submat.o init.o otherio.o machine.o matlab.o ivecop.o version.o \
	meminfo.o memstat.o
LIST2 = lufactor.o bkpfacto.o chfactor.o qrfactor.o solve.o hsehldr.o \
	givens.o update.o norm.o hessen.o symmeig.o schur.o svd.o fft.o \
	mfunc.o bdfactor.o
LIST3 = sparse.o sprow.o sparseio.o spchfctr.o splufctr.o \
	spbkp.o spswap.o iter0.o itersym.o iternsym.o
ZLIST1 = zmachine.o zcopy.o zmatio.o zmemory.o zvecop.o zmatop.o znorm.o \
	 zfunc.o 
ZLIST2 = zlufctr.o zsolve.o zmatlab.o zhsehldr.o zqrfctr.o \
         zgivens.o  zhessen.o zschur.o

# they are no longer supported
# if you use them add oldpart to all and sparse
OLDLIST = conjgrad.o lanczos.o arnoldi.o

ALL_LISTS = $(LIST1) $(LIST2) $(LIST3) $(ZLIST1) $(ZLIST2) $(OLDLIST)


HLIST = err.h iter.h machine.h matlab.h matrix.h matrix2.h \
	meminfo.h oldnames.h sparse.h sparse2.h \
	zmatrix.h zmatrix2.h

TORTURE = torture.o sptort.o ztorture.o memtort.o itertort.o \
	 mfuntort.o iotort.o

OTHERS = dmacheps.c extras.c fmacheps.c maxint.c  makefile.in \
	 README configure configure.in machine.h.in copyright \
	 tutorial.c tutadv.c rk4.dat ls.dat makefile


# Different configurations
all:  part1 part2 part3 zpart1 zpart2 
basic: part1 part2
sparse: part1 part2 part3 
complex: part1 part2 zpart1 zpart2


HBASE = err.h meminfo.h machine.h matrix.h

$(LIST1): $(HBASE)
part1: $(LIST1)
	ar ru meschach.a $(LIST1)
	$(RANLIB) meschach.a

$(LIST2): $(HBASE) matrix2.h
part2: $(LIST2)
	ar ru meschach.a $(LIST2)
	$(RANLIB) meschach.a

$(LIST3): $(HBASE) sparse.h sparse2.h
part3: $(LIST3)
	ar ru meschach.a $(LIST3)
	$(RANLIB) meschach.a

$(ZLIST1): $(HBASDE) zmatrix.h
zpart1: $(ZLIST1)
	ar ru meschach.a $(ZLIST1)
	$(RANLIB) meschach.a

$(ZLIST2): $(HBASE) zmatrix.h zmatrix2.h 
zpart2: $(ZLIST2)
	ar ru meschach.a $(ZLIST2)
	$(RANLIB) meschach.a

$(OLDLIST): $(HBASE) sparse.h sparse2.h 
oldpart: $(OLDLIST)
	ar ru meschach.a $(OLDLIST)
	$(RANLIB) meschach.a



#######################################

tar:
	- /bin/rm -f $(MES_PAK).tar
	chmod 644 `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \
	$(OTHERS) $(HLIST)  `echo $(TORTURE) | sed -e 's/\.o/.c/g'` 
	chmod 755 configure
	$(TAR) cvf $(MES_PAK).tar \
	 `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \
	$(HLIST)  $(OTHERS) \
	`echo $(TORTURE) | sed -e 's/\.o/.c/g'` \
	MACHINES DOC

# use this only for PC machines	
msdos-zip:
	- /bin/rm -f $(MES_PAK).zip
	chmod 644 `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \
	$(OTHERS) $(HLIST) `echo $(TORTURE) | sed -e 's/\.o/.c/g'` 
	chmod 755 configure
	$(ZIP)  $(MES_PAK).zip \
	 `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \
	$(HLIST)  $(OTHERS) `echo $(TORTURE) | sed -e 's/\.o/.c/g'` \
	MACHINES DOC
	

fullshar:
	- /bin/rm -f $(MES_PAK).shar;
	chmod 644 `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \
	$(OTHERS) $(HLIST) `echo $(TORTURE) | sed -e 's/\.o/.c/g'` 
	chmod 755 configure
	$(SHAR) `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \
	$(HLIST)  $(OTHERS) `echo $(TORTURE) | sed -e 's/\.o/.c/g'` \
	MACHINES DOC > $(MES_PAK).shar

shar:
	- /bin/rm -f meschach1.shar meschach2.shar meschach3.shar \
	meschach4.shar oldmeschach.shar meschach0.shar 
	chmod 644 `echo $(ALL_LISTS) | sed -e 's/\.o/.c/g'` \
	$(OTHERS) $(HLIST) `echo $(TORTURE) | sed -e 's/\.o/.c/g'` 
	chmod 755 configure	
	$(SHAR) `echo $(LIST1) | sed -e 's/\.o/.c/g'` > meschach1.shar
	$(SHAR) `echo $(LIST2) | sed -e 's/\.o/.c/g'` > meschach2.shar
	$(SHAR) `echo $(LIST3) | sed -e 's/\.o/.c/g'` > meschach3.shar	
	$(SHAR) `echo $(ZLIST1) | sed -e 's/\.o/.c/g'` \
	  `echo $(ZLIST2) | sed -e 's/\.o/.c/g'` > meschach4.shar
	$(SHAR) `echo $(OLDLIST) | sed -e 's/\.o/.c/g'` > oldmeschach.shar
	$(SHAR) $(OTHERS) `echo $(TORTURE) | sed -e 's/\.o/.c/g'` \
	  $(HLIST)  DOC MACHINES  > meschach0.shar


clean:
	$(RM) *.o core asx5213a.mat iotort.dat 

cleanup:
	$(RM) *.o core asx5213a.mat iotort.dat *.a 
	torture sptort ztorture memtort itertort mfuntort iotort

alltorture: torture sptort ztorture memtort itertort mfuntort iotort

torture:torture.o meschach.a
	$(CC) $(CFLAGS) $(DEFS) -o torture torture.o \
	meschach.a $(LIBS)
	emxbind torture
sptort:sptort.o meschach.a
	$(CC) $(CFLAGS) $(DEFS) -o sptort sptort.o \
	meschach.a $(LIBS)
	emxbind sptort
memtort: memtort.o meschach.a
	$(CC) $(CFLAGS) $(DEFS) -o memtort memtort.o \
	meschach.a $(LIBS)
	emxbind memtort
ztorture:ztorture.o meschach.a
	$(CC) $(CFLAGS) $(DEFS) -o ztorture ztorture.o \
	meschach.a $(LIBS)
	emxbind ztorture
itertort: itertort.o meschach.a
	$(CC) $(CFLAGS) $(DEFS) -o itertort itertort.o \
	meschach.a $(LIBS)
	emxbind itertort
iotort: iotort.o meschach.a
	$(CC) $(CFLAGS) $(DEFS) -o iotort iotort.o \
	meschach.a $(LIBS)
	emxbind iotort
mfuntort: mfuntort.o meschach.a
	$(CC) $(CFLAGS) $(DEFS) -o mfuntort mfuntort.o \
	meschach.a $(LIBS)
	emxbind mfuntort
tstmove: tstmove.o meschach.a
	$(CC) $(CFLAGS) $(DEFS) -o tstmove tstmove.o \
	meschach.a $(LIBS)
	emxbind tstmove
tstpxvec: tstpxvec.o meschach.a
	$(CC) $(CFLAGS) $(DEFS) -o tstpxvec tstpxvec.o \
	meschach.a $(LIBS)
	emxbind tstpxvec