Enable CCACHE compilation: export LINPHONE_CCACHE=ccache and go.

It’s not perfect at all, and there’s about 1/3 of the SDK that will trigger
« unsupported compiler option », but that’s a start.
This commit is contained in:
Guillaume BIENKOWSKI 2014-10-07 17:00:59 +02:00
parent ffb1b19a29
commit 9a1839cc5c
7 changed files with 50 additions and 8 deletions

View file

@ -24,6 +24,12 @@ else
take_binary = i386
endif
ifeq ($(LINPHONE_CCACHE),ccache)
libvpx_configure_options+= --enable-ccache
endif
all_p=armv6-darwin-gcc #neon Cortex-A8
all_p+=armv7-darwin-gcc #neon Cortex-A8
all_p+=armv7s-darwin-gcc #neon Cortex-A8

View file

@ -20,6 +20,13 @@
#
############################################################################
msamr_dir?=msamr
configure-options=
ifeq ($(LINPHONE_CCACHE), ccache)
configure-options+= --disable-strict
endif
$(BUILDER_SRC_DIR)/$(msamr_dir)/configure:
cd $(BUILDER_SRC_DIR)/$(msamr_dir) && ./autogen.sh
@ -27,7 +34,7 @@ $(BUILDER_BUILD_DIR)/$(msamr_dir)/Makefile: $(BUILDER_SRC_DIR)/$(msamr_dir)/conf
mkdir -p $(BUILDER_BUILD_DIR)/$(msamr_dir)
cd $(BUILDER_BUILD_DIR)/$(msamr_dir)/ \
&& PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
$(BUILDER_SRC_DIR)/$(msamr_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode}
$(BUILDER_SRC_DIR)/$(msamr_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} ${configure-options}
build-msamr: build-opencore-amr $(BUILDER_BUILD_DIR)/$(msamr_dir)/Makefile
cd $(BUILDER_BUILD_DIR)/$(msamr_dir) && PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make && make install

View file

@ -22,6 +22,11 @@
msbcg729_dir?=bcg729
enable_bcg729?=yes
configure-options=
ifeq ($(LINPHONE_CCACHE), ccache)
configure-options+= --disable-strict
endif
$(BUILDER_SRC_DIR)/$(msbcg729_dir)/configure:
@echo -e "\033[01;32m Running autogen for msbcg729 in $(BUILDER_SRC_DIR)/$(msbcg729_dir) \033[0m"
cd $(BUILDER_SRC_DIR)/$(msbcg729_dir) && ./autogen.sh
@ -32,7 +37,7 @@ $(BUILDER_BUILD_DIR)/$(msbcg729_dir)/Makefile: $(BUILDER_SRC_DIR)/$(msbcg729_dir
cd $(BUILDER_BUILD_DIR)/$(msbcg729_dir)/ \
&& PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
$(BUILDER_SRC_DIR)/$(msbcg729_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} \
--enable-static
--enable-static ${configure-options}
ifeq ($(enable_bcg729),yes)

View file

@ -22,6 +22,11 @@
mssilk_dir?=mssilk
enable_silk?=yes
configure-options=
ifeq ($(LINPHONE_CCACHE), ccache)
configure-options+= --disable-strict
endif
$(BUILDER_SRC_DIR)/$(mssilk_dir)/configure:
echo -e "\033[01;32m Running autogen for mssilk in $(BUILDER_SRC_DIR)/$(mssilk_dir) \033[0m"
cd $(BUILDER_SRC_DIR)/$(mssilk_dir) && ./autogen.sh
@ -32,7 +37,7 @@ $(BUILDER_BUILD_DIR)/$(mssilk_dir)/Makefile: $(BUILDER_SRC_DIR)/$(mssilk_dir)/co
cd $(BUILDER_BUILD_DIR)/$(mssilk_dir)/ \
&& PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
$(BUILDER_SRC_DIR)/$(mssilk_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} \
--enable-static
--enable-static ${configure-options}
ifeq ($(enable_silk),yes)

View file

@ -20,6 +20,12 @@
#
############################################################################
msx264_dir?=msx264
configure-options=
ifeq ($(LINPHONE_CCACHE), ccache)
configure-options+= --disable-strict
endif
$(BUILDER_SRC_DIR)/$(msx264_dir)/configure:
cd $(BUILDER_SRC_DIR)/$(msx264_dir) && ./autogen.sh
@ -27,7 +33,7 @@ $(BUILDER_BUILD_DIR)/$(msx264_dir)/Makefile: $(BUILDER_SRC_DIR)/$(msx264_dir)/co
mkdir -p $(BUILDER_BUILD_DIR)/$(msx264_dir)
cd $(BUILDER_BUILD_DIR)/$(msx264_dir)/ \
&& PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
$(BUILDER_SRC_DIR)/$(msx264_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode}
$(BUILDER_SRC_DIR)/$(msx264_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} ${configure-options}
build-msx264: build-x264 $(BUILDER_BUILD_DIR)/$(msx264_dir)/Makefile
cd $(BUILDER_BUILD_DIR)/$(msx264_dir) && PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) make && make install

View file

@ -22,6 +22,11 @@
bzrtp_dir?=bzrtp
enable_zrtp?=yes
configure-options=
ifeq ($(LINPHONE_CCACHE), ccache)
configure-options+= --disable-strict
endif
$(BUILDER_SRC_DIR)/$(bzrtp_dir)/configure:
@echo -e "\033[01;32m Running autogen for bzrtp in $(BUILDER_SRC_DIR)/$(bzrtp_dir) \033[0m"
cd $(BUILDER_SRC_DIR)/$(bzrtp_dir) && ./autogen.sh
@ -30,9 +35,10 @@ $(BUILDER_BUILD_DIR)/$(bzrtp_dir)/Makefile: $(BUILDER_SRC_DIR)/$(bzrtp_dir)/conf
@echo -e "\033[01;32m Running configure in $(BUILDER_BUILD_DIR)/$(bzrtp_dir) \033[0m"
mkdir -p $(BUILDER_BUILD_DIR)/$(bzrtp_dir)
cd $(BUILDER_BUILD_DIR)/$(bzrtp_dir)/ \
&& host_alias=${host} . $(BUILDER_SRC_DIR)/build/$(config_site) \
&& PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
$(BUILDER_SRC_DIR)/$(bzrtp_dir)/configure -prefix=$(prefix) --host=$(host) ${library_mode} \
--enable-static
--enable-static ${configure-options}
ifeq ($(enable_zrtp),yes)

View file

@ -51,9 +51,16 @@ COMMON_FLAGS="$COMMON_FLAGS -Dsha256=polarssl_sha256"
# silence clang unused operators. This is temporary, we should find a way to compile 3rd party with correct flags :(
COMMON_FLAGS="-Qunused-arguments -Wno-unknown-warning-option -Wno-unused-command-line-argument-hard-error-in-future $COMMON_FLAGS"
CC="xcrun clang -std=c99 $COMMON_FLAGS"
OBJC="xcrun clang -std=c99 $COMMON_FLAGS"
CXX="xcrun clang++ $COMMON_FLAGS"
# you can use ccache to speed up build, in which case just define LINPHONE_CCACHE to 'ccache'
if test "$LINPHONE_CCACHE" = "ccache" ; then
# ccache doesn't like some options
COMMON_FLAGS="$COMMON_FLAGS -Wno-variadic-macros -Wno-pointer-arith -Wno-return-type -Wno-tautological-compare -Wno-unused-function -Wno-error"
fi
CC="xcrun $LINPHONE_CCACHE clang -std=c99 $COMMON_FLAGS"
OBJC="xcrun $LINPHONE_CCACHE clang -std=c99 $COMMON_FLAGS"
CXX="xcrun $LINPHONE_CCACHE clang++ $COMMON_FLAGS"
LD="xcrun ld -arch ${ARCH}"
AR="xcrun ar"
RANLIB="xcrun ranlib"