]> 4ch.mooo.com Git - 16.git/blob - simulate-sparky4-watcom-env.sh
more
[16.git] / simulate-sparky4-watcom-env.sh
1 # Source: http://4ch.mooo.com/4/watcom/wat.sh
2 # with modifications to simulate this environment on Jon's Linux system
3 #
4 # Note that nothing in this project appears to use ROOT or REXX variables
5 # ------BEGIN-------
6 #echo Open Watcom Build Environment
7 ROOT=/home/sparky4/p/osfree
8 watcomver=""
9
10 if [ -d /usr/src/open-watcom-v2/rel ]; then
11     # Jon's Linux system
12     watcom=/usr/src/open-watcom-v2/rel
13     WATCOM=$watcom
14 else
15     # original sparky4 config
16     watcom=/dos/fdos/watcom${watcomver}
17     WATCOM=$watcom
18 fi
19
20 OS=LINUX
21 ENV=LINUX
22 SHELL=Bourne
23 REXX=/usr/bin/rexx
24
25
26 if [ "${watcomver}" == 2 ]; then
27         MACHINE_TYPE=`uname -m`
28         if [ ${MACHINE_TYPE} == 'x86_64' ]; then
29                 PEE="64"
30         else
31                 PEE=""
32         fi
33 else
34         PEE=""
35 fi
36
37 TOOLS=$ROOT/bin/tools
38 INCLUDE=$watcom/h:$watcom/h/dos:$watcom/lh:$watcom/h/os2
39 WIPFC=$watcom/wipfc
40 LIB=$watcom/lib286/dos:$watcom/lib386:$watcom/lib386/dos:$watcom/lib286:$ROOT/lib
41 export OS REXX WATCOM ROOT TOOLS INCLUDE LIB WIPFC
42
43 if [ -d /usr/src/open-watcom-v2/rel ]; then
44     # Jon's Linux system
45     cur=`pwd`
46     cd $WATCOM/.. || exit 1
47     . ./setvars.sh
48     cd "$cur" || exit 1
49 else
50     # original sparky4 config
51     . ~/setvars.sh
52 fi
53
54 PATH=$watcom/binl${PEE}:$TOOLS:$ROOT:$PATH
55 WD_PATH=$watcom/binl${PEE}
56
57 TERM=xterm-16color
58 export OS ENV REXX WATCOM ROOT TOOLS INCLUDE LIB PATH WD_PATH WIPFC TERM
59
60 alias wcp="wcl -lr -l=dos -0 "
61 if [ ! -d "$watcom" ]; then
62         echo "INSTALL OPEN WATCOM AND EDIT THIS FILE TO THE CORRESPONDING DIRECTORY!!!!"
63 fi
64
65 #if [ ! -d "$watcom/binl64" ]; then
66 #       ln -s $watcom/binl64 $watcom/binl
67 #fi
68
69 #if [  -e "$HOME/setvars.sh" ]; then
70 #       length=$ROOT
71 #       ((length--))
72 #       [ "${filename:$length:1}" == "2" ] && . ./setvars.sh
73 #       else if [ ! -e "setvars.sh" ]; then
74 #       wget http://4ch.mooo.com/4/watcom/setvars.sh
75 #       chmod +x ~/setvars.sh
76 #fi
77 #fi
78 #. ~/aliasyonet.sh