aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c309692
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+CLIENT-SRC=$(wildcard client/*.erl)
+CLIENT-BIN=$(CLIENT-SRC:.erl=.beam)
+
+SERVER-SRC=$(wildcard server/*.erl)
+SERVER-BIN=$(SERVER-SRC:.erl=.beam)
+
+COMMON-SRC=$(wildcard common/*.erl)
+COMMON-BIN=$(COMMON-SRC:.erl=.beam)
+
+
+.PHONY: all client server clean
+
+all: client server
+
+clean:
+ -$(RM) $(CLIENT-BIN) $(SERVER-BIN) $(COMMON-BIN)
+
+client: $(CLIENT-BIN) $(COMMON-BIN)
+
+server: $(SERVER-BIN) $(COMMON-BIN)
+
+%.beam: %.erl
+ erlc -o $(dir $@) $<