@@ -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
new file mode 100644
@@ -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)
new file mode 100644
@@ -0,0 +1,7 @@
+package xenlight
+
+import "fmt"
+
+func main() {
+ fmt.Println("go")
+}