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