X-Git-Url: https://git.llucax.com/software/dgc/dgcbench.git/blobdiff_plain/6ee846e21a5582b23566dee8214629b12ee6cf13..37dd82c0a3363318958cd62cfdad2c73cc56338a:/micro/Makefile diff --git a/micro/Makefile b/micro/Makefile index 322c748..ddbbac7 100644 --- a/micro/Makefile +++ b/micro/Makefile @@ -27,10 +27,9 @@ ifndef V P = @ P_DC = @echo ' DC $@'; P_LD = @echo ' LD $@'; -P_CP = @echo ' CP $@'; P_PLOT = @echo ' PLOT $@'; P_MAKE = @echo ' MAKE $@'; -P_RUN = @echo ' RUN $<'; +P_RUN = @echo ' RUN $< $(arg1) $(arg2) $(arg3)'; P_AWK = @echo ' AWK $@'; endif @@ -57,7 +56,6 @@ build: $(programs) $(BIN_DIR)/%: $(BIN_DIR)/%.o $(P_LD) $(DC) $(DFLAGS) -of$@ $^ -.INTERMEDIATE: $(BIN_DIR)/%.o $(BIN_DIR)/%.o: %.d $(P_DC) $(DC) $(DFLAGS) -c -of$@ $< @@ -66,19 +64,16 @@ 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 -$(STAT_DIR)/split.c.csv $(STAT_DIR)/split.a.csv: $(BIN_DIR)/bible.txt - -$(BIN_DIR)/bible.txt: bible.txt - $(P_CP) cp -l $< $@ +# 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)