aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ocaml/common.make
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-05-07 19:08:55 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-05-07 19:08:55 +0100
commiteb8d759136ca98b053c1fe9bb7e72aecb5a0a80d (patch)
tree84c74122120d85095b9197cfd256643154e9353e /tools/ocaml/common.make
parentb87c206038d5c81a34371f13a12752389642086f (diff)
downloadxen-eb8d759136ca98b053c1fe9bb7e72aecb5a0a80d.tar.gz
xen-eb8d759136ca98b053c1fe9bb7e72aecb5a0a80d.tar.bz2
xen-eb8d759136ca98b053c1fe9bb7e72aecb5a0a80d.zip
ocaml: NetBSD support and general CFLAGS cleanup
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'tools/ocaml/common.make')
-rw-r--r--tools/ocaml/common.make8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/ocaml/common.make b/tools/ocaml/common.make
index cb95104582..63b6b2ee24 100644
--- a/tools/ocaml/common.make
+++ b/tools/ocaml/common.make
@@ -1,3 +1,5 @@
+include $(XEN_ROOT)/tools/Rules.mk
+
CC ?= gcc
OCAMLOPT ?= ocamlopt
OCAMLC ?= ocamlc
@@ -6,10 +8,10 @@ OCAMLDEP ?= ocamldep
OCAMLLEX ?= ocamllex
OCAMLYACC ?= ocamlyacc
-CFLAGS ?= -Wall -fPIC -O2 -Werror
-
+CFLAGS += -fPIC -Werror
CFLAGS += -I$(TOPLEVEL)/../include -I$(TOPLEVEL)/../libxc
-CFLAGS += -I/usr/lib64/ocaml -I/usr/lib/ocaml
+CFLAGS-$(CONFIG_Linux) += -I/usr/lib64/ocaml -I/usr/lib/ocaml
+CFLAGS-$(CONFIG_NetBSD) += -I/usr/pkg/lib/ocaml -fPIC
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