1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
STD_PACKAGES = unix pcre str findlib netstring
DEBUG = -g
# Invoke with: make DEBUG=-g
test: test_server refuser test_client test_bad_request
./test_bench
run:
ocamlfind ocamlc -o run -make-runtime -package "$(STD_PACKAGES)" \
-linkpkg
test_server.cmo: test_server.ml
ocamlfind ocamlc $(DEBUG) -package "$(STD_PACKAGES)" -c $<
test_server: run test_server.cmo
ocamlfind ocamlc -o test_server $(DEBUG) -use-runtime ./run \
-package "$(STD_PACKAGES)" -linkpkg \
test_server.cmo
refuser.cmo: refuser.ml
ocamlfind ocamlc $(DEBUG) -package "$(STD_PACKAGES)" -c $<
refuser: run refuser.cmo
ocamlfind ocamlc -o refuser $(DEBUG) -use-runtime ./run \
-package "$(STD_PACKAGES)" -linkpkg \
refuser.cmo
test_client.cmo: test_client.ml
ocamlfind ocamlc $(DEBUG) -package "$(STD_PACKAGES)" \
-I .. -c $<
test_client: run test_client.cmo ../netclient.cma
ocamlfind ocamlc -o test_client $(DEBUG) -use-runtime ./run \
-predicates debug -verbose \
-package "$(STD_PACKAGES) equeue netstring cgi" \
-linkpkg ../netclient.cma test_client.cmo
test_bad_request: test_bad_request.ml run ../netclient.cma
ocamlfind ocamlc -o test_bad_request $(DEBUG) -use-runtime ./run \
-predicates debug \
-package "$(STD_PACKAGES) equeue netstring cgi" \
-linkpkg -I .. \
../netclient.cma test_bad_request.ml
clean:
rm -f *.cmo *.cmi run test_client test_server *.out \
test_bad_request refuser log/* server.pid server.port
distclean: clean
|