All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ocaml NetBSD support
@ 2010-05-07 12:13 Christoph Egger
  2010-05-07 12:49 ` Vincent Hanquez
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Egger @ 2010-05-07 12:13 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 417 bytes --]


Hi!

Attached patch adds support for NetBSD to ocaml xenstore.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

[-- Attachment #2: xen_ocaml.diff --]
[-- Type: text/x-diff, Size: 3615 bytes --]

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
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-05-07 14:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-07 12:13 [PATCH] ocaml NetBSD support Christoph Egger
2010-05-07 12:49 ` Vincent Hanquez
2010-05-07 13:39   ` Christoph Egger
2010-05-07 14:42     ` Christoph Egger
2010-05-07 14:45     ` Vincent Hanquez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.