Skip to content

Instantly share code, notes, and snippets.

@hungryblank
Created July 16, 2009 22:16
Show Gist options
  • Save hungryblank/148729 to your computer and use it in GitHub Desktop.
Save hungryblank/148729 to your computer and use it in GitHub Desktop.
LIBDIR = `erl -eval 'io:format("~s~n", [code:lib_dir()])' -s init stop -noshell`
VERSION = 0.0.1
CC = erlc
ERL = erl
EBIN = ebin
CFLAGS = -I include -pa $(EBIN)
COMPILE = $(CC) $(CFLAGS) -o $(EBIN)
EBIN_DIRS = $(wildcard deps/*/ebin)
WEB_DIR = web/
WONDERLAND_DIR = $(WEB_DIR)/wonderland
all: mochi ebin compile
all_boot: all make_boot
wonderland_boot: wonderland all_boot
start: all start_all
rstakeout: wonderland compile
wonderland:
[ -d $(WONDERLAND_DIR) ] || (mkdir $(WEB_DIR) && cd $(WEB_DIR) && git clone git://github.com/auser/wonderland.git)
cd $(WONDERLAND_DIR) && git pull origin master
mochi:
@(cd deps/mochiweb;$(MAKE))
compile:
@$(ERL) -pa $(EBIN_DIRS) -noinput +B -eval 'case make:all() of up_to_date -> halt(0); error -> halt(1) end.'
edoc:
@erl -noshell -run edoc_run application '$(APP)' '"."' '[]'
make_boot:
(cd ebin; erl -pa ebin -noshell -run make_boot write_scripts rest_app)
start_all:
(cd ebin; erl -pa ebin -noshell -sname alice -boot alice)
ebin:
@mkdir ebin
clean:
rm -rf ebin/*.beam ebin/erl_crash.dump erl_crash.dump ebin/*.boot ebin/*.rel ebin/*.script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment