X-Git-Url: https://git.llucax.com/software/dgc/dgcbench.git/blobdiff_plain/5b0d31198806563101200a3b5d435b1ddd6c2dbd..ae114983db8b75954cdc27c2d97c72c2a9e720f9:/micro/Makefile diff --git a/micro/Makefile b/micro/Makefile index ce310b0..48b7308 100644 --- a/micro/Makefile +++ b/micro/Makefile @@ -29,7 +29,7 @@ P_DC = @echo ' DC $@'; P_LD = @echo ' LD $@'; P_PLOT = @echo ' PLOT $@'; P_MAKE = @echo ' MAKE $@'; -P_RUN = @echo ' RUN $<'; +P_RUN = @echo ' RUN $< $(arg1) $(arg2) $(arg3)'; P_AWK = @echo ' AWK $@'; endif @@ -64,22 +64,30 @@ stat: $(stat) .PRECIOUS: $(STAT_DIR)/%.c.csv $(STAT_DIR)/%.a.csv $(STAT_DIR)/%.c.csv $(STAT_DIR)/%.a.csv: $(BIN_DIR)/% - $(P_RUN) ./$< + $(P_RUN) ./$< $(args) $P mv gc-collections.csv $(STAT_DIR)/$*.c.csv $P mv gc-mallocs.csv $(STAT_DIR)/$*.a.csv +# special command line arguments for benchmarks +$(STAT_DIR)/split.c.csv $(STAT_DIR)/split.a.csv: override args := bible.txt .PRECIOUS: $(STAT_DIR)/%.h.csv -$(STAT_DIR)/%.h.csv: $(STAT_DIR)/%.a.csv - $(P_AWK) awk -F, 'BEGIN { print "Size,Count" } NR > 1 { a[$$3]++ } \ - END { for (i in a) print i "," a[i] }' $< | sort > $@ +$(STAT_DIR)/%.h.csv: $(STAT_DIR)/%.a.csv hist.awk + $(P_AWK) awk -F, -f $(lastword $^) $< > $@ .PHONY: plot plot: $(graphs) -$(PLOT_DIR)/%.c.eps: $(STAT_DIR)/%.c.csv plot-c.gpi +.PRECIOUS: $(PLOT_DIR)/%.tics +$(PLOT_DIR)/%.tics: $(STAT_DIR)/%.h.csv tics.awk + $(P_AWK) awk -F, -f $(lastword $^) $< > $@ + +$(PLOT_DIR)/%.c.eps: $(STAT_DIR)/%.c.csv $(STAT_DIR)/%.a.csv \ + $(STAT_DIR)/%.h.csv $(PLOT_DIR)/%.tics plot-c.gpi $(P_PLOT) sed "s|@@PRG@@|$(*F)|g; s|@@COL@@|$(VERS)|g; \ - s|@@IN@@|$<|g; s|@@OUT@@|$@|g" $(lastword $^) \ + s|@@INC@@|$(word 1,$^)|g; s|@@INA@@|$(word 2,$^)|g; \ + s|@@INH@@|$(word 3,$^)|g; s|@@OUT@@|$@|g; \ + s|@@TICS@@|$(shell cat $(word 4,$^))|g" $(word 5,$^) \ | $(GNUPLOT) .PHONY: clean