VERS := naive
DC := dmd
DL := dmd
+LN := ln
GNUPLOT := gnuplot
+DFLAGS += -g -release -inline -O
+#DFLAGS := -gc
DFLAGS += -defaultlib=tango-base-dmd-$(VERS) -debuglib=tango-base-dmd-$(VERS)
-DFLAGS += -release -inline -O
O := $(VERS)
P_RUN = @printf ' RUN $< $(args)\n';
P_MAKE = @printf ' MAKE $@\n';
P_RM = @printf ' RM $^\n';
+P_LN = @printf ' LN %- 40s <- %s\n' '$@' '$<';
endif
# create build directories if they don't already exist
endif
# don't use Gold with old DMDs
+ifeq ($(subst dmd,,$(DC)),)
ifneq ($(strip $(shell ld --version | grep gold)),)
export LD_ := /usr/bin/ld.single
endif
+endif
.PHONY: all
all: naive
.PHONY: naive basic
naive basic:
- $(P_MAKE) $(MAKE) --no-print-directory micro VERS=$@
+ $(P_MAKE) $(MAKE) --no-print-directory micro dil VERS=$@
# micro
$O/micro/split.c.csv $O/micro/split.a.csv: override args := micro/bible.txt
+# dil
+######
+
+.PHONY: dil
+dil: $O/dil_nop.eps
+
+$O/dil: $(wildcard dil/src/*.d dil/src/cmd/*.d dil/src/util/*.d \
+ dil/src/dil/*.d dil/src/dil/*/*.d)
+ $(P_DC) $(DC) $(DFLAGS) -L-lmpfr -Idil/src -of$@ $^
+
+$O/dil_nop: $O/dil
+ @$(P_LN) $(LN) -sf $(<F) $@
+
+
# common rules
###############