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)))
|
2013-11-30 19:31:09 +00:00
|
|
|
|
|
|
|
# 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
|
2020-06-01 12:34:55 +00:00
|
|
|
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
|
|
|
|
|
2012-05-05 23:12:24 +00:00
|
|
|
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 $< > $@
|
|
|
|
|
2012-05-10 20:46:59 +00:00
|
|
|
message.ml: ../protocol/messages.json codegen.py
|
2024-04-14 14:20:54 +00:00
|
|
|
python3 codegen.py > $@
|
2012-01-08 17:41:04 +00:00
|
|
|
|
2012-03-03 03:15:24 +00:00
|
|
|
amqp_spec.ml: amqp0-9-1.stripped.xml amqp_codegen.py
|
2024-04-14 14:20:54 +00:00
|
|
|
python3 amqp_codegen.py > $@
|
2012-03-03 03:15:24 +00:00
|
|
|
|
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
|
|
|
|
2013-02-26 05:40:23 +00:00
|
|
|
veryclean: clean
|
2012-04-29 20:31:29 +00:00
|
|
|
rm -f web/bootstrap/css/bootstrap.css
|
|
|
|
|
2013-02-26 05:40:23 +00:00
|
|
|
$(APP).native: $(wildcard *.ml) lwt_installed
|
2013-03-25 19:06:15 +00:00
|
|
|
$(OCAMLBUILD) $@
|
2013-02-26 05:40:23 +00:00
|
|
|
|
|
|
|
$(APP).p.native: $(wildcard *.ml) lwt_installed
|
2013-03-25 19:06:15 +00:00
|
|
|
$(OCAMLBUILD) $@
|
2012-01-08 17:41:04 +00:00
|
|
|
|
2013-02-26 05:40:23 +00:00
|
|
|
lwt_installed:
|
2018-08-10 10:40:32 +00:00
|
|
|
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
|