-
Notifications
You must be signed in to change notification settings - Fork 6
/
mingw-setup
executable file
·53 lines (39 loc) · 1.05 KB
/
mingw-setup
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
#!/bin/bash
set -e
makefiles=(ici ltp dgr bssp bpv6 bpv7 tc nm cfdp ams bss dtpc restart)
ismingw=`uname | awk '{print match($0, "MINGW")}'`
if [ $ismingw -eq 1 ]; then
echo "Configuring ION for compilation under MINGW..."
else
echo "This setup is only for use under MINGW!"
exit
fi
if [ -a Makefile ] ; then
mv Makefile Makefile.saved
fi
cp Makefile.winion Makefile
cp /bin/make.exe /bin/gmake.exe
mkdir -p /local/bin
mkdir -p /local/lib
mkdir -p /local/include
mkdir -p /local/man/man1
mkdir -p /local/man/man3
mkdir -p /local/man/man5
for f in ${makefiles[@]}; do
fname=`echo "$f/Makefile"`
fnameold=`echo "$fname.old"`
cp `echo $fname $fnameold`
awk '
{
if($1=="PLATFORMS")
$3="i86-mingw"
print $0
}
' $fnameold > $fname
rm $fnameold
done
# move mingw makefile for libbloom
cp ici/libbloom-master/Makefile ici/libbloom-master/Makefile.saved
cp ici/libbloom-master/Makefile.winion ici/libbloom-master/Makefile
echo -e "export PATH=/local/bin:/local/lib:/c/DTN/test:\$PATH\nalias ll='ls -l'\nalias vi='vim'" >> ~/.profile
source ~/.profile