diff -r 49a69b4bc421 Config.mk --- a/Config.mk Fri May 07 13:02:04 2010 +0200 +++ b/Config.mk Fri May 07 13:51:16 2010 +0200 @@ -171,8 +171,12 @@ ifeq ($(OCAML_TOOLS),y) ifeq ($(CONFIG_Linux),y) OCAML_TOOLS := $(shell ocamlopt -v > /dev/null 2>&1 && echo "y" || echo "n") else +ifeq ($(CONFIG_NetBSD),y) +OCAML_TOOLS := $(shell ocamlopt -v > /dev/null 2>&1 && echo "y" || echo "n") +else OCAML_TOOLS := n endif endif +endif -include $(XEN_ROOT)/.config diff -r 49a69b4bc421 tools/ocaml/common.make --- a/tools/ocaml/common.make Fri May 07 13:02:04 2010 +0200 +++ b/tools/ocaml/common.make Fri May 07 13:51:16 2010 +0200 @@ -1,3 +1,5 @@ +include $(XEN_ROOT)/tools/Rules.mk + CC ?= gcc OCAMLOPT ?= ocamlopt OCAMLC ?= ocamlc @@ -9,7 +11,13 @@ OCAMLYACC ?= ocamlyacc CFLAGS ?= -Wall -fPIC -O2 -Werror CFLAGS += -I$(TOPLEVEL)/../include -I$(TOPLEVEL)/../libxc + +ifeq ($(CONFIG_Linux),y) CFLAGS += -I/usr/lib64/ocaml -I/usr/lib/ocaml +endif +ifeq ($(CONFIG_NetBSD),y) +CFLAGS += -I/usr/pkg/lib/ocaml -fPIC +endif OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n 's/^ *\(-g\) .*/\1/p') OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc $(CC) -w F -warn-error F diff -r 49a69b4bc421 tools/ocaml/libs/eventchn/Makefile --- a/tools/ocaml/libs/eventchn/Makefile Fri May 07 13:02:04 2010 +0200 +++ b/tools/ocaml/libs/eventchn/Makefile Fri May 07 13:51:16 2010 +0200 @@ -1,4 +1,5 @@ TOPLEVEL=../.. +XEN_ROOT=$(TOPLEVEL)/../.. include $(TOPLEVEL)/common.make OBJS = eventchn diff -r 49a69b4bc421 tools/ocaml/libs/log/Makefile --- a/tools/ocaml/libs/log/Makefile Fri May 07 13:02:04 2010 +0200 +++ b/tools/ocaml/libs/log/Makefile Fri May 07 13:51:16 2010 +0200 @@ -1,4 +1,5 @@ TOPLEVEL=../.. +XEN_ROOT=$(TOPLEVEL)/../.. include $(TOPLEVEL)/common.make OBJS = syslog log logs diff -r 49a69b4bc421 tools/ocaml/libs/mmap/Makefile --- a/tools/ocaml/libs/mmap/Makefile Fri May 07 13:02:04 2010 +0200 +++ b/tools/ocaml/libs/mmap/Makefile Fri May 07 13:51:16 2010 +0200 @@ -1,4 +1,5 @@ TOPLEVEL=../.. +XEN_ROOT=$(TOPLEVEL)/../.. include $(TOPLEVEL)/common.make OBJS = mmap diff -r 49a69b4bc421 tools/ocaml/libs/uuid/Makefile --- a/tools/ocaml/libs/uuid/Makefile Fri May 07 13:02:04 2010 +0200 +++ b/tools/ocaml/libs/uuid/Makefile Fri May 07 13:51:16 2010 +0200 @@ -1,4 +1,5 @@ TOPLEVEL=../.. +XEN_ROOT=$(TOPLEVEL)/../.. include $(TOPLEVEL)/common.make OBJS = uuid diff -r 49a69b4bc421 tools/ocaml/libs/xb/Makefile --- a/tools/ocaml/libs/xb/Makefile Fri May 07 13:02:04 2010 +0200 +++ b/tools/ocaml/libs/xb/Makefile Fri May 07 13:51:16 2010 +0200 @@ -1,4 +1,5 @@ TOPLEVEL=../.. +XEN_ROOT=$(TOPLEVEL)/../.. include $(TOPLEVEL)/common.make CFLAGS += -I../mmap diff -r 49a69b4bc421 tools/ocaml/libs/xc/Makefile --- a/tools/ocaml/libs/xc/Makefile Fri May 07 13:02:04 2010 +0200 +++ b/tools/ocaml/libs/xc/Makefile Fri May 07 13:51:16 2010 +0200 @@ -1,4 +1,5 @@ TOPLEVEL=../.. +XEN_ROOT=$(TOPLEVEL)/../.. include $(TOPLEVEL)/common.make CFLAGS += -I../mmap -I./ diff -r 49a69b4bc421 tools/ocaml/libs/xs/Makefile --- a/tools/ocaml/libs/xs/Makefile Fri May 07 13:02:04 2010 +0200 +++ b/tools/ocaml/libs/xs/Makefile Fri May 07 13:51:16 2010 +0200 @@ -1,4 +1,5 @@ TOPLEVEL=../.. +XEN_ROOT=$(TOPLEVEL)/../.. include $(TOPLEVEL)/common.make OCAMLINCLUDE += -I ../xb/ diff -r 49a69b4bc421 tools/ocaml/xenstored/Makefile --- a/tools/ocaml/xenstored/Makefile Fri May 07 13:02:04 2010 +0200 +++ b/tools/ocaml/xenstored/Makefile Fri May 07 13:51:16 2010 +0200 @@ -1,3 +1,4 @@ +XEN_ROOT = ../../.. OCAML_TOPLEVEL = .. include $(OCAML_TOPLEVEL)/common.make