diff --git a/.makefile b/.makefile index d7ad0a6..4514a2a 160000 --- a/.makefile +++ b/.makefile @@ -1 +1 @@ -Subproject commit d7ad0a6e0c6ac1af798264c4198abc0c60c31f4e +Subproject commit 4514a2aedb02e1c297bfc02962861a104c9b3013 diff --git a/external/compile-external-libs.sh b/external/compile-external-libs.sh index ba82eb9..65d33a7 100755 --- a/external/compile-external-libs.sh +++ b/external/compile-external-libs.sh @@ -1,5 +1,4 @@ -#!/bin/bash -ex - +#!/bin/bash -e ############################################################################### ### This script is called by (cd .. && make compile-external-libs). It will ### compile thirdparts cloned previously with make download-external-libs. @@ -22,29 +21,7 @@ ### find them when you'll start your application. ############################################################################### -### $1 is given by ../Makefile and refers to the current architecture. -if [ "$1" == "" ]; then - echo "Expected one argument. Select the architecture: Linux, Darwin or Windows" - exit 1 -fi - -ARCHI="$1" -TARGET="$2" -CC="$3" -CXX="$4" - -function print-compile -{ - echo -e "\033[35m*** Compiling:\033[00m \033[36m$TARGET\033[00m <= \033[33m$1\033[00m" -} - -### Number of CPU cores -NPROC=-j1 -if [[ "$ARCHI" == "Darwin" ]]; then - NPROC=-j`sysctl -n hw.logicalcpu` -elif [[ "$ARCHI" == "Linux" ]]; then - NPROC=-j`nproc --all` -fi +source ../.makefile/compile-external-libs.sh ### Library zlib-ng print-compile zlib-ng @@ -52,8 +29,8 @@ if [ -e zlib-ng ]; then mkdir -p zlib-ng/build (cd zlib-ng/build - cmake -GNinja -DZLIB_COMPAT=ON -DZLIB_ENABLE_TESTS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. - VERBOSE=1 ninja $NPROC + call-cmake -DZLIB_COMPAT=ON -DZLIB_ENABLE_TESTS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. + call-make ) else echo "Failed compiling external/zipper: directory does not exist" @@ -65,8 +42,8 @@ if [ -e minizip ]; then mkdir -p minizip/build (cd minizip/build - cmake -GNinja -DUSE_AES=ON .. - VERBOSE=1 ninja $NPROC + call-cmake -DUSE_AES=ON .. + call-make ) else echo "Failed compiling external/zipper: directory does not exist" diff --git a/external/download-external-libs.sh b/external/download-external-libs.sh index 2823361..bb2c168 100755 --- a/external/download-external-libs.sh +++ b/external/download-external-libs.sh @@ -1,33 +1,17 @@ -#!/bin/bash +#!/bin/bash -e +############################################################################### +### This script is called by (cd .. && make download-external-libs). It will +### git clone thirdparts needed for this project but does not compile them. +### It replaces git submodules that I dislike. +############################################################################### -### This script will git clone some libraries that Zipper needs and -### compile them. To avoid pollution, they are not installed into your -### environement. Therefore Zipper Makefiles have to know where to -### find their files (includes and static/shared libraries). - -### $1 is given by ../Makefile and refers to the current architecture. -if [ "$1" == "" ]; then - echo "Expected one argument. Select the architecture: Linux, Darwin or Windows" - exit 1 -fi -ARCHI="$1" -TARGET=Zipper - -### Delete all previous directories to be sure to have and compile -### fresh code source. -rm -fr backward-cpp zlib-ng minizip 2> /dev/null - -function clone -{ - NAME=`echo "$1" | cut -d"/" -f2` - echo -e "\033[35m*** Cloning:\033[00m \033[36m$TARGET\033[00m <= \033[33m$NAME\033[00m" - git clone --recursive https://github.com/$1.git --depth=1 #> /dev/null 2> /dev/null -} +source ../.makefile/download-external-libs.sh ### zlib replacement with optimizations for "next generation" systems. ### License: zlib -clone zlib-ng/zlib-ng +cloning zlib-ng/zlib-ng -### Minizip contrib in zlib with latest bug fixes that supports PKWARE disk spanning, AES encryption, and IO buffering +### Minizip contrib in zlib with latest bug fixes that supports PKWARE disk +### spanning, AES encryption, and IO buffering. ### License: zlib -clone Lecrapouille/minizip +cloning Lecrapouille/minizip