-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
libuv.mk
71 lines (57 loc) · 2.06 KB
/
libuv.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
## LIBUV ##
LIBUV_GIT_URL:=git://github.com/JuliaLang/libuv.git
LIBUV_TAR_URL=https://api.github.com/repos/JuliaLang/libuv/tarball/$1
$(eval $(call git-external,libuv,LIBUV,configure,,$(SRCCACHE)))
ifneq ($(USE_BINARYBUILDER_LIBUV),1)
UV_CFLAGS := -O2
ifeq ($(USEMSVC), 1)
UV_CFLAGS += -DBUILDING_UV_SHARED
endif
ifeq ($(USEICC), 1)
UV_CFLAGS += -static-intel
endif
UV_FLAGS := LDFLAGS="$(LDFLAGS) $(CLDFLAGS) -v"
ifneq ($(UV_CFLAGS),)
UV_FLAGS += CFLAGS="$(CFLAGS) $(UV_CFLAGS)"
endif
ifeq ($(USEMSVC), 1)
UV_FLAGS += --disable-shared
endif
ifneq ($(VERBOSE), 0)
UV_MFLAGS += V=1
endif
LIBUV_BUILDDIR := $(BUILDDIR)/$(LIBUV_SRC_DIR)
$(LIBUV_BUILDDIR)/build-configured: $(SRCCACHE)/$(LIBUV_SRC_DIR)/source-extracted
touch -c $(SRCCACHE)/$(LIBUV_SRC_DIR)/aclocal.m4 # touch a few files to prevent autogen from getting called
touch -c $(SRCCACHE)/$(LIBUV_SRC_DIR)/Makefile.in
touch -c $(SRCCACHE)/$(LIBUV_SRC_DIR)/configure
mkdir -p $(dir $@)
cd $(dir $@) && \
$(dir $<)/configure --with-pic $(CONFIGURE_COMMON) $(UV_FLAGS)
echo 1 > $@
$(LIBUV_BUILDDIR)/build-compiled: $(LIBUV_BUILDDIR)/build-configured
$(MAKE) -C $(dir $<) $(UV_MFLAGS)
echo 1 > $@
$(LIBUV_BUILDDIR)/build-checked: $(LIBUV_BUILDDIR)/build-compiled
ifeq ($(OS),$(BUILD_OS))
$(MAKE) -C $(dir $@) check
endif
echo 1 > $@
$(eval $(call staged-install, \
libuv,$$(LIBUV_SRC_DIR), \
MAKE_INSTALL,,, \
$$(INSTALL_NAME_CMD)libuv.$$(SHLIB_EXT) $$(build_shlibdir)/libuv.$$(SHLIB_EXT)))
clean-libuv:
-rm -rf $(LIBUV_BUILDDIR)/build-configured $(LIBUV_BUILDDIR)/build-compiled
-$(MAKE) -C $(LIBUV_BUILDDIR) clean
get-libuv: $(LIBUV_SRC_FILE)
extract-libuv: $(SRCCACHE)/$(LIBUV_SRC_DIR)/source-extracted
configure-libuv: $(LIBUV_BUILDDIR)/build-configured
compile-libuv: $(LIBUV_BUILDDIR)/build-compiled
fastcheck-libuv: #none
check-libuv: $(LIBUV_BUILDDIR)/build-checked
else # USE_BINARYBUILDER_LIBUV
LIBUV_BB_URL_BASE := https://github.com/JuliaPackaging/Yggdrasil/releases/download/LibUV-v2+$(LIBUV_VER)-julia+$(LIBUV_BB_REL)
LIBUV_BB_NAME := LibUV.v2.0.0+$(LIBUV_VER)-julia
$(eval $(call bb-install,libuv,LIBUV,false))
endif