forked from open-watcom/open-watcom-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·42 lines (41 loc) · 933 Bytes
/
build.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
#!/bin/sh
#
# Script to build the Open Watcom tools
# using the host platform's native C/C++ compiler or OW tools.
#
# Expects POSIX or OW tools.
cd $OWSRCDIR/wmake
if [ ! -d $OWOBJDIR ]; then mkdir $OWOBJDIR; fi
cd $OWOBJDIR
rm -f $OWBINDIR/wmake
if [ "$OWUSENATIVETOOLS" -eq "1" ]; then
case `uname` in
FreeBSD)
make -f ../posmake clean
make -f ../posmake TARGETDEF=-D__BSD__
;;
# Linux)
*)
make -f ../posmake clean
make -f ../posmake TARGETDEF=-D__LINUX__
;;
esac
else
wmake -f ../wmake clean
wmake -f ../wmake
fi
cd $OWSRCDIR/builder
if [ ! -d $OWOBJDIR ]; then mkdir $OWOBJDIR; fi
cd $OWOBJDIR
rm -f $OWBINDIR/builder
$OWBINDIR/wmake -f ../binmake clean
$OWBINDIR/wmake -f ../binmake bootstrap=1 builder.exe
cd $OWSRCDIR
builder boot
RC=$?
if [ $RC -eq 0 ]; then
builder build
RC=$?
fi
cd $OWROOT
return $RC