6 DFLAGS += -release -inline -O
7 DFLAGS += -defaultlib=tango-base-dmd-$(VERS) -debuglib=tango-base-dmd-$(VERS) \
8 -L-ltango-user-dmd-$(VERS)
11 BIN_DIR := $(BUILD_DIR)/bin
12 PLOT_DIR := $(BUILD_DIR)/plot
14 sources := $(wildcard *.d)
15 programs := $(addprefix $(BIN_DIR)/,$(sources:.d=))
16 graphs_c := $(addprefix $(PLOT_DIR)/,$(addsuffix .c.eps,$(sources:.d=)))
21 P_DC = @echo ' DC $@';
22 P_LD = @echo ' LD $@';
23 P_CP = @echo ' CP $@';
24 P_PLOT = @echo ' PLOT $@';
25 P_MAKE = @echo ' MAKE $@';
26 P_RUN = @echo ' RUN $<';
29 # create build directories if they don't already exist
30 ifneq ($(wildcard $(BIN_DIR) $(PLOT_DIR)),$(BIN_DIR) $(PLOT_DIR))
31 dummy_mkdir := $(shell mkdir -p $(BIN_DIR) $(PLOT_DIR))
34 # don't use Gold with old DMDs
35 ifneq ($(shell ld --version | grep gold),)
36 export LD_ := /usr/bin/ld.single
44 $(P_MAKE) $(MAKE) --no-print-directory build VERS=$@
49 $(BIN_DIR)/%: $(BIN_DIR)/%.o
50 $(P_LD) $(DC) $(DFLAGS) -of$@ $^
52 .INTERMEDIATE: $(BIN_DIR)/%.o
54 $(P_DC) $(DC) $(DFLAGS) -c -of$@ $<
59 $(PLOT_DIR)/%.c.eps: $(PLOT_DIR)/%.c.csv plot-c.gpi
61 sed 's|@@PRG@@|$(*F)|g; s|@@COL@@|$(VERS)|g; s|@@IN@@|$<|g; s|@@OUT@@|$@|g' \
62 $(word 2,$^) | $(GNUPLOT)
64 .PRECIOUS: $(PLOT_DIR)/%.c.csv $(PLOT_DIR)/%.a.csv
65 $(PLOT_DIR)/%.c.csv $(PLOT_DIR)/%.a.csv: $(BIN_DIR)/%
67 $P mv gc-collections.csv $(PLOT_DIR)/$*.c.csv
68 $P mv gc-mallocs.csv $(PLOT_DIR)/$*.a.csv
70 $(PLOT_DIR)/split.c.csv $(PLOT_DIR)/split.a.csv: $(BIN_DIR)/bible.txt
72 $(BIN_DIR)/bible.txt: bible.txt