Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 114 lines (84 sloc) 3.372 kb
edf6dd9 @disnet redoing makefile
disnet authored
1 LJC = bin/ljc
2 ND_FLAGS = -0
3 SM_FLAGS = -0 -l
40461cf @disnet adding basic memory checker
disnet authored
4
edf6dd9 @disnet redoing makefile
disnet authored
5 srcdir = src
6 testdir = src/tests
7 benchdir = benchmarks
8
9 build_node = build/node
10 build_sm = build/sm
11
561e939 @disnet build into src as well
disnet authored
12
edf6dd9 @disnet redoing makefile
disnet authored
13 js_files = memory.js memcheck.js test-memcheck.js \
c716802 @disnet cleaning build
disnet authored
14 access-nbody.js access-nbody-memcheck.js \
15 linked-list.js linked-list-memcheck.js
edf6dd9 @disnet redoing makefile
disnet authored
16
561e939 @disnet build into src as well
disnet authored
17 mainfiles = $(addprefix $(srcdir)/, memory.js memcheck.js)
edf6dd9 @disnet redoing makefile
disnet authored
18 nodefiles := $(addprefix $(build_node)/, $(js_files))
19 smfiles := $(addprefix $(build_sm)/, $(js_files))
20
21
22
561e939 @disnet build into src as well
disnet authored
23 .PHONY: all test clean node sm bench main
edf6dd9 @disnet redoing makefile
disnet authored
24
561e939 @disnet build into src as well
disnet authored
25 all: main node sm test bench
edf6dd9 @disnet redoing makefile
disnet authored
26
27 test: node sm
28 @echo "======================"
29 @echo "Running node tests..."
5b22de9 @disnet fixing double shift bug
disnet authored
30 (export NODE_PATH="$(build_node):$$NODE_PATH" && node --harmony_proxies $(build_node)/test-memcheck.js)
edf6dd9 @disnet redoing makefile
disnet authored
31 @echo "======================"
32 @echo "Running spidermonkey tests..."
33 (cd $(build_sm) && js -n -m test-memcheck.js)
34
35 bench: node sm
36 @echo "======================"
c716802 @disnet cleaning build
disnet authored
37 @echo "Running node benchmarks..."
38 @echo "== nbody =="
39 (export NODE_PATH="$(build_node):$$NODE_PATH" && node --harmony_proxies $(build_node)/access-nbody.js)
40 @echo "\n== nbody (memcheck) =="
41 (export NODE_PATH="$(build_node):$$NODE_PATH" && node --harmony_proxies $(build_node)/access-nbody-memcheck.js)
42 @echo "\n== linked list =="
43 (export NODE_PATH="$(build_node):$$NODE_PATH" && node --harmony_proxies $(build_node)/linked-list.js)
44 @echo "\n== linked list (memcheck) =="
45 (export NODE_PATH="$(build_node):$$NODE_PATH" && node --harmony_proxies $(build_node)/linked-list-memcheck.js)
46 @echo "======================"
47 @echo "Running spdiermonkey benchmarks..."
edf6dd9 @disnet redoing makefile
disnet authored
48 @echo "== nbody =="
49 (cd $(build_sm) && js -n -m access-nbody.js)
50 @echo "\n== nbody (memcheck) =="
51 (cd $(build_sm) && js -n -m access-nbody-memcheck.js)
52 @echo "\n== linked list =="
53 (cd $(build_sm) && js -n -m linked-list.js)
54 @echo "\n== linked list (memcheck) =="
55 (cd $(build_sm) && js -n -m linked-list-memcheck.js)
56
561e939 @disnet build into src as well
disnet authored
57 main: $(mainfiles)
edf6dd9 @disnet redoing makefile
disnet authored
58 node: $(nodefiles)
59 sm: $(smfiles)
60
561e939 @disnet build into src as well
disnet authored
61 # main
62 $(srcdir)/memory.js: $(srcdir)/memory.ljs
63 $(LJC) $(ND_FLAGS) -o $@ $<
64
65 $(srcdir)/memcheck.js: $(srcdir)/memcheck.ljs
66 $(LJC) $(ND_FLAGS) -o $@ $<
67
edf6dd9 @disnet redoing makefile
disnet authored
68 # node
69 $(build_node)/memory.js: $(srcdir)/memory.ljs
70 $(LJC) $(ND_FLAGS) -o $@ $<
71
72 $(build_node)/memcheck.js: $(srcdir)/memcheck.ljs
73 $(LJC) $(ND_FLAGS) -o $@ $<
74
75 $(build_node)/test-memcheck.js: $(testdir)/test-memcheck.ljs
76 $(LJC) $(ND_FLAGS) -m -o $@ $<
77
78 # benchmarks
79 $(build_node)/access-nbody.js: $(benchdir)/access-nbody.ljs
80 $(LJC) $(ND_FLAGS) -o $@ $<
81
82 $(build_node)/linked-list.js: $(benchdir)/linked-list.ljs
83 $(LJC) $(ND_FLAGS) -o $@ $<
84
85 $(build_node)/access-nbody-memcheck.js: $(benchdir)/access-nbody.ljs
86 $(LJC) $(ND_FLAGS) -m -o $@ $<
87
c716802 @disnet cleaning build
disnet authored
88 $(build_node)/linked-list-memcheck.js: $(benchdir)/linked-list.ljs
edf6dd9 @disnet redoing makefile
disnet authored
89 $(LJC) $(ND_FLAGS) -m -o $@ $<
90
91
92 # spidermonkey
93 $(build_sm)/memory.js: $(srcdir)/memory.ljs
94 $(LJC) $(SM_FLAGS) -o $@ $<
95
96 $(build_sm)/memcheck.js: $(srcdir)/memcheck.ljs
97 $(LJC) $(SM_FLAGS) -o $@ $<
98
99 $(build_sm)/test-memcheck.js: $(testdir)/test-memcheck.ljs
100 $(LJC) $(SM_FLAGS) -m -o $@ $<
101
102 # benchmarks
103 $(build_sm)/access-nbody.js: $(benchdir)/access-nbody.ljs
104 $(LJC) $(SM_FLAGS) -o $@ $<
105
106 $(build_sm)/linked-list.js: $(benchdir)/linked-list.ljs
107 $(LJC) $(SM_FLAGS) -o $@ $<
108
109 $(build_sm)/access-nbody-memcheck.js: $(benchdir)/access-nbody.ljs
110 $(LJC) $(SM_FLAGS) -m -o $@ $<
111
c716802 @disnet cleaning build
disnet authored
112 $(build_sm)/linked-list-memcheck.js: $(benchdir)/linked-list.ljs
edf6dd9 @disnet redoing makefile
disnet authored
113 $(LJC) $(SM_FLAGS) -m -o $@ $<
Something went wrong with that request. Please try again.