### -*- 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) echo $< $(PARAMS) > calc.sh sh ./calc.sh > report.txt cat report.txt | 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