-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathzynthian_envars.sh
executable file
·68 lines (64 loc) · 2.61 KB
/
zynthian_envars.sh
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/sh
#******************************************************************************
# ZYNTHIAN PROJECT: Zynthian Environment Vars
#
# Setup Zynthian Environment Variables
#
# Copyright (C) 2015-2016 Fernando Moyano <[email protected]>
#
#******************************************************************************
#
# 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 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.
#
# For a full copy of the GNU General Public License see the LICENSE.txt file.
# ****************************************************************************
# Git branch
export ZYNTHIAN_BRANCH="mod"
# Directory Paths
export ZYNTHIAN_DIR="/zynthian"
export ZYNTHIAN_SW_DIR="$ZYNTHIAN_DIR/zynthian-sw"
export ZYNTHIAN_UI_DIR="$ZYNTHIAN_DIR/zynthian-ui"
export ZYNTHIAN_SYS_DIR="$ZYNTHIAN_DIR/zynthian-sys"
export ZYNTHIAN_DATA_DIR="$ZYNTHIAN_DIR/zynthian-data"
export ZYNTHIAN_MY_DATA_DIR="$ZYNTHIAN_DIR/zynthian-my-data"
export ZYNTHIAN_RECIPE_DIR="$ZYNTHIAN_SYS_DIR/scripts/recipes"
export ZYNTHIAN_PLUGINS_DIR="$ZYNTHIAN_DIR/zynthian-plugins"
export ZYNTHIAN_PLUGINS_MODGUI_DIR="$ZYNTHIAN_DIR/zynthian-modgui"
export ZYNTHIAN_MY_PLUGINS_DIR="$ZYNTHIAN_DIR/zynthian-my-plugins"
export ZYNTHIAN_PLUGINS_SRC_DIR="$ZYNTHIAN_SW_DIR/plugins"
export LV2_PATH="${ZYNTHIAN_PLUGINS_DIR}/lv2:${ZYNTHIAN_MY_PLUGINS_DIR}/lv2:${ZYNTHIAN_PLUGINS_MODGUI_DIR}"
# Hardware Architecture & Optimization Options
machine=`uname -m 2>/dev/null || echo unknown`
if [ "${machine}" = "armv7l" ]
then
model=`cat /sys/firmware/devicetree/base/model | strings` || echo unknown
if echo "${model}" | egrep -Eq '[3]'
then
CPU="-mcpu=cortex-a53"
FPU="-mfpu=neon-fp-armv8"
else
CPU="-mcpu=cortex-a7 -mthumb"
FPU="-mfpu=neon-vfpv4"
fi
CPU="${CPU} -Ofast"
FPU="${FPU} -mfloat-abi=hard -mlittle-endian -munaligned-access"
CFLAGS_UNSAFE="-funsafe-loop-optimizations -funsafe-math-optimizations"
export RASPI=true
fi
export CFLAGS="${CPU} ${FPU}"
export CXXFLAGS="${CFLAGS}"
export MACHINE_HW_NAME="${machine}"
export RBPI_VERSION="${model}"
export CFLAGS="${CPU} ${FPU} ${CFLAGS_UNSAFE}"
export CXXFLAGS="${CFLAGS}"
export CFLAGS_UNSAFE="${CFLAGS_UNSAFE}"
#echo "Hardware Architecture: ${machine}"
#echo "Hardware Model: ${model}"