xref: /haiku/data/system/boot/SetupEnvironment (revision 7a74a5df454197933bc6e80a542102362ee98703)
1#
2# First we set up a bunch of environment variables that we want everyone
3# to inherit
4#
5
6export HOME=/boot/home
7export LC_CTYPE="en_US.UTF-8"
8
9BUILDHOME=/boot/develop
10BETOOLS="$BUILDHOME/tools/gnupro/bin"
11
12case `uname -m` in
13BePC|Intel|unknown)
14	BE_HOST_CPU=x86
15	;;
16BeMac|BeBox)
17	BE_HOST_CPU=ppc
18	;;
19*)
20	BE_HOST_CPU=unknown
21esac
22
23BELIBRARIES="$BUILDHOME/abi/current/library-paths/common:$BUILDHOME/lib/$BE_HOST_CPU"
24BH=$BUILDHOME/headers
25BEINCLUDES="$BH;$BH/be;$BH/posix;$BH/glibc;$BH/cpp;$BH/be/app;$BH/be/device;$BH/be/interface;$BH/be/locale;$BH/be/media;$BH/be/midi;$BH/be/midi2;$BH/be/net;$BH/be/kernel;$BH/be/storage;$BH/be/support;$BH/be/game;$BH/be/opengl;$BH/be/drivers;$BH/gnu;$BH/be/mail;$BH/be/translation;$BH/be/devel;$BH/be/add-ons/graphics;$BH/be/be_apps/Deskbar;$BH/be/be_apps/NetPositive;$BH/be/be_apps/Tracker"
26
27export BUILDHOME
28export BETOOLS
29export BELIBRARIES
30export BEINCLUDES
31export BE_HOST_CPU
32
33# for the "cc" and "ld" shell scripts
34
35export BE_C_COMPILER=gcc
36export BE_CPLUS_COMPILER="g++"
37export BE_LINKER=ld
38export BE_DEFAULT_C_FLAGS=""
39export BE_DEFAULT_CPLUS_FLAGS=""
40
41if [ "$SAFEMODE" != "yes" ]
42then
43	export PATH=.:$HOME/config/bin:/boot/common/bin:/bin:/boot/apps:/boot/preferences:/boot/system/apps:/boot/system/preferences:$BETOOLS
44	export LIBRARY_PATH="%A/lib:$HOME/config/lib:/boot/common/lib:/boot/system/lib"
45	export ADDON_PATH="%A/add-ons:$HOME/config/add-ons:/boot/common/add-ons:/boot/system/add-ons"
46else
47	export PATH=.:/boot/common/bin:/bin:/boot/apps:/boot/preferences:/boot/system/apps:/boot/system/preferences:$BETOOLS
48	export LIBRARY_PATH="%A/lib:/boot/common/lib:/boot/system/lib"
49	export ADDON_PATH="%A/add-ons:/boot/common/add-ons:/boot/system/add-ons"
50fi
51
52# Locale
53export LC_MESSAGES=`locale -m`
54export LC_NUMERIC=`locale -f`
55export LC_TIME=`locale -t`
56export LC_COLLATE=$LC_MESSAGES
57export LC_CTYPE=$LC_MESSAGES
58export LC_MONETARY=$LC_NUMERIC
59
60# media kit
61if [ -f $HOME/config/settings/use_old_audio ]
62then
63	export USE_OLD_AUDIO=true
64fi
65
66if [ "$SAFEMODE" != "yes" ]
67then
68	if [ -f $HOME/config/boot/UserSetupEnvironment ]
69	then
70     	. $HOME/config/boot/UserSetupEnvironment
71	fi
72fi
73