forked from wren-lang/wren
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
77 lines (61 loc) · 2.26 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Top-level Makefile. This has targets for various utility things. To actually
# compile Wren itself, it invokes util/wren.mk for the various configurations
# that Wren can be built with.
# Executables are built to bin/. Libraries are built to lib/.
# A normal, optimized release build for the current CPU architecture.
release:
@ $(MAKE) -f util/wren.mk
@ cp bin/wren wren # For convenience, copy the interpreter to the top level.
# A debug build for the current architecture.
debug:
@ $(MAKE) -f util/wren.mk MODE=debug
# A release build of just the VM, both shared and static libraries.
vm:
@ $(MAKE) -f util/wren.mk vm
# A release build of the shared library for the VM.
shared:
@ $(MAKE) -f util/wren.mk shared
# A release build of the shared library for the VM.
static:
@ $(MAKE) -f util/wren.mk static
# Build all configurations.
all: debug release
@ $(MAKE) -f util/wren.mk LANG=cpp
@ $(MAKE) -f util/wren.mk MODE=debug LANG=cpp
@ $(MAKE) -f util/wren.mk ARCH=32
@ $(MAKE) -f util/wren.mk LANG=cpp ARCH=32
@ $(MAKE) -f util/wren.mk MODE=debug ARCH=32
@ $(MAKE) -f util/wren.mk MODE=debug LANG=cpp ARCH=32
@ $(MAKE) -f util/wren.mk ARCH=64
@ $(MAKE) -f util/wren.mk LANG=cpp ARCH=64
@ $(MAKE) -f util/wren.mk MODE=debug ARCH=64
@ $(MAKE) -f util/wren.mk MODE=debug LANG=cpp ARCH=64
# Remove all build outputs and intermediate files. Does not remove downloaded
# dependencies. Use cleanall for that.
clean:
@ rm -rf bin
@ rm -rf build
@ rm -rf lib
# Remove all build outputs, intermediate files, and downloaded dependencies.
cleanall: clean
@ rm -rf deps
# Run the tests against the debug build of Wren.
test: debug
@ $(MAKE) -f util/wren.mk MODE=debug test
@ ./util/test.py $(suite)
benchmark: release
@ $(MAKE) -f util/wren.mk test
@ ./util/benchmark.py -l wren $(suite)
# Generate the Wren site.
docs:
@ ./util/generate_docs.py
# Continuously generate the Wren site.
watchdocs:
@ ./util/generate_docs.py --watch
# Build the docs and copy them to a local "gh-pages" directory.
gh-pages: docs
@ cp -r build/docs/. build/gh-pages
# Build amalgamation of all Wren library files.
amalgamation: src/include/wren.h src/vm/*.h src/vm/*.c
./util/generate_amalgamation.py > build/wren.c
.PHONY: all amalgamation builtin clean debug docs gh-pages release test vm watchdocs