forked from aix27249/mpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_all
executable file
·25 lines (23 loc) · 983 Bytes
/
build_all
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
#!/bin/sh
# This script builds all components and installs it into system (because of building requirements).
# Do not use this for package build
TARGETS="mpkgsupport nwidgets lib console i18n mpkg-parted mpkg-gui-installer libagiliasetup guiinstaller textinstaller chroot_installer"
set -e
CWD=`pwd`
if [ `uname -m` = "i686" ] ; then
MARCH="-march=i686"
fi
ncpu=`cat /proc/cpuinfo | grep processor | wc -l`
NUMJOBS=${NUMJOBS:--j${ncpu}}
CXXFLAGS="-O3 $MARCH -fomit-frame-pointer -fPIC -funroll-all-loops -fopenmp -funroll-loops -ffast-math -O3 -fgraphite-identity -floop-interchange -floop-strip-mine -ftree-parallelize-loops=4 -pthread -floop-block"
export CXXFLAGS
CFLAGS=$CXXFLAGS
export CFLAGS
for i in $TARGETS ; do
mkdir -p $CWD/$i/build
cd $CWD/$i/build
CXXFLAGS=$CXXFLAGS CFLAGS=$CFLAGS cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS:STRING="$CFLAGS" -DCMAKE_CXX_FLAGS:STRING="$CXXFLAGS" ..
make $NUMJOBS
sudo make install
done
cd $CWD