diff options
Diffstat (limited to 'xmds2')
-rw-r--r-- | xmds2/Nlevels_with_doppler_with_z_4wm/Makefile.fig | 35 | ||||
-rw-r--r-- | xmds2/Nlevels_with_doppler_with_z_4wm/Makefile.par | 53 | ||||
-rw-r--r-- | xmds2/Nlevels_with_doppler_with_z_4wm/Makefile.pp | 31 |
3 files changed, 51 insertions, 68 deletions
diff --git a/xmds2/Nlevels_with_doppler_with_z_4wm/Makefile.fig b/xmds2/Nlevels_with_doppler_with_z_4wm/Makefile.fig new file mode 100644 index 0000000..d1d8ad1 --- /dev/null +++ b/xmds2/Nlevels_with_doppler_with_z_4wm/Makefile.fig @@ -0,0 +1,35 @@ +### -*- make -*- +### This makefile can be used to build and run the XMDS examples + +GNUPLOT_FILES = $(wildcard *.gp) + +SCRIPTS_DIR = . + + +eps_targets = $(wildcard *.eps) +pdf_targets = $(eps_targets:%.eps=%.pdf) +png_targets = $(pdf_targets:%.pdf=%.png) + +fig: pdf + +pdf: $(pdf_targets) + +$(pdf_targets): %.pdf : %.eps + @cat $< | ps2eps -q -B > __tt.eps + epspdf __tt.eps $@ + @rm -f __tt.eps + +png: pdf $(png_targets) + +$(png_targets): %.png : %.pdf + convert -density 300 $< $@ + +clean: + rm -f *.pdf + rm -f *.eps + +real_clean: clean + rm -f *.png + +.PRECIOUS: %.run %.xsil %.m +.PHONY: all clean diff --git a/xmds2/Nlevels_with_doppler_with_z_4wm/Makefile.par b/xmds2/Nlevels_with_doppler_with_z_4wm/Makefile.par index ad7b0b6..cc21c7b 100644 --- a/xmds2/Nlevels_with_doppler_with_z_4wm/Makefile.par +++ b/xmds2/Nlevels_with_doppler_with_z_4wm/Makefile.par @@ -6,14 +6,6 @@ ### This makefile can be used to build and run the XMDS examples -XMDS = xmds2 -XSIL2GRAPHICS = xsil2graphics - -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)) PARAMS_FILES = $(wildcard *.params) PP_DIR = $(PARAMS_FILES:%.params=%) @@ -23,51 +15,18 @@ default: $(CALC_XSIL_FILES) $(CALC_XSIL_FILES): %/data.xsil : % %.params echo processing $$(dirname $(@)) dir - $(MAKE) -C $$(dirname $(@)) -f ../Makefile.pp SCRIPTS_DIR=../ PARAMS_FILE=../$<.params + $(MAKE) -C $$(dirname $(@)) -f ../Makefile.pp SCRIPTS_DIR=../ PARAMS_FILE=../$<.params $(PP_DIR): % : %.params echo need to make dir [ -d $@ ] || mkdir -p $@ - - -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 $< $@ + for d in $(PP_DIR); \ + do $(MAKE) -C $$d SCRIPTS_DIR=../ -f ../Makefile.pp $@; done +real_clean: + for d in $(PP_DIR); \ + do $(MAKE) -C $$d SCRIPTS_DIR=../ -f ../Makefile.pp $@; done -.PRECIOUS: %.run %.xsil %.m .PHONY: all clean diff --git a/xmds2/Nlevels_with_doppler_with_z_4wm/Makefile.pp b/xmds2/Nlevels_with_doppler_with_z_4wm/Makefile.pp index 2225312..bca7f56 100644 --- a/xmds2/Nlevels_with_doppler_with_z_4wm/Makefile.pp +++ b/xmds2/Nlevels_with_doppler_with_z_4wm/Makefile.pp @@ -28,7 +28,7 @@ include $(PARAMS_FILE) # slow light EIT #PARAMS = --delta1=0 --delta2=0 --delta3=0 --E1o=1.9e7 --E2o=3.1e5 --E3o=0 --E4o=0 -all: $(XSIL_FILES) Nlevels_with_doppler_with_z_4wm.xsil $(M_FILES) plot png +all: $(XSIL_FILES) Nlevels_with_doppler_with_z_4wm.xsil $(M_FILES) plot fig Nlevels_with_doppler_with_z_4wm.xsil: ../Nlevels_with_doppler_with_z_4wm.run $(PARAMS_FILE) $< $(PARAMS) | grep "Time elapsed for simulation is:" > exact_analysis_execution_time.txt @@ -36,6 +36,10 @@ Nlevels_with_doppler_with_z_4wm.xsil: ../Nlevels_with_doppler_with_z_4wm.run $(P %.m: %.xsil $(XSIL2GRAPHICS) $< +fig: + $(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 @@ -46,28 +50,13 @@ pp_I2.stamp: $(XSIL_FILES) $(M_FILES) octave -q $(SCRIPTS_DIR)/pp_I2.m clean: - rm -f $(CC_FILES) $(RUN_FILES) $(M_FILES) $(XSIL_FILES) *.wisdom.fftw3 *.dat octave-core *.wisdom *.pdf - rm -f $(pdf_targets) - rm -f $(eps_targets) + rm -f $(M_FILES) $(XSIL_FILES) *.dat octave-core + rm -f pp_I2.stamp + $(MAKE) -f $(SCRIPTS_DIR)/Makefile.fig $@ real_clean: clean - rm -f $(png_targets) - -eps_targets = $(wildcard *.eps) -pdf_targets = $(eps_targets:%.eps=%.pdf) -png_targets = $(pdf_targets:%.pdf=%.png) - -pdf: $(pdf_targets) - -$(pdf_targets): %.pdf : %.eps - @cat $< | ps2eps -q -B > __tt.eps - epspdf __tt.eps $@ - @rm -f __tt.eps - -png: pdf $(png_targets) - -$(png_targets): %.png : %.pdf - convert -density 300 $< $@ + $(MAKE) -f $(SCRIPTS_DIR)/Makefile.fig $@ + rm -f exact_analysis_execution_time.txt .PRECIOUS: %.run %.xsil %.m .PHONY: all clean |