Subversion Repositories Projects

Rev

Rev 2039 | Rev 2217 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2039 Rev 2040
1
#!/bin/sh
1
#!/bin/sh
2
#/****************************************************************************
2
#/****************************************************************************
3
# *   Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje               *
3
# *   Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje               *
4
# *   admiralcascade@gmail.com                                               *
4
# *   admiralcascade@gmail.com                                               *
5
# *   Project-URL: http://www.mylifesucks.de/oss/c-osd/                      *
5
# *   Project-URL: http://www.mylifesucks.de/oss/c-osd/                      *
6
# *                                                                          *
6
# *                                                                          *
7
# *   This program is free software; you can redistribute it and/or modify   *
7
# *   This program is free software; you can redistribute it and/or modify   *
8
# *   it under the terms of the GNU General Public License as published by   *
8
# *   it under the terms of the GNU General Public License as published by   *
9
# *   the Free Software Foundation; either version 2 of the License.         *
9
# *   the Free Software Foundation; either version 2 of the License.         *
10
# *                                                                          *
10
# *                                                                          *
11
# *   This program is distributed in the hope that it will be useful,        *
11
# *   This program is distributed in the hope that it will be useful,        *
12
# *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
12
# *   but WITHOUT ANY WARRANTY; without even the implied warranty of         *
13
# *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
13
# *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
14
# *   GNU General Public License for more details.                           *
14
# *   GNU General Public License for more details.                           *
15
# *                                                                          *
15
# *                                                                          *
16
# *   You should have received a copy of the GNU General Public License      *
16
# *   You should have received a copy of the GNU General Public License      *
17
# *   along with this program; if not, write to the                          *
17
# *   along with this program; if not, write to the                          *
18
# *   Free Software Foundation, Inc.,                                        *
18
# *   Free Software Foundation, Inc.,                                        *
19
# *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.              *
19
# *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.              *
20
# ****************************************************************************/
20
# ****************************************************************************/
21
 
21
 
22
DATE=`date +%Y%m%d-%H%M`
22
DATE=`date +%Y%m%d-%H%M`
23
#DATE="20090604-1350"
23
#DATE="20090604-1350"
24
REVISION=`svn info .. | awk '$1 == "Revision:" {print $2}'`
24
REVISION=`svn info .. | awk '$1 == "Revision:" {print $2}'`
25
 
25
 
26
# build pal hex
26
# build pal hex
27
export CFLAGS="-DBUILDDATE=\\\"${DATE}\\\" "
27
export CFLAGS="-DBUILDDATE=\\\"${DATE}\\\" "
28
make clean
28
make clean
29
make
29
make
30
mv C-OSD.hex C-OSD-${DATE}-pal.hex
30
mv C-OSD.hex C-OSD-${DATE}-pal.hex
31
 
31
 
32
# build ntsc hex
32
# build ntsc hex
33
export CFLAGS="-DNTSC=1 -DBUILDDATE=\\\"${DATE}\\\" "
33
export CFLAGS="-DNTSC=1 -DBUILDDATE=\\\"${DATE}\\\" "
34
make clean
34
make clean
35
make
35
make
36
mv C-OSD.hex C-OSD-${DATE}-ntsc.hex
36
mv C-OSD.hex C-OSD-${DATE}-ntsc.hex
37
 
37
 
38
#build pal hex FCONLY
38
#build pal hex FCONLY
39
export CFLAGS="-DFCONLY=1 -DBUILDDATE=\\\"${DATE}\\\" "
39
export CFLAGS="-DFCONLY=1 -DBUILDDATE=\\\"${DATE}\\\" "
40
make clean
40
make clean
41
make
41
make
42
mv C-OSD.hex C-OSD-${DATE}-pal-fconly.hex
42
mv C-OSD.hex C-OSD-${DATE}-pal-fconly.hex
43
 
43
 
44
# build ntsc hex FCONLY
44
# build ntsc hex FCONLY
45
export CFLAGS="-DNTSC=1 -DFCONLY=1 -DBUILDDATE=\\\"${DATE}\\\" "
45
export CFLAGS="-DNTSC=1 -DFCONLY=1 -DBUILDDATE=\\\"${DATE}\\\" "
46
make clean
46
make clean
47
make
47
make
48
mv C-OSD.hex C-OSD-${DATE}-ntsc-fconly.hex
48
mv C-OSD.hex C-OSD-${DATE}-ntsc-fconly.hex
49
 
49
 
50
 
50
 
51
# build character files
51
# build character files
52
# PAL
52
# PAL
53
make clean
53
make clean
54
export CFLAGS="-DWRITECHARS=1 -DBUILDDATE=\\\"${DATE}\\\" "
54
export CFLAGS="-DWRITECHARS=1 -DBUILDDATE=\\\"${DATE}\\\" "
55
make
55
make
56
mv C-OSD.hex C-OSD-characters-pal.hex
56
mv C-OSD.hex C-OSD-characters-pal.hex
57
 
57
 
58
# and NTSC as well
58
# and NTSC as well
59
make clean
59
make clean
60
export CFLAGS="-DNTSC=1 -DWRITECHARS=1 -DBUILDDATE=\\\"${DATE}\\\" "
60
export CFLAGS="-DNTSC=1 -DWRITECHARS=1 -DBUILDDATE=\\\"${DATE}\\\" "
61
make
61
make
62
mv C-OSD.hex C-OSD-characters-ntsc.hex
62
mv C-OSD.hex C-OSD-characters-ntsc.hex
63
 
63
 
64
 
64
 
65
 
65
 
66
# clean up
66
# clean up
67
make clean
67
make clean
68
 
68
 
69
md5sum *.hex
69
md5sum *.hex
70
 
70
 
71
# pack all stuff
71
# pack all stuff
72
mkdir C-OSD-${DATE}
72
mkdir C-OSD-${DATE}
73
mv *.hex C-OSD-${DATE}
73
mv *.hex C-OSD-${DATE}
74
cp ../CHANGE.LOG C-OSD-${DATE}
74
cp ../CHANGE.LOG C-OSD-${DATE}
75
cp ../LICENSE.TXT C-OSD-${DATE}
75
cp ../LICENSE.TXT C-OSD-${DATE}
76
cp ../README.TXT C-OSD-${DATE}
76
cp ../README.TXT C-OSD-${DATE}
-
 
77
cp ../flash-usbasp.bat C-OSD-${DATE}
-
 
78
 
77
zip -r -9 -q C-OSD-${DATE}.zip C-OSD-${DATE}
79
zip -r -9 -q C-OSD-${DATE}.zip C-OSD-${DATE}
78
rm -rf C-OSD-${DATE}
80
rm -rf C-OSD-${DATE}
79
 
81
 
80
du -h C-OSD-${DATE}.zip
82
du -h C-OSD-${DATE}.zip
81
echo "building based on revision $REVISION is now DONE..."
83
echo "building based on revision $REVISION is now DONE..."
82
 
84