All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] tools/xenlight: Create xenlight Makefile
@ 2016-12-15 23:20 Ronald Rojas
  2016-12-16  3:20 ` Doug Goldstein
  2016-12-16  4:27 ` George Dunlap
  0 siblings, 2 replies; 11+ messages in thread
From: Ronald Rojas @ 2016-12-15 23:20 UTC (permalink / raw)
  Cc: Wei Liu, Ronald Rojas, George Dunlap, Ian Jackson, George Dunlap,
	xen-devel

Create a basic Makefile to build and install libxenlight Golang
bindings.  Also add a template.

---

Eventually this patch will contain the actual bindings package; for
now it just includes a stub package.

To Do:
- Have configure detect golang bindings properly

CC: xen-devel <xen-devel@lists.xen.org>
CC: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: George Dunlap <george.dunlap@citrix.com>
CC: George Dunlap <dunlapg@umich.edu>
---
 tools/Makefile                    | 16 ++++++++++++++++
 tools/golang/Makefile             | 33 +++++++++++++++++++++++++++++++++
 tools/golang/xenlight/xenlight.go |  7 +++++++
 3 files changed, 56 insertions(+)
 create mode 100644 tools/golang/Makefile
 create mode 100644 tools/golang/xenlight/xenlight.go

diff --git a/tools/Makefile b/tools/Makefile
index 71515b4..f2198e0 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -11,6 +11,8 @@ SUBDIRS-y += misc
 SUBDIRS-y += examples
 SUBDIRS-y += hotplug
 SUBDIRS-y += xentrace
+SUBDIRS-y += golang
+#FIXME: Have golang controlled by a configure variable
 SUBDIRS-$(CONFIG_XCUTILS) += xcutils
 SUBDIRS-$(CONFIG_X86) += firmware
 SUBDIRS-y += console
@@ -311,6 +313,20 @@ subdir-install-debugger/gdbsx: .phony
 subdir-all-debugger/gdbsx: .phony
 	$(MAKE) -C debugger/gdbsx all
 
+subdir-all-golang/xenlight: .phony
+	$(MAKE) -C golang all
+
+subdir-clean-golang/xenlight: .phony
+	$(MAKE) -C golang clean
+
+subdir-install-golang/xenlight: .phony
+	$(MAKE) -C golang install
+
+subdir-build-golang/xenlight: .phony
+	$(MAKE) -C golang build
+
+subdir-distclean-golang/xenlight: .phony
+	$(MAKE) -C golang distclean
 
 subdir-clean-debugger/kdd subdir-distclean-debugger/kdd: .phony
 	$(MAKE) -C debugger/kdd clean
diff --git a/tools/golang/Makefile b/tools/golang/Makefile
new file mode 100644
index 0000000..eead226
--- /dev/null
+++ b/tools/golang/Makefile
@@ -0,0 +1,33 @@
+XEN_ROOT=$(CURDIR)/../..
+include $(XEN_ROOT)/tools/Rules.mk
+
+BINARY = xenlight.a
+GO ?= go
+
+.PHONY: all
+all: build
+
+.PHONY: build
+build: xenlight/xenlight.a
+
+.PHONY: install
+install: build
+	if [ ! -f $(BINARY) ]; then \
+		mkdir $(GOPATH)/src/xenlight; \
+		$(INSTALL_PROG) xenlight/xenlight.go $(GOPATH)/src/xenlight/xenlight.go; \
+		echo "this"; \
+	fi  
+
+.PHONY: clean
+clean:
+	$(RM) $(BINARY)
+
+.PHONY: distclean
+distclean: clean
+
+
+xenlight/xenlight.a: xenlight/xenlight.go
+	$(GO) build -o $@ $<
+
+
+-include $(DEPS)
diff --git a/tools/golang/xenlight/xenlight.go b/tools/golang/xenlight/xenlight.go
new file mode 100644
index 0000000..9136676
--- /dev/null
+++ b/tools/golang/xenlight/xenlight.go
@@ -0,0 +1,7 @@
+package xenlight
+
+import "fmt"
+
+func main() {
+	fmt.Println("go")
+}
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [PATCH RFC] tools/xenlight: Create xenlight Makefile
@ 2016-12-22 15:26 Ronald Rojas
  0 siblings, 0 replies; 11+ messages in thread
From: Ronald Rojas @ 2016-12-22 15:26 UTC (permalink / raw)
  Cc: Wei Liu, Ronald Rojas, George Dunlap, Ian Jackson, George Dunlap,
	xen-devel

Create a basic Makefile to build and install libxenlight Golang
bindings.  Also add a stub package.

---

Eventually this patch will contain the actual bindings package; for
now it just includes a stub package.

To Do:
- Have configure detect golang bindings properly

CC: xen-devel <xen-devel@lists.xen.org>
CC: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: George Dunlap <george.dunlap@citrix.com>
CC: George Dunlap <dunlapg@umich.edu>
---
 tools/Makefile                    | 16 ++++++++++++++++
 tools/golang/Makefile             | 29 +++++++++++++++++++++++++++++
 tools/golang/xenlight/xenlight.go |  7 +++++++
 3 files changed, 52 insertions(+)
 create mode 100644 tools/golang/Makefile
 create mode 100644 tools/golang/xenlight/xenlight.go

diff --git a/tools/Makefile b/tools/Makefile
index 71515b4..f2198e0 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -11,6 +11,8 @@ SUBDIRS-y += misc
 SUBDIRS-y += examples
 SUBDIRS-y += hotplug
 SUBDIRS-y += xentrace
+SUBDIRS-y += golang
+#FIXME: Have golang controlled by a configure variable
 SUBDIRS-$(CONFIG_XCUTILS) += xcutils
 SUBDIRS-$(CONFIG_X86) += firmware
 SUBDIRS-y += console
@@ -311,6 +313,20 @@ subdir-install-debugger/gdbsx: .phony
 subdir-all-debugger/gdbsx: .phony
 	$(MAKE) -C debugger/gdbsx all
 
+subdir-all-golang/xenlight: .phony
+	$(MAKE) -C golang all
+
+subdir-clean-golang/xenlight: .phony
+	$(MAKE) -C golang clean
+
+subdir-install-golang/xenlight: .phony
+	$(MAKE) -C golang install
+
+subdir-build-golang/xenlight: .phony
+	$(MAKE) -C golang build
+
+subdir-distclean-golang/xenlight: .phony
+	$(MAKE) -C golang distclean
 
 subdir-clean-debugger/kdd subdir-distclean-debugger/kdd: .phony
 	$(MAKE) -C debugger/kdd clean
diff --git a/tools/golang/Makefile b/tools/golang/Makefile
new file mode 100644
index 0000000..96589c8
--- /dev/null
+++ b/tools/golang/Makefile
@@ -0,0 +1,29 @@
+XEN_ROOT=$(CURDIR)/../..
+GOLANG_SRC=$(GOPATH)/src/xenproject.org/xenlight
+include $(XEN_ROOT)/tools/Rules.mk
+
+BINARY = xenlight.a
+GO ?= go
+
+.PHONY: all
+all: build
+
+.PHONY: build
+build: xenlight/xenlight.a
+
+.PHONY: install
+install: build
+	$(INSTALL_DIR) $(DESTDIR)$(GOLANG_SRC)
+	$(INSTALL_DATA) xenlight/xenlight.go $(DESTDIR)$(GOLANG_SRC)
+
+.PHONY: clean
+clean:
+	$(RM) xenlight/$(BINARY)
+
+.PHONY: distclean
+distclean: clean
+
+xenlight/xenlight.a: xenlight/xenlight.go
+	$(GO) build -o $@ $<
+
+-include $(DEPS)
diff --git a/tools/golang/xenlight/xenlight.go b/tools/golang/xenlight/xenlight.go
new file mode 100644
index 0000000..9136676
--- /dev/null
+++ b/tools/golang/xenlight/xenlight.go
@@ -0,0 +1,7 @@
+package xenlight
+
+import "fmt"
+
+func main() {
+	fmt.Println("go")
+}
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 11+ messages in thread
* (no subject)
@ 2016-11-28 17:18 Ronald Rojas
  2016-11-28 17:18 ` [PATCH RFC] tools/xenlight: Create xenlight Makefile Ronald Rojas
  0 siblings, 1 reply; 11+ messages in thread
From: Ronald Rojas @ 2016-11-28 17:18 UTC (permalink / raw)
  To: xen-devel, ian.jackson, wei.liu2, george.dunlap, dunlapg

Create a Makefile for the golang xenlight project, which will
allow users to access libxl functionality in Golang. Makefile 
rules were also added to tools/Makefile for the project to be 
built and installed. A template Golang file was also created 
for the project to be properly built. 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

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

end of thread, other threads:[~2016-12-22 15:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-15 23:20 [PATCH RFC] tools/xenlight: Create xenlight Makefile Ronald Rojas
2016-12-16  3:20 ` Doug Goldstein
2016-12-16  4:28   ` George Dunlap
2016-12-16  4:27 ` George Dunlap
2016-12-22  0:34   ` Ronald Rojas
  -- strict thread matches above, loose matches on Subject: below --
2016-12-22 15:26 Ronald Rojas
2016-11-28 17:18 (no subject) Ronald Rojas
2016-11-28 17:18 ` [PATCH RFC] tools/xenlight: Create xenlight Makefile Ronald Rojas
2016-11-29  7:19   ` Wei Liu
2016-11-29 22:40     ` George Dunlap
2016-11-30  1:30   ` George Dunlap
2016-12-01 19:18     ` Ronald Rojas

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.