Skip to content
Browse files

build into src as well

  • Loading branch information...
1 parent ff01fc2 commit 561e939fe2eb34d07d9108dd58bcd826a82aeb47 @disnet disnet committed Jul 16, 2012
Showing with 12 additions and 2 deletions.
  1. +12 −2 Makefile
View
14 Makefile
@@ -9,18 +9,20 @@ benchdir = benchmarks
build_node = build/node
build_sm = build/sm
+
js_files = memory.js memcheck.js test-memcheck.js \
access-nbody.js access-nbody-memcheck.js \
linked-list.js linked-list-memcheck.js
+mainfiles = $(addprefix $(srcdir)/, memory.js memcheck.js)
nodefiles := $(addprefix $(build_node)/, $(js_files))
smfiles := $(addprefix $(build_sm)/, $(js_files))
-.PHONY: all test clean node sm bench
+.PHONY: all test clean node sm bench main
-all: node sm test bench
+all: main node sm test bench
test: node sm
@echo "======================"
@@ -52,9 +54,17 @@ bench: node sm
@echo "\n== linked list (memcheck) =="
(cd $(build_sm) && js -n -m linked-list-memcheck.js)
+main: $(mainfiles)
node: $(nodefiles)
sm: $(smfiles)
+# main
+$(srcdir)/memory.js: $(srcdir)/memory.ljs
+ $(LJC) $(ND_FLAGS) -o $@ $<
+
+$(srcdir)/memcheck.js: $(srcdir)/memcheck.ljs
+ $(LJC) $(ND_FLAGS) -o $@ $<
+
# node
$(build_node)/memory.js: $(srcdir)/memory.ljs
$(LJC) $(ND_FLAGS) -o $@ $<

0 comments on commit 561e939

Please sign in to comment.
Something went wrong with that request. Please try again.