Permalink
Browse files

First version of Makefile.

  • Loading branch information...
1 parent 717e0ef commit 95eee0a5666bd76acee282eeb33d0d7f40b3cd36 @klajo committed Nov 10, 2009
Showing with 62 additions and 0 deletions.
  1. +31 −0 beam/Makefile
  2. +31 −0 stem/Makefile
View
@@ -0,0 +1,31 @@
+SRC_FILES=$(wildcard src/*.erl)
+BEAM_FILES=$(SRC_FILES:src/%.erl=ebin/%.beam)
+
+TEST_SRC_FILES=$(wildcard test/*.erl)
+TEST_BEAM_FILES=$(TEST_SRC_FILES:test/%.erl=test/%.beam)
+
+all: ebin $(BEAM_FILES)
+
+test: all $(TEST_BEAM_FILES)
+ @erl -pa ebin \
+ -pa test \
+ -noinput \
+ -boot start_clean \
+ -eval 'eunit:test("test", [verbose]).' \
+ -s init stop
+
+ebin:
+ mkdir ebin
+
+ebin/%.beam: src/%.erl
+ erlc -o ebin $<
+
+test/%.beam: test/%.erl
+ erlc -o test $<
+
+clean:
+ @rm -f $(BEAM_FILES) $(TEST_BEAM_FILES)
+
+
+
+
View
@@ -0,0 +1,31 @@
+SRC_FILES=$(wildcard src/*.erl)
+BEAM_FILES=$(SRC_FILES:src/%.erl=ebin/%.beam)
+
+TEST_SRC_FILES=$(wildcard test/*.erl)
+TEST_BEAM_FILES=$(TEST_SRC_FILES:test/%.erl=test/%.beam)
+
+all: ebin $(BEAM_FILES)
+
+test: all $(TEST_BEAM_FILES)
+ @erl -pa ebin \
+ -pa test \
+ -noinput \
+ -boot start_clean \
+ -eval 'eunit:test("test", [verbose]).' \
+ -s init stop
+
+ebin:
+ mkdir ebin
+
+ebin/%.beam: src/%.erl
+ erlc -o ebin $<
+
+test/%.beam: test/%.erl
+ erlc -o test $<
+
+clean:
+ @rm -f $(BEAM_FILES) $(TEST_BEAM_FILES)
+
+
+
+

0 comments on commit 95eee0a

Please sign in to comment.