1818# Include makefiles
1919
2020-include mk/color.mk
21- -include mk/lib9p.mk
2221# Include driver debug makefile if $MACHINE_DRIVER_DEBUG=1
2322ifeq ($(MACHINE_DRIVER_DEBUG ) ,1)
2423-include mk/driver.mk
@@ -112,43 +111,6 @@ GO_BUILD_FLAG += -race
112111endif
113112
114113
115- # Use virtio-9p shared folder with static build lib9p library
116- # Default is enable
117- GO_BUILD_TAGS ?= lib9p
118- # included 'lib9p' in the $GO_BUILD_TAGS, and exists 'lib9p.a' file
119- ifneq (,$(findstring lib9p,$(GO_BUILD_TAGS ) ) )
120- CGO_CFLAGS += -I${PWD}/${LIB9P_DIR}
121- CGO_LDFLAGS += ${PWD}/vendor/build/lib9p/lib9p.a
122- bin/docker-machine-driver-xhyve : lib9p
123- endif
124-
125-
126- # Use mirage-block for pwritev|preadv
127- HAVE_OCAML_QCOW := $(shell if ocamlfind query qcow uri >/dev/null 2>/dev/null ; then echo YES ; else echo NO; fi)
128- ifeq ($(HAVE_OCAML_QCOW ) ,YES)
129- LIBEV_FILE ?= /usr/local/lib/libev.a
130- LIBEV = $(shell if test -e $(LIBEV_FILE ) ; then echo $(LIBEV_FILE ) ; fi )
131- OCAML_WHERE := $(shell ocamlc -where)
132- OCAML_LDLIBS := -L $(OCAML_WHERE ) \
133- $(shell ocamlfind query cstruct) /cstruct.a \
134- $(shell ocamlfind query cstruct) /libcstruct_stubs.a \
135- $(shell ocamlfind query io-page) /io_page.a \
136- $(shell ocamlfind query io-page) /io_page_unix.a \
137- $(shell ocamlfind query io-page) /libio_page_unix_stubs.a \
138- $(shell ocamlfind query lwt.unix) /liblwt-unix_stubs.a \
139- $(shell ocamlfind query lwt.unix) /lwt-unix.a \
140- $(shell ocamlfind query lwt.unix) /lwt.a \
141- $(shell ocamlfind query threads) /libthreadsnat.a \
142- $(shell ocamlfind query mirage-block-unix) /libmirage_block_unix_stubs.a \
143- $(LIBEV ) \
144- -lasmrun -lbigarray -lunix
145- CGO_CFLAGS += -DHAVE_OCAML=1 -DHAVE_OCAML_QCOW=1 -DHAVE_OCAML=1 -I$(OCAML_WHERE )
146- CGO_LDFLAGS += $(OCAML_LDLIBS )
147- GO_BUILD_TAGS += qcow2
148- bin/docker-machine-driver-xhyve : vendor/github.com/zchee/libhyperkit/mirage_block_ocaml.o
149- endif
150-
151-
152114GO_BUILD_FLAG += -tags='$(GO_BUILD_TAGS ) '
153115
154116
@@ -161,9 +123,6 @@ GO_BUILD_FLAG += -tags='$(GO_BUILD_TAGS)'
161123export GOARCH =amd64
162124export GOOS =darwin
163125
164- # Support go1.5 vendoring (let us avoid messing with GOPATH or using godep)
165- export GO15VENDOREXPERIMENT =1
166-
167126# TODO: uuid.go need cgo
168127export CGO_ENABLED =1
169128
@@ -175,9 +134,6 @@ default: build
175134
176135build : bin/docker-machine-driver-xhyve
177136
178- vendor/github.com/zchee/libhyperkit/mirage_block_ocaml.o :
179- $(VERBOSE ) $(GO_CMD ) generate $(GO_BUILD_FLAG ) $(GO_VERBOSE ) ./vendor/github.com/zchee/libhyperkit
180-
181137bin/docker-machine-driver-xhyve :
182138 $(VERBOSE ) test -d bin || mkdir -p bin;
183139 @echo " ${CBLUE} ==>${CRESET} Build ${CGREEN}${PACKAGE}${CRESET} ..."
@@ -220,8 +176,8 @@ docker-build-nocache:
220176 ${DOCKER_CMD} build --rm --no-cache -t ${GITHUB_USER} /${PACKAGE} .
221177
222178
223- clean : clean-lib9p
224- @${RM} -r ./bin ./vendor/github.com/zchee/libhyperkit/ * .cmi ./vendor/github.com/zchee/libhyperkit/ * .cmx ./vendor/github.com/zchee/libhyperkit/ * .syso
179+ clean :
180+ @${RM} -r ./bin
225181
226182
227183run : driver-run
0 commit comments