diff options
-rw-r--r-- | Makefile | 23 | ||||
-rw-r--r-- | client/Makefile | 16 | ||||
-rw-r--r-- | server/Makefile | 16 |
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) |