-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (40 loc) · 1.08 KB
/
Makefile
File metadata and controls
55 lines (40 loc) · 1.08 KB
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
VERSION = 1.1.0
SOURCES = $(addprefix source/xebin/,flashpack.d binary.d disasm.d vm.d xasm.d) \
source/app.d
ASCIIDOC = asciidoc -o $@ -a doctime
ASCIIDOC_POSTPROCESS =
ZIP = 7z a -mx=9 -tzip $@
RM = rm -f
PREFIX = /usr/local
all:
dub build -b release
doc: xebin.html
dist: windist srcdist
windist: xebin-$(VERSION)-windows.zip
srcdist: xebin-$(VERSION)-src.zip
debug:
dub build
xebin.html: README.asciidoc
$(ASCIIDOC) $<
$(ASCIIDOC_POSTPROCESS)
# $(ASCIIDOC_VALIDATE)
xebin-$(VERSION)-windows.zip: xebin.exe xebin.html
$(RM) $@
$(ZIP) $^
xebin-$(VERSION)-src.zip: xebin-$(VERSION)
$(RM) $@
$(ZIP) $<
xebin-$(VERSION): $(SOURCES) README.asciidoc
$(RM) -r $@
( mkdir xebin-$(VERSION) && cp $^ Makefile xebin-$(VERSION) )
clean:
$(RM) xebin xebin.exe xebin.o $(SOURCES:.d=.obj) $(SOURCES:.d=.map)
$(RM) xebin.html xebin-$(VERSION)-windows.zip xebin-$(VERSION)-src.zip
$(RM) -r xebin-$(VERSION)
$(RM) xebin-test-library
install:
mkdir -p $(PREFIX)/bin && cp xebin $(PREFIX)/bin/
test:
dub test
.PHONY: all doc debug dist windist srcdist clean install test
.DELETE_ON_ERROR: