summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2016-04-26 00:19:59 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2016-04-27 11:12:39 -0400
commit00eaf6c5d0f7d0a6deb68571e2999e7867ccf299 (patch)
tree63afca81150fa13857151360ebf4d8be05cd9aa9
parentea87abdd2da5a8abb8dcacd71847c459b360a4f4 (diff)
downloadnoisy_eit_xmds-00eaf6c5d0f7d0a6deb68571e2999e7867ccf299.tar.gz
noisy_eit_xmds-00eaf6c5d0f7d0a6deb68571e2999e7867ccf299.zip
added Makefile
-rw-r--r--Makefile55
1 files changed, 55 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..ade8cb0
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,55 @@
+### -*- make -*-
+### This file is part of the Debian xmds package
+### Copyright (C) 2006 Rafael Laboissiere
+### This file is relased under the GNU General Public License
+### NO WARRANTIES!
+
+### This makefile can be used to build and run the XMDS examples
+
+XMDS_FILES = $(shell ls *.xmds)
+RUN_FILES = $(patsubst %.xmds,%.run,$(XMDS_FILES))
+CC_FILES = $(patsubst %.xmds,%.cc,$(XMDS_FILES))
+XSIL_FILES = $(patsubst %.xmds,%.xsil,$(XMDS_FILES))
+M_FILES = $(patsubst %.xmds,%.m,$(XMDS_FILES))
+
+XMDS = xmds2
+XSIL2GRAPHICS = xsil2graphics2
+
+all: $(RUN_FILES)
+
+%.run: %.xmds
+ $(XMDS) $<
+ mv $(patsubst %.xmds,%,$<) $@
+
+%.xsil: %.run
+ ./$< --E1o=0 --E3o=0
+
+%.m: %.xsil
+ $(XSIL2GRAPHICS) $<
+
+plot: $(M_FILES)
+ octave pp.m
+
+clean:
+ rm -f $(CC_FILES) $(RUN_FILES) $(M_FILES) $(XSIL_FILES) *.wisdom.fftw3 *.dat octave-core *.wisdom *.pdf
+ rm -f $(png_targets)
+ rm -f $(eps_targets)
+
+eps_targets = $(wildcard *.eps)
+pdf_targets = $(eps_targets:%.eps=%.pdf)
+png_targets = $(pdf_targets:%.pdf=%.png)
+
+png: pdf $(png_targets)
+
+$(png_targets): %.png : %.pdf
+ convert -density 300 $< $@
+
+pdf: $(pdf_targets)
+
+$(pdf_targets): %.pdf : %.eps
+ cat $< | ps2eps -B > __tt.eps
+ epspdf __tt.eps $@
+ rm -f __tt.eps
+ #ps2eps -B $< | epspdf $< $@
+.PRECIOUS: %.run %.xsil %.m
+.PHONY: all clean