| 1 | # Set default version/arch/build. Source tarballs with a different |
| 2 | # version will override the default VERSION. You can override BUILD |
| 3 | # by creating a file 'packagename' in the build/ directory, containing |
| 4 | # the desired build number. |
| 5 | |
| 6 | # [ -z $VERSION ] && export VERSION=0.15.0 |
| 7 | [ -z $BUILD ] && export BUILD=1 |
| 8 | |
| 9 | [ -z $TAG ] && export TAG=lxqt |
| 10 | |
| 11 | # Automatically determine the architecture we're building on: |
| 12 | MARCH=$( uname -m ) |
| 13 | if [ -z "$ARCH" ]; then |
| 14 | case "$MARCH" in |
| 15 | i?86) export ARCH=i486 ;; |
| 16 | armv7hl) export ARCH=$MARCH ;; |
| 17 | arm*) export ARCH=arm ;; |
| 18 | # Unless $ARCH is already set, use uname -m for all other archs: |
| 19 | *) export ARCH=$MARCH ;; |
| 20 | esac |
| 21 | fi |
| 22 | |
| 23 | [ -z $PKGARCH ] && export PKGARCH=$ARCH |
| 24 | |
| 25 | # Use this as CFLAGS and CXXFLAGS: |
| 26 | if [ -z "$SLKCFLAGS" ]; then |
| 27 | if [ "$ARCH" = "i486" ]; then |
| 28 | export SLKCFLAGS="-O2 -march=i486 -mtune=i686" |
| 29 | export LIBDIRSUFFIX="" |
| 30 | elif [ "$ARCH" = "s390" ]; then |
| 31 | export SLKCFLAGS="-O2" |
| 32 | export LIBDIRSUFFIX="" |
| 33 | elif [ "$ARCH" = "x86_64" ]; then |
| 34 | export SLKCFLAGS="-O2 -fPIC" |
| 35 | export LIBDIRSUFFIX="64" |
| 36 | elif [ "$ARCH" = "arm" ]; then |
| 37 | export SLKCFLAGS="-O2 -march=armv4 -mtune=xscale" |
| 38 | export LIBDIRSUFFIX="" |
| 39 | elif [ "$ARCH" = "armel" ]; then |
| 40 | export SLKCFLAGS="-O2 -march=armv4t" |
| 41 | export LIBDIRSUFFIX="" |
| 42 | elif [ "$ARCH" = "armv7hl" ]; then |
| 43 | export SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" |
| 44 | export LIBDIRSUFFIX="" |
| 45 | else |
| 46 | export SLKCFLAGS="-O2" |
| 47 | export LIBDIRSUFFIX="" |
| 48 | fi |
| 49 | fi |
| 50 | |
| 51 | # Use this to set the number of parallel make jobs: |
| 52 | if [ -z "$NUMJOBS" ]; then |
| 53 | export NUMJOBS="-j5" |
| 54 | fi |
| 55 | |
| 56 | case "$ARCH" in |
| 57 | arm*) export TARGET=$ARCH-slackware-linux-gnueabi ;; |
| 58 | *) export TARGET=$ARCH-slackware-linux ;; |
| 59 | esac |
| 60 | |