1include $(XEN_ROOT)/tools/Rules.mk 2 3CC ?= gcc 4OCAMLOPT ?= ocamlopt 5OCAMLC ?= ocamlc 6OCAMLMKLIB ?= ocamlmklib 7OCAMLDEP ?= ocamldep 8OCAMLLEX ?= ocamllex 9OCAMLYACC ?= ocamlyacc 10OCAMLFIND ?= ocamlfind 11 12CFLAGS += -fPIC -Werror -I$(shell ocamlc -where) 13 14OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n 's/^ *\(-g\) .*/\1/p') 15OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc $(CC) -w F -warn-error F 16OCAMLCFLAGS += -g $(OCAMLINCLUDE) -w F -warn-error F 17 18VERSION := 4.1 19 20OCAMLDESTDIR ?= $(DESTDIR)$(shell $(OCAMLFIND) printconf destdir) 21 22o= >$@.new && mv -f $@.new $@ 23