blob: 4ccb9a4ee94ca8081d48b372c391f9dc155f4f5b (
plain)
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
|
#!/bin/sh
echorun()
{
echo $1
$1
}
compile()
{
echorun "$cc -c $cflags $include $lflags -o $1.o $1.c $libs"
}
compile_and_link()
{
echorun "$cc $cflags $include $lflags -o $1 $1.c $libs"
}
start=`pwd`
dir=`realpath $0`
dir=`dirname $dir`
echorun "cd $dir"
if [ "$1" = 'clean' ] ; then
echorun "rm -f *.o linux"
echorun "cd $start"
exit
fi
cc='gcc'
cflags='-g'
include="-I../../prb -I../../prge"
lflags="-L../../prb -L../../prge"
libs='-lprb -lprge -lGL -lX11 -lm'
compile_and_link linux
echorun "cd $start"
|