-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure
executable file
·92 lines (84 loc) · 1.92 KB
/
configure
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/csh -f
if ( -d bin ) then
eval `bin/mk.csh -cshmc`
else
if ( ! -d export ) then
echo "Expected an export or bin in $cwd."
exit 1
endif
# precompiled
chmod -R a+r .
chmod -R a+x export/bin
eval `export/bin/mk.csh -cshmc`
mkdir bin
mkdir lib
ln -s export/include
ln -s ../export/bin/v2k.csh bin/v2k
ln -s ../export/bin/mk.csh bin/mk
foreach obj (`cd export/bin ; echo *_obj{,-64}`)
ln -s ../export/bin/$obj bin/$obj
ln -s ../export/lib/$obj lib/$obj
end
if ( -d examples ) then
cd examples
echo -n "Run tests? [y/n]:"
set yn = $<
switch ($yn)
case {y,Y}*:
./test.csh
endsw
endif
exit 0
endif
if ( ! -x bin/mk ) ln -s mk.csh bin/mk
if ( ! -x bin/v2k ) ln -s v2k.csh bin/v2k
set v2kb = $cwd/bin
set opth = ($path:q)
set path = ($v2kb $path:q)
bin/mk README >& /dev/null
switch ($OBJ_DIR)
case obj:
echo "Known configurations are:"
foreach u (config/*-*/uname)
set uname = (`cat $u`)
echo "$uname[1] $uname[3] $uname[5]"
eval `bin/mk.csh -cshmc -uname $u:q`
echo "OBJ_DIR = $OBJ_DIR"
echo "SYS_LP = $SYS_LP"
echo "SYS_OS = $SYS_OS"
echo "SYS_CPU = $SYS_CPU"
end
exit 1
default:
echo "V2K is pre-configured for your system."
if (! -x /usr/local/bin/perl) then
echo Fixing paths...
(cd bin ; csh -f fix_paths)
endif
set shrd2 = 1
if (! $#argv) then
switch ($SYS_OS-$SYS_CPU)
case cyw-i86:
set argv = (GPP_VERSION=-V4.3.2)
set path = ($v2kb /usr/local/bin /usr/bin $opth:q)
set shrd2 = 0
breaksw
endsw
endif
while (1)
echo -n "Build v2k? [y/n]:"
set yn = $<
switch ($yn)
case {y,Y}*:
mk $*:q setup
mk $*:q apps -sttc
if ($shrd2) then
find . -name \*.o -exec rm {} \;
mk $*:q apps -shrd
endif
exit
case {n,N}*:
exit
endsw
end
endsw