Skip to content

Commit cef3c4e

Browse files
committed
vendor: add statically linked libev for HAVE_OCAML_QCOW
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
1 parent 4012b0c commit cef3c4e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ HAVE_OCAML_QCOW := $(shell if ocamlfind query qcow uri >/dev/null 2>/dev/null ;
128128
# included 'qcow2' in the $GO_BUILD_TAGS, and $HAVE_OCAML_QCOW is YES
129129
ifneq (,$(findstring qcow2,$(GO_BUILD_TAGS)))
130130
ifeq ($(HAVE_OCAML_QCOW),YES)
131+
LIBEV_FILE=/usr/local/lib/libev.a
132+
LIBEV=$(shell if test -e $(LIBEV_FILE) ; then echo $(LIBEV_FILE) ; fi )
131133
OCAML_WHERE := $(shell ocamlc -where)
132134
OCAML_LDLIBS := -L $(OCAML_WHERE) \
133135
$(shell ocamlfind query cstruct)/cstruct.a \
@@ -140,6 +142,7 @@ OCAML_LDLIBS := -L $(OCAML_WHERE) \
140142
$(shell ocamlfind query lwt.unix)/lwt.a \
141143
$(shell ocamlfind query threads)/libthreadsnat.a \
142144
$(shell ocamlfind query mirage-block-unix)/libmirage_block_unix_stubs.a \
145+
$(LIBEV) \
143146
-lasmrun -lbigarray -lunix
144147
CGO_CFLAGS += -DHAVE_OCAML=1 -DHAVE_OCAML_QCOW=1 -DHAVE_OCAML=1 -I$(OCAML_WHERE)
145148
CGO_LDFLAGS += $(OCAML_LDLIBS)

0 commit comments

Comments
 (0)