hop-2012/server/Makefile

50 lines
1.3 KiB
Makefile
Raw Permalink Normal View History

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)))
# Static builds. So far I've only seen this work on Linux. OS X complains about missing -lcrt0.o.
# OCAMLBUILD=ocamlbuild -classic-display -use-ocamlfind -X scratch -lflag -cclib -lflag -static
OCAMLBUILD=ocamlbuild -tag thread -classic-display -use-ocamlfind -X scratch
2012-01-08 17:41:04 +00:00
2012-05-05 22:18:23 +00:00
all: \
message.ml amqp_spec.ml \
$(APP).native \
webpages
webpages: $(HTML) web/bootstrap/css/bootstrap.css
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 $< > $@
message.ml: ../protocol/messages.json codegen.py
python3 codegen.py > $@
2012-01-08 17:41:04 +00:00
amqp_spec.ml: amqp0-9-1.stripped.xml amqp_codegen.py
python3 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
rm -f amqp_spec.ml
2012-01-08 17:41:04 +00:00
veryclean: clean
2012-04-29 20:31:29 +00:00
rm -f web/bootstrap/css/bootstrap.css
$(APP).native: $(wildcard *.ml) lwt_installed
$(OCAMLBUILD) $@
$(APP).p.native: $(wildcard *.ml) lwt_installed
$(OCAMLBUILD) $@
2012-01-08 17:41:04 +00:00
lwt_installed:
opam install camlp4 lwt lwt_camlp4
2012-05-25 17:42:57 +00:00
2012-01-08 17:41:04 +00:00
run: all
./$(APP).native