diff --git a/Emakefile b/Emakefile
deleted file mode 100644
index b081d9d..0000000
--- a/Emakefile
+++ /dev/null
@@ -1,31 +0,0 @@
-% EGS: Erlang Game Server
-% Copyright (C) 2010 Loic Hoguin
-%
-% This file is part of EGS.
-%
-% EGS is free software: you can redistribute it and/or modify
-% it under the terms of the GNU General Public License as published by
-% the Free Software Foundation, either version 3 of the License, or
-% (at your option) any later version.
-%
-% EGS is distributed in the hope that it will be useful,
-% but WITHOUT ANY WARRANTY; without even the implied warranty of
-% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-% GNU General Public License for more details.
-%
-% You should have received a copy of the GNU General Public License
-% along with EGS. If not, see .
-
-{'src/egs.erl', [{outdir, "ebin"}]}.
-{'src/egs_app.erl', [{outdir, "ebin"}]}.
-{'src/egs_sup.erl', [{outdir, "ebin"}]}.
-{'src/egs_cron.erl', [{outdir, "ebin"}]}.
-{'src/egs_db.erl', [{outdir, "ebin"}]}.
-{'src/egs_game.erl', [{outdir, "ebin"}]}.
-{'src/egs_login.erl', [{outdir, "ebin"}]}.
-{'src/psu/psu_patch.erl', [{outdir, "ebin"}]}.
-{'src/egs_proto.erl', [{outdir, "ebin"}]}.
-{'src/psu_appearance.erl', [{outdir, "ebin"}]}.
-{'src/psu_characters.erl', [{outdir, "ebin"}]}.
-{'src/psu_missions.erl', [{outdir, "ebin"}]}.
-{'src/psu_parser.erl', [{outdir, "ebin"}]}.
diff --git a/Makefile b/Makefile
index 6632380..82572c8 100644
--- a/Makefile
+++ b/Makefile
@@ -16,18 +16,22 @@
# You should have received a copy of the GNU General Public License
# along with EGS. If not, see .
+ERL ?= erl
+ERLC ?= erlc
+APP := egs
+
all: server
-server: clean missions
- @erl -make
+server: missions
+ @./rebar compile
missions:
- erlc src/psu_parser.erl
- erl -noshell -noinput -sname missions -pa ebin -run psu_parser run -run init stop
+ $(ERLC) src/psu_parser.erl
+ $(ERL) -noshell -noinput -sname missions -pa ebin -run psu_parser run -run init stop
rm psu_parser.beam
clean:
- rm -f ebin/*.beam
+ @./rebar clean
rm -f erl_crash.dump
fclean: clean
@@ -37,4 +41,4 @@ run:
@echo "EGS is free software available under the GNU GPL version 3"
@echo "Copyright (C) 2010 Loic Hoguin"
@echo
- erl -ssl protocol_version '{sslv3}' -sname egs -pa ebin -s egs
+ $(ERL) -ssl protocol_version '{sslv3}' -sname egs -pa ebin -s egs
diff --git a/rebar b/rebar
new file mode 100755
index 0000000..2f66b5a
Binary files /dev/null and b/rebar differ