Makefile 4.47 KB
Newer Older
thomas.forbriger's avatar
thomas.forbriger committed
1
2
3
4
5
6
# this is <Makefile>
# ----------------------------------------------------------------------------
# 
# Copyright (c) 2011 by Thomas Forbriger (BFO Schiltach) 
# 
# test cases for waveform filters
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#
# ----
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. 
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
# ----
#
thomas.forbriger's avatar
thomas.forbriger committed
24
25
26
# 
# REVISIONS and CHANGES 
#    09/06/2011   V1.0   Thomas Forbriger
27
28
#    30/09/2011   V1.1   added soutifu test for the convolution of additional
#                        time series
thomas.forbriger's avatar
thomas.forbriger committed
29
30
31
32
33
34
# 
# ============================================================================
#

all:

35
TESTCASEMAKE=$(filter-out %.bak,$(wildcard Makefile*))
36
READMEFILES=$(filter-out %.bak,$(wildcard README*))
37
38
flist: $(TESTCASEMAKE) $(READMEFILES) $(wildcard *.par) $(wildcard *.tpl) \
  $(wildcard *.gpt)
39
40
41
42
43
44
	echo $(TESTCASEMAKE) | tr ' ' '\n' | sort > $@
	echo '----' >> $@
	echo $(filter-out $(TESTCASEMAKE) $(READMEFILES),$^) \
	  | tr ' ' '\n' | sort >> $@
	echo '----' >> $@
	echo $(READMEFILES) | tr ' ' '\n' | sort >> $@
thomas.forbriger's avatar
thomas.forbriger committed
45
46
47
48
49
50
51

.PHONY: edit
edit: flist; vim $<

.PHONY: clean
clean: ; 
	-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
52
	-/bin/rm -vf flist *.xxx *.xxx.* *.sff *.TZ *.TR *.grn *.su *.bin
53
	-/bin/rm -vf *.ps *.pdf *.asc *.ascii 
54
55

#----------------------------------------------------------------------
thomas.forbriger's avatar
thomas.forbriger committed
56

57
58
# test cases for soutifu
soutifu%: Makefile.soutifu ; $(MAKE) -f $< $@
thomas.forbriger's avatar
thomas.forbriger committed
59

60
# soutifu test cases
61
SOUTIFUCASES=1 1_add 2a 2b 2c 3a 3b 3c
62
63
64
65
SOUTIFURESULTS=$(addprefix soutifu,$(addsuffix _report,$(SOUTIFUCASES)))
soutifutests: 
	$(MAKE) clean
	/bin/rm -fv soutifu* 
66
	$(MAKE) $(addsuffix .pdf,$(SOUTIFURESULTS)) 
67

68
#----------------------------------------------------------------------
thomas.forbriger's avatar
thomas.forbriger committed
69

70
71
72
73
# test cases for foutra
noise.xxx.ps: Makefile.foutra 
	/bin/rm -fv noise.xxx.*
	$(MAKE) -f $< $@ 
74
75
76
noise.sig.xxx.ps: Makefile.foutra 
	/bin/rm -fv noise.xxx.*
	$(MAKE) -f $< $@ 
77
78
79
80
81
82
83
84
85
86
87
88
89
90
harmspec.xxx.ps: Makefile.foutra 
	/bin/rm -fv sine?.xxx.sff
	$(MAKE) -f $< $@ 

#----------------------------------------------------------------------

# test cases for filter programs
# e.g.: filter.sig.lp2.ps
filter.%.ps: Makefile.filters
	/bin/rm -fv *.xxx.fil *.xxx.rules
	$(MAKE) -f $< $@ 

#----------------------------------------------------------------------

91
92
93
94
95
96
97
# test autocorr
autocorr.ps: Makefile.autocorr
	/bin/rm -fv *.sff
	$(MAKE) -f $< $@ 

#----------------------------------------------------------------------

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
# test deconvolution
# % should be replaced by trace number for tesiff trace
# e.g.: deco1.ps
deco%.ps: Makefile.deconv
	/bin/rm -fv *.xxx.fil *.xxx.rules
	$(MAKE) -f $< $@ 
codeco%.ps: Makefile.deconv
	/bin/rm -fv *.xxx.fil *.xxx.rules
	$(MAKE) -f $< $@ 

#----------------------------------------------------------------------

# test phasedsignals
# % should be replaced 0, m, or r (argument to parameter -p)
phasetest%.ps: Makefile.phasedsignals
	$(MAKE) -f $< $@ 
Pphasetest%.ps: Makefile.phasedsignals
	$(MAKE) -f $< $@ 

#----------------------------------------------------------------------

# test teseco
#
# tragets are
#
# t1_sig.xxx.ps
# t1_teseco1.xxx.ps 
# t1_teseco2.xxx.ps
#
t1_%.ps: Makefile.teseco
	$(MAKE) -f $< $@ 

#----------------------------------------------------------------------

# test resaseda
rsa.ps: Makefile.resaseda
	$(MAKE) -f $< $@ 

#----------------------------------------------------------------------

138
139
140
141
142
143
# test convolution
convolution%.ps: Makefile.convolution
	$(MAKE) -f $< $@ 

#----------------------------------------------------------------------

144
145
146
147
148
149
# test cross-correlation
cross%.ps: Makefile.crosscorrelation
	$(MAKE) -f $< $@ 

#----------------------------------------------------------------------

150
151
152
153
154
155
156
157
%.psp: %.ps; gv $<; /bin/rm -fv $<
%.pdf: %.ps; ps2pdf $<
%.rw.ps: %.ps; gs -sDEVICE=pswrite -dNOPAUSE -dBATCH -sOutputFile=$@ $< 
%.fix.ps: %.ps; fixps $< > $@
%.2up.ps: %.ps; psnup -r -l -2 -Pa4 -pa4 $< > $@
%.rs.ps: %.ps; psresize -Pa4 -pa5 $< > $@
%.pngp: %.png; xv $<; /bin/rm -fv $<
	 
thomas.forbriger's avatar
thomas.forbriger committed
158
# ----- END OF Makefile -----