2012-05-01 21:36:38 +00:00
|
|
|
APP=hop_server
|
2012-04-29 23:41:04 +00:00
|
|
|
TEMPLATES=$(wildcard web/bootstrap/templates/*.xml)
|
|
|
|
HTML=$(subst web/bootstrap/templates/,web/,$(subst .xml,.html,$(TEMPLATES)))
|
2012-01-08 17:41:04 +00:00
|
|
|
|
2012-04-29 23:41:04 +00:00
|
|
|
all: message.ml amqp_spec.ml $(APP).native web/bootstrap/css/bootstrap.css webpages
|
|
|
|
|
|
|
|
webpages: $(HTML)
|
2012-04-29 20:31:29 +00:00
|
|
|
|
|
|
|
web/bootstrap/css/bootstrap.css: web/bootstrap/less/*.less
|
|
|
|
recess --compile web/bootstrap/less/bootstrap.less > $@
|
2012-01-08 17:41:04 +00:00
|
|
|
|
2012-04-29 23:41:04 +00:00
|
|
|
web/%.html: web/bootstrap/templates/%.xml web/bootstrap/template.xsl web/bootstrap/nav.xml
|
|
|
|
xsltproc web/bootstrap/template.xsl $< > $@
|
|
|
|
|
2012-01-08 17:41:04 +00:00
|
|
|
message.ml: messages.json codegen.py
|
|
|
|
python codegen.py > $@
|
|
|
|
|
2012-03-03 03:15:24 +00:00
|
|
|
amqp_spec.ml: amqp0-9-1.stripped.xml amqp_codegen.py
|
|
|
|
python amqp_codegen.py > $@
|
|
|
|
|
2012-04-29 23:41:04 +00:00
|
|
|
webclean:
|
|
|
|
rm -f $(HTML)
|
|
|
|
|
|
|
|
clean: webclean
|
2012-01-08 17:41:04 +00:00
|
|
|
ocamlbuild -clean
|
|
|
|
rm -f message.ml
|
2012-03-03 03:15:24 +00:00
|
|
|
rm -f amqp_spec.ml
|
2012-01-08 17:41:04 +00:00
|
|
|
|
2012-04-29 20:31:29 +00:00
|
|
|
veryclean: clean
|
|
|
|
rm -f web/bootstrap/css/bootstrap.css
|
|
|
|
|
2012-01-08 17:41:04 +00:00
|
|
|
$(APP).native: $(wildcard *.ml)
|
|
|
|
ocamlbuild $@
|
|
|
|
|
|
|
|
run: all
|
|
|
|
./$(APP).native
|