-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
pcre.mk
70 lines (54 loc) · 2.21 KB
/
pcre.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
## PCRE ##
include $(SRCDIR)/pcre.version
ifneq ($(USE_BINARYBUILDER_PCRE),1)
# Force optimization for PCRE flags (Issue #11668)
PCRE_CFLAGS := -O3
PCRE_LDFLAGS := $(RPATH_ESCAPED_ORIGIN)
ifeq ($(OS),emscripten)
PCRE_CFLAGS += -fPIC
PCRE_JIT = --disable-jit
else
PCRE_JIT = --enable-jit
endif
$(SRCCACHE)/pcre2-$(PCRE_VER).tar.bz2: | $(SRCCACHE)
$(JLDOWNLOAD) $@ https://github.com/PCRE2Project/pcre2/releases/download/pcre2-$(PCRE_VER)/pcre2-$(PCRE_VER).tar.bz2
$(SRCCACHE)/pcre2-$(PCRE_VER)/source-extracted: $(SRCCACHE)/pcre2-$(PCRE_VER).tar.bz2
$(JLCHECKSUM) $<
cd $(dir $<) && $(TAR) jxf $(notdir $<)
echo 1 > $@
checksum-pcre: $(SRCCACHE)/pcre2-$(PCRE_VER).tar.bz2
$(JLCHECKSUM) $<
$(BUILDDIR)/pcre2-$(PCRE_VER)/build-configured: $(SRCCACHE)/pcre2-$(PCRE_VER)/source-extracted
mkdir -p $(dir $@)
cd $(dir $@) && \
$(dir $<)/configure $(CONFIGURE_COMMON) $(PCRE_JIT) --includedir=$(build_includedir) CFLAGS="$(CFLAGS) $(PCRE_CFLAGS) -g -O0" LDFLAGS="$(LDFLAGS) $(PCRE_LDFLAGS)"
echo 1 > $@
$(BUILDDIR)/pcre2-$(PCRE_VER)/build-compiled: $(BUILDDIR)/pcre2-$(PCRE_VER)/build-configured
$(MAKE) -C $(dir $<) $(LIBTOOL_CCLD)
echo 1 > $@
$(BUILDDIR)/pcre2-$(PCRE_VER)/build-checked: $(BUILDDIR)/pcre2-$(PCRE_VER)/build-compiled
ifeq ($(OS),$(BUILD_OS))
ifneq ($(OS),WINNT)
$(MAKE) -C $(dir $@) check -j1
endif
endif
echo 1 > $@
$(eval $(call staged-install, \
pcre,pcre2-$$(PCRE_VER), \
MAKE_INSTALL,$$(LIBTOOL_CCLD),, \
rm -f $$(build_shlibdir)/libpcre2-posix.* && \
$$(INSTALL_NAME_CMD)libpcre2-8.$$(SHLIB_EXT) $$(build_shlibdir)/libpcre2-8.$$(SHLIB_EXT)))
clean-pcre:
-rm -f $(BUILDDIR)/pcre2-$(PCRE_VER)/build-configured $(BUILDDIR)/pcre2-$(PCRE_VER)/build-compiled
-$(MAKE) -C $(BUILDDIR)/pcre2-$(PCRE_VER) clean
distclean-pcre:
rm -rf $(SRCCACHE)/pcre2-$(PCRE_VER).tar.bz2 $(SRCCACHE)/pcre2-$(PCRE_VER) $(BUILDDIR)/pcre2-$(PCRE_VER)
get-pcre: $(SRCCACHE)/pcre2-$(PCRE_VER).tar.bz2
extract-pcre: $(SRCCACHE)/pcre2-$(PCRE_VER)/source-extracted
configure-pcre: $(BUILDDIR)/pcre2-$(PCRE_VER)/build-configured
compile-pcre: $(BUILDDIR)/pcre2-$(PCRE_VER)/build-compiled
fastcheck-pcre: check-pcre
check-pcre: $(BUILDDIR)/pcre2-$(PCRE_VER)/build-checked
else # USE_BINARYBUILDER_PCRE
$(eval $(call bb-install,pcre,PCRE,false))
endif