forked from Manuzor/pathlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (27 loc) · 779 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
OUTDIR = output
DFLAGS += -m64
DFLAGS += -gc
DFLAGS += -w
DFLAGS += -debug
DFLAGS += -gs
PATHLIB_CODEDIR = $(CUR_MAKEFILEDIR)code
PATHLIB_DFILES = $(shell find code -name '*.d')
default: all
all: lib tests
.PHONY: clean
clean:
rm -rf $(OUTDIR)
runtests: tests
$(OUTDIR)/pathlibtests.exe
lib: $(OUTDIR)/pathlib.lib
$(OUTDIR)/pathlib.lib: $(PATHLIB_DFILES)
$(eval LIB_DFLAGS = $(DFLAGS))
$(eval LIB_DFLAGS += -lib)
dmd $(PATHLIB_DFILES) $(LIB_DFLAGS) -of$(OUTDIR)/pathlib.lib
tests: $(OUTDIR)/pathlibtests.exe
$(OUTDIR)/pathlibtests.exe: $(PATHLIB_DFILES)
$(eval TESTS_DFLAGS = $(DFLAGS))
$(eval TESTS_DFLAGS += -unittest)
$(eval TESTS_DFLAGS += -main)
$(eval TESTS_DFLAGS += -od$(OUTDIR))
dmd $(PATHLIB_DFILES) $(TESTS_DFLAGS) -of$(OUTDIR)/pathlibtests.exe