-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
58 lines (39 loc) · 1.45 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
all: test examples
DOCOPTLIB = libdocopt.a
DMDLINK = -Isource -L$(DOCOPTLIB)
DFLAGS = -debug
$(DOCOPTLIB): source/*.d
dmd -lib -oflibdocopt.a source/*.d
test/test_docopt: $(DOCOPTLIB)
dmd $(DFLAGS) test/test_docopt.d -oftest/test_docopt $(DMDLINK)
test: test/test_docopt
dub test
./test/test_docopt test/testcases.docopt
examples: arguments
arguments: examples/arguments/source/arguments.d $(DOPOPTLIB)
dmd $(DFLAGS) examples/arguments/source/arguments.d -op $(DMDLINK)
git: gitD git_add git_branch git_checkout git_clone git_commit git_push git_remote
gitD: examples/git/gitD.d $(DOCOPTLIB)
dmd $(DFLAGS) $< -op $(DMDLINK)
git_add: examples/git/git_add.d $(DOCOPTLIB)
dmd $(DFLAGS) $< -op $(DMDLINK)
git_branch: examples/git/git_branch.d $(DOCOPTLIB)
dmd $(DFLAGS) $< -op $(DMDLINK)
git_checkout: examples/git/git_checkout.d $(DOCOPTLIB)
dmd $(DFLAGS) $< -op $(DMDLINK)
git_clone: examples/git/git_clone.d $(DOCOPTLIB)
dmd $(DFLAGS) $< -op $(DMDLINK)
git_commit: examples/git/git_commit.d $(DOCOPTLIB)
dmd $(DFLAGS) $< -op $(DMDLINK)
git_push: examples/git/git_push.d $(DOCOPTLIB)
dmd $(DFLAGS) $< -op $(DMDLINK)
git_remote: examples/git/git_remote.d $(DOCOPTLIB)
dmd $(DFLAGS) $< -op $(DMDLINK)
clean:
@rm -rf test/test_docopt test/test_docopt.o
@rm -rf lib*a
@rm -rf __test__library__
@rm -rf arguments
@rm -rf gitD git_add git_branch git_checkout git_clone git_commit git_push git_remote
@find . -name "*.o" -exec rm {} \;
.PHONY: git test