OCAML_LIBS    = ../util/version ../idl/ocaml_backend/common ../idl/ocaml_backend/client
OCAMLINCLUDES = ../idl/ocaml_backend ../xapi ../idl ../autogen ../client_records
OCAMLPACKS    = xml-light2 stdext stunnel http-svr xcp rpclib uuid xcp-inventory

PERFTEST_FILES = scenario perfutil createVM createpool testtypes perftest tests ../xapi/xapi_inventory perfdebug 
OCamlProgram(perftest, $(PERFTEST_FILES))
OCamlDocProgram(perftest, $(PERFTEST_FILES))
OCamlProgram(apiperf, perfutil apiperf ../fhs)
OCamlProgram(histogram, statistics histogram gnuplot testtypes perfdebug graphutil)
OCamlProgram(cumulative_time, cumulative_time gnuplot testtypes perfdebug graphutil)

section
	OCAML_LIBS += ../idl/ocaml_backend/server
	OCamlProgram(xmlrpcserver, xmlrpcserver)

.PHONY: clean

clean:
	rm -f $(CLEAN_OBJS) histogram cumulative_time perftest

.PHONY: install
install:
	mkdir -p $(DESTDIR)$(OPTDIR)/debug
	$(IPROG) perftest $(DESTDIR)$(OPTDIR)/debug

