forked from mirrors/linphone-iphone
builders.d: compile zrtp and polarssl using cmake too
Fun fact: build-polarssl using cmake in 18s, using autotools in 3min30
This commit is contained in:
parent
993e062ccf
commit
e4b9cfc1de
4 changed files with 109 additions and 74 deletions
|
|
@ -21,7 +21,7 @@ if grep -q ' ' <<< $PWD; then
|
|||
echo_err "Invalid location: your location should not contain spaces"
|
||||
fi
|
||||
|
||||
for prog in autoconf automake pkg-config doxygen java nasm gettext wget yasm optipng; do
|
||||
for prog in autoconf automake pkg-config doxygen java nasm gettext wget yasm optipng cmake; do
|
||||
check_installed "$prog" "it"
|
||||
done
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +1,51 @@
|
|||
cunit_dir?=cunit
|
||||
SRC_CUNIT=$(BUILDER_SRC_DIR)/${cunit_dir}
|
||||
BUILD_CUNIT=$(BUILDER_BUILD_DIR)/${cunit_dir}
|
||||
############################################################################
|
||||
# Copyright (C) 2014 Belledonne Communications,Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
${BUILD_CUNIT}/CMakeCache.txt:
|
||||
mkdir -p ${BUILD_CUNIT} && \
|
||||
cd ${BUILD_CUNIT} && \
|
||||
cmake -DENABLE_STATIC=YES -DCMAKE_TOOLCHAIN_FILE=$(BUILDER_SRC_DIR)/build/toolchain.cmake \
|
||||
-DIOS_ARCH=${ARCH} -DCMAKE_INSTALL_PREFIX=$(prefix) ${SRC_CUNIT}
|
||||
cunit_project:=cunit
|
||||
cunit_project_dir:=.
|
||||
cunit_cmake_specific_options:=-DENABLE_STATIC=YES
|
||||
|
||||
build-cunit: ${BUILD_CUNIT}/CMakeCache.txt
|
||||
cd ${BUILD_CUNIT} && \
|
||||
cunit_src_dir=$(BUILDER_SRC_DIR)/${cunit_project_dir}/${cunit_project}
|
||||
cunit_build_dir=$(BUILDER_BUILD_DIR)/${cunit_project_dir}/${cunit_project}
|
||||
|
||||
${cunit_build_dir}/Makefile:
|
||||
rm -rf ${cunit_build_dir}/CMakeCache.txt ${cunit_build_dir}/CMakeFiles/ && \
|
||||
mkdir -p ${cunit_build_dir} && \
|
||||
cd ${cunit_build_dir} && \
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=$(BUILDER_SRC_DIR)/build/toolchain.cmake -DIOS_ARCH=${ARCH} \
|
||||
-DCMAKE_INSTALL_PREFIX=$(prefix) -DCMAKE_PREFIX_PATH=$(prefix) -DCMAKE_MODULE_PATH=$(prefix)/share/cmake/Modules/ \
|
||||
${cunit_cmake_specific_options} ${cunit_src_dir}
|
||||
|
||||
build-${cunit_project}: ${cunit_build_dir}/Makefile
|
||||
cd ${cunit_build_dir} && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
clean-cunit:
|
||||
cd $(BUILD_CUNIT)/$(cunit_dir) && \
|
||||
clean-${cunit_project}:
|
||||
cd $(cunit_build_dir) && \
|
||||
make clean
|
||||
|
||||
veryclean-cunit:
|
||||
rm -rf $(BUILD_CUNIT)/$(cunit_dir)
|
||||
veryclean-${cunit_project}:
|
||||
if [ -d $(cunit_build_dir) ]; then grep -v $(prefix) $(cunit_build_dir)/install_manifest.txt | xargs echo rm; fi && \
|
||||
rm -rf $(cunit_build_dir)
|
||||
|
||||
clean-makefile-cunit: veryclean-cunit
|
||||
clean-makefile-${cunit_project}: veryclean-${cunit_project}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,28 +1,51 @@
|
|||
polarssl_dir?=externals/polarssl
|
||||
############################################################################
|
||||
# Copyright (C) 2014 Belledonne Communications,Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
SRC_DIR=$(BUILDER_SRC_DIR)
|
||||
BUILD_DIR=$(BUILDER_BUILD_DIR)
|
||||
polarssl_project:=polarssl
|
||||
polarssl_project_dir:=externals
|
||||
polarssl_cmake_specific_options:=-DUSE_STATIC_POLARSSL_LIBRARY=YES -DENABLE_TESTING=OFF -DENABLE_PROGRAMS=OFF -DENABLE_APIDOC=OFF
|
||||
|
||||
polarssl_src_dir=$(BUILDER_SRC_DIR)/${polarssl_project_dir}/${polarssl_project}
|
||||
polarssl_build_dir=$(BUILDER_BUILD_DIR)/${polarssl_project_dir}/${polarssl_project}
|
||||
|
||||
$(SRC_DIR)/$(polarssl_dir)/configure:
|
||||
cd $(SRC_DIR)/$(polarssl_dir) && ./autogen.sh
|
||||
${polarssl_build_dir}/Makefile:
|
||||
rm -rf ${polarssl_build_dir}/CMakeCache.txt ${polarssl_build_dir}/CMakeFiles/ && \
|
||||
mkdir -p ${polarssl_build_dir} && \
|
||||
cd ${polarssl_build_dir} && \
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=$(BUILDER_SRC_DIR)/build/toolchain.cmake -DIOS_ARCH=${ARCH} \
|
||||
-DCMAKE_INSTALL_PREFIX=$(prefix) -DCMAKE_PREFIX_PATH=$(prefix) -DCMAKE_MODULE_PATH=$(prefix)/share/cmake/Modules/ \
|
||||
${polarssl_cmake_specific_options} ${polarssl_src_dir}
|
||||
|
||||
$(BUILD_DIR)/$(polarssl_dir)/Makefile: $(SRC_DIR)/$(polarssl_dir)/configure
|
||||
mkdir -p $(BUILD_DIR)/$(polarssl_dir)
|
||||
cd $(BUILD_DIR)/$(polarssl_dir) \
|
||||
&& PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(SRC_DIR)/build/$(config_site) \
|
||||
$(SRC_DIR)/$(polarssl_dir)/configure --prefix=$(prefix) --host=$(host) ${library_mode}
|
||||
build-${polarssl_project}: ${polarssl_build_dir}/Makefile
|
||||
cd ${polarssl_build_dir} && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
build-polarssl: $(BUILD_DIR)/$(polarssl_dir)/Makefile
|
||||
cd $(BUILD_DIR)/${polarssl_dir} && \
|
||||
host_alias=$(host) PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig CONFIG_SITE=$(SRC_DIR)/build/$(config_site) make && make install
|
||||
clean-${polarssl_project}:
|
||||
cd $(polarssl_build_dir) && \
|
||||
make clean
|
||||
|
||||
clean-polarssl:
|
||||
-cd $(BUILD_DIR)/$(polarssl_dir) && make clean
|
||||
veryclean-${polarssl_project}:
|
||||
if [ -d $(polarssl_build_dir) ]; then grep -v $(prefix) $(polarssl_build_dir)/install_manifest.txt | xargs echo rm; fi && \
|
||||
rm -rf $(polarssl_build_dir)
|
||||
|
||||
veryclean-polarssl:
|
||||
-rm -rf $(BUILD_DIR)/$(polarssl_dir)
|
||||
-rm -f $(SRC_DIR)/$(polarssl_dir)/configure
|
||||
|
||||
clean-makefile-polarssl: veryclean-polarssl
|
||||
clean-makefile-${polarssl_project}: veryclean-${polarssl_project}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
############################################################################
|
||||
# zrtp.mk
|
||||
# Copyright (C) 2014 Belledonne Communications,Grenoble France
|
||||
#
|
||||
############################################################################
|
||||
|
|
@ -19,48 +18,34 @@
|
|||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
############################################################################
|
||||
bzrtp_dir?=bzrtp
|
||||
enable_zrtp?=yes
|
||||
|
||||
configure-options=
|
||||
ifeq ($(LINPHONE_CCACHE), ccache)
|
||||
configure-options+= --disable-strict
|
||||
endif
|
||||
bzrtp_project:=bzrtp
|
||||
bzrtp_project_dir:=.
|
||||
bzrtp_cmake_specific_options:=-DENABLE_STATIC=YES
|
||||
|
||||
$(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
|
||||
bzrtp_src_dir=$(BUILDER_SRC_DIR)/${bzrtp_project_dir}/${bzrtp_project}
|
||||
bzrtp_build_dir=$(BUILDER_BUILD_DIR)/${bzrtp_project_dir}/${bzrtp_project}
|
||||
|
||||
$(BUILDER_BUILD_DIR)/$(bzrtp_dir)/Makefile: $(BUILDER_SRC_DIR)/$(bzrtp_dir)/configure
|
||||
@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 ${configure-options}
|
||||
${bzrtp_build_dir}/Makefile:
|
||||
rm -rf ${bzrtp_build_dir}/CMakeCache.txt ${bzrtp_build_dir}/CMakeFiles/ && \
|
||||
mkdir -p ${bzrtp_build_dir} && \
|
||||
cd ${bzrtp_build_dir} && \
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=$(BUILDER_SRC_DIR)/build/toolchain.cmake -DIOS_ARCH=${ARCH} \
|
||||
-DCMAKE_INSTALL_PREFIX=$(prefix) -DCMAKE_PREFIX_PATH=$(prefix) -DCMAKE_MODULE_PATH=$(prefix)/share/cmake/Modules/ \
|
||||
${bzrtp_cmake_specific_options} ${bzrtp_src_dir}
|
||||
|
||||
ifeq ($(enable_zrtp),yes)
|
||||
build-${bzrtp_project}: ${bzrtp_build_dir}/Makefile
|
||||
cd ${bzrtp_build_dir} && \
|
||||
make && \
|
||||
make install
|
||||
|
||||
build-bzrtp: $(BUILDER_BUILD_DIR)/$(bzrtp_dir)/Makefile
|
||||
@echo -e "\033[01;32m building bzrtp \033[0m"
|
||||
cd $(BUILDER_BUILD_DIR)/$(bzrtp_dir) \
|
||||
&& PKG_CONFIG_LIBDIR=$(prefix)/lib/pkgconfig \
|
||||
CONFIG_SITE=$(BUILDER_SRC_DIR)/build/$(config_site) \
|
||||
make -j1 && make install
|
||||
clean-${bzrtp_project}:
|
||||
cd $(bzrtp_build_dir) && \
|
||||
make clean
|
||||
|
||||
else
|
||||
build-bzrtp:
|
||||
@echo "ZRTP is disabled"
|
||||
veryclean-${bzrtp_project}:
|
||||
if [ -d $(bzrtp_build_dir) ]; then grep -v $(prefix) $(bzrtp_build_dir)/install_manifest.txt | xargs echo rm; fi && \
|
||||
rm -rf $(bzrtp_build_dir)
|
||||
|
||||
endif
|
||||
clean-makefile-${bzrtp_project}: veryclean-${bzrtp_project}
|
||||
|
||||
clean-bzrtp:
|
||||
-cd $(BUILDER_BUILD_DIR)/$(bzrtp_dir) && make clean
|
||||
|
||||
veryclean-bzrtp:
|
||||
-cd $(BUILDER_BUILD_DIR)/$(bzrtp_dir) && make distclean
|
||||
rm -f $(BUILDER_SRC_DIR)/$(bzrtp_dir)/configure
|
||||
|
||||
clean-makefile-bzrtp:
|
||||
-cd $(BUILDER_BUILD_DIR)/$(bzrtp_dir) && rm -f Makefile
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue