aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2010-10-13 23:16:09 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2010-10-13 23:16:09 +0200
commit0196ed8c6112d1695493e3fe8e16f4c25e838fff (patch)
tree29c96f6c40feb99636aec37c7bfdeab9c612f494
parent398ee976066c88df5d7cd38086c021faa479614d (diff)
downloaderlang-0196ed8c6112d1695493e3fe8e16f4c25e838fff.tar.gz
erlang-0196ed8c6112d1695493e3fe8e16f4c25e838fff.tar.xz
erlang-0196ed8c6112d1695493e3fe8e16f4c25e838fff.zip
new global makefile
make targets: client server all = client and server clean
-rw-r--r--Makefile23
-rw-r--r--client/Makefile16
-rw-r--r--server/Makefile16
3 files changed, 23 insertions, 32 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 $@) $<
diff --git a/client/Makefile b/client/Makefile
deleted file mode 100644
index f447307..0000000
--- a/client/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-SRC=$(wildcard *.erl)
-BIN=$(SRC:.erl=.beam)
-
-.PHONY: all clean
-
-#######################
-
-all: $(BIN)
-
-%.beam: %.erl
- erlc $<
-
-#######################
-
-clean:
- -$(RM) $(BIN)
diff --git a/server/Makefile b/server/Makefile
deleted file mode 100644
index f447307..0000000
--- a/server/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-SRC=$(wildcard *.erl)
-BIN=$(SRC:.erl=.beam)
-
-.PHONY: all clean
-
-#######################
-
-all: $(BIN)
-
-%.beam: %.erl
- erlc $<
-
-#######################
-
-clean:
- -$(RM) $(BIN)