-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile.sh
executable file
·72 lines (63 loc) · 1.47 KB
/
compile.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
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
#!/bin/bash
#########################################################################
#
#########################################################################
# all
# clean
# doc
# -dist
#
. ostest.sh
build_opengui()
{
cd src
echo 'Building library for 8-bit colors ...'
make -j 12 -f Makefile $1 BPP=8 LIBNAME=fgl
echo 'Building library for 16-bit colors ...'
make -j 12 -f Makefile $1 BPP=16 LIBNAME=fgl16
echo 'Building library for 32-bit colors ...'
make -j 12 -f Makefile $1 BPP=32 LIBNAME=fgl32
cd ..
}
make_objs_dirs()
{
for file in linux solaris win32 mesa x11 agg2
do
# mkdir obj/gcc/8/"$file"
# mkdir obj/gcc/15/"$file"
# mkdir obj/gcc/16/"$file"
# mkdir obj/gcc/32/"$file"
:
done
}
increment_version()
{
File=version
{
read MAJOR
read MINOR
read PATCH
read BUILD
} < $File
STR=$MAJOR.$MINOR.$PATCH.$BUILD
echo '#'define FG_VERSION '"'$STR'"' > include/fastgl/fgversion.h
echo '#'define FG_MAJOR $MAJOR >> include/fastgl/fgversion.h
echo '#'define FG_MINOR $MINOR >> include/fastgl/fgversion.h
echo '#'define FG_PATCH $PATCH >> include/fastgl/fgversion.h
let "BUILD+=1"
echo $MAJOR > version
echo $MINOR >> version
echo $PATCH >> version
echo $BUILD >> version
}
make_objs_dirs
if test "$SYST" = "solaris"; then
PATH=$PATH:/opt/sfw/bin:/opt/sfw/lib/bin
export PATH
fi
if test "$SYST" = "win32"; then
cp -f /bin/make.exe /bin/gmake.exe
fi
increment_version
build_opengui
echo OpenGUI version: $STR was built