summaryrefslogtreecommitdiff
path: root/xmds2/realistic_Rb/Makefile.pp
blob: e24107eb5656dfd13706d7bc60ebf51c6f0b8995 (plain)
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
###  -*- make -*-
### This makefile can be used to build and run the XMDS examples


GNUPLOT_FILES = $(wildcard *.gp)
XSIL_FILES = $(wildcard *.xsil)
RUN_FILES = $(patsubst %.xsil,%.run,$(XSIL_FILES))
M_FILES = $(patsubst %.xsil,%.m,$(XSIL_FILES))

SCRIPTS_DIR = ..

XSIL2GRAPHICS = xsil2graphics

include $(PARAMS_FILE)

all: $(XSIL_FILES)  $(M_FILES) plot fig

$(XSIL_FILES): ../$(RUN_FILES) $(PARAMS_FILE)
	$< $(PARAMS) | grep "Time elapsed for simulation is:" > exact_analysis_execution_time.txt

%.m: %.xsil
	$(XSIL2GRAPHICS) $<

fig: pp_I2.stamp
	$(MAKE) -f $(SCRIPTS_DIR)/Makefile.fig $@


pretty_plots: pp_I2.stamp $(GNUPLOT_FILES)
	gnuplot $(SCRIPTS_DIR)/plot_fields_propagation_I2.gp
	gnuplot $(SCRIPTS_DIR)/plot_fields_propagation_I4.gp

plot: pp_I2.stamp

pp_I2.stamp: $(XSIL_FILES) $(M_FILES)
	octave -q $(SCRIPTS_DIR)/pp_I2.m

clean:
	rm -f pp_I2.stamp
	$(MAKE) -f $(SCRIPTS_DIR)/Makefile.fig $@

real_clean: clean
	rm -f $(M_FILES) $(XSIL_FILES) *.dat octave-core 
	$(MAKE) -f $(SCRIPTS_DIR)/Makefile.fig $@
	rm -f exact_analysis_execution_time.txt

.PRECIOUS: %.run %.xsil %.m
.PHONY: all clean