-
Notifications
You must be signed in to change notification settings - Fork 4
/
build
92 lines (80 loc) · 1.34 KB
/
build
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/bash
REVACORE=bin/revacore
REVACOREW=bin/revacore.exe
REVA=bin/reva
REVAW=bin/reva.exe
RC=i386-mingw32msvc-windres
WINE=wine
ALL=0
DOCS=0
TEST=0
if [ "$1" == "-h" ]
then
cat <<EOF
Syntax is:
build [clean] [all] [docs]
EOF
exit
fi
if [ "$1" == "clean" ]
then
rm $REVACORE $REVA $REVACOREW $REVAW
shift
exit
fi
if [ "$1" == "all" ]
then
ALL=1
shift
fi
if [ "$1" == "test" ]
then
TEST=1
shift
fi
if [ "$1" == "docs" ]
then
DOCS=1
shift
fi
if [ src/revacore.asm -nt $REVACORE ] || [ src/corelin.asm -nt $REVACORE ]
then
echo Building Reva-Linux CORE
( cd src && fasm -m 30000 corelin.asm linux.o > asm.err )
gcc -o $REVACORE -ldl -s -nostartfiles src/linux.o
strip $REVACORE
fi
if [ "1" == $ALL ]
then
if [ src/revacore.asm -nt $REVACOREW ] || [ src/corewin.asm -nt $REVACOREW ]
then
echo Building Reva-Windows CORE
(cd src && fasm -m 30000 corewin.asm ../$REVACOREW >> asm.err )
fi
fi
if [ src/reva.f -nt $REVA ] || [ $REVACORE -nt $REVA ]
then
echo Building Reva-Linux
$REVACORE src/reva.f
if [ "1" == $ALL ]
then
if [ src/reva.f -nt $REVAW ]
then
echo Building Reva-Windows
cd src
$RC reva.rc reva.res
cd ..
$WINE $REVACORE.exe src/reva.f >> asm.err
fi
fi
fi
if [ "1" == $DOCS ]
then
echo Building help database
$REVA bin/genhelp.f
fi
if [ "1" == $TEST ]
then
echo Testing...
$REVA bin/test.f
fi