xref: /haiku/data/system/boot/SetupEnvironment (revision 922e7ba1f3228e6f28db69b0ded8f86eb32dea17)
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/system/develop
10
11#TODO: fix this or drop it!
12BETOOLS="/boot/common/settings/develop/tools/current/bin"
13
14case `uname -m` in
15BePC|Intel|unknown)
16	BE_HOST_CPU=x86
17	;;
18BeMac|BeBox)
19	BE_HOST_CPU=ppc
20	;;
21*)
22	BE_HOST_CPU=unknown
23esac
24
25BELIBRARIES="/boot/common/non-packaged/lib:/boot/common/lib:$BUILDHOME/lib"
26
27# not used by Haiku, but probably by legacy applications (BeIDE?)
28BH=$BUILDHOME/headers
29BEINCLUDES="$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"
30
31export BUILDHOME
32export BETOOLS
33export BELIBRARIES
34export BEINCLUDES
35export BE_HOST_CPU
36
37# for the "cc" and "ld" shell scripts
38
39export BE_C_COMPILER=gcc
40export BE_CPLUS_COMPILER="g++"
41export BE_LINKER=ld
42export BE_DEFAULT_C_FLAGS=""
43export BE_DEFAULT_CPLUS_FLAGS=""
44
45if [ "$SAFEMODE" != "yes" ]
46then
47	export PATH=.:$HOME/config/non-packaged/bin:$HOME/config/bin:/boot/common/non-packaged/bin:/boot/common/bin:/bin:/boot/apps:/boot/preferences:/boot/system/apps:/boot/system/preferences:$BETOOLS
48	export LIBRARY_PATH="%A/lib:$HOME/config/non-packaged/lib:$HOME/config/lib:/boot/common/non-packaged/lib:/boot/common/lib:/boot/system/lib"
49	export ADDON_PATH="%A/add-ons:$HOME/config/non-packaged/add-ons:$HOME/config/add-ons:/boot/common/non-packaged/add-ons:/boot/common/add-ons:/boot/system/add-ons"
50else
51	export PATH=.:/bin:/boot/apps:/boot/system/apps:/boot/system/preferences:$BETOOLS
52	export LIBRARY_PATH="%A/lib:/boot/system/lib"
53	export ADDON_PATH="%A/add-ons:/boot/system/add-ons"
54fi
55
56# media kit
57if [ -f $HOME/config/settings/use_old_audio ]
58then
59	export USE_OLD_AUDIO=true
60fi
61
62if [ "$SAFEMODE" != "yes" ]
63then
64	if [ -f $HOME/config/boot/UserSetupEnvironment ]
65	then
66     	. $HOME/config/boot/UserSetupEnvironment
67	fi
68fi
69