Add build support for win32 on cygwin (gcc3).
[gnushogi.git] / misc / mkmakefile.mingw-on-cygwin
1 #!/bin/sh
2 set -e
3
4 # Script to generate cygwin.make from Makefile.in, to build a standard
5 # win32 binary from a cygwin shell.
6 #
7 # Copyright (c) 2013 Yann Dirson and the Free Software Foundation
8 #
9 # This file is part of GNU Shogi.
10 #
11 # GNU Shogi is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either ../version 3 of the License, or (at your option)
14 # any later ../version.
15 #
16 # GNU Shogi is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with GNU Shogi; see the file COPYING.
23 # If not, see <http://www.gnu.org/licenses/>.
24
25 mkdir -p win32
26 cat <<'EOF' | sed -f - gnushogi/Makefile.in > win32/Makefile
27 s,@INSTALL@,/usr/bin/install -c,
28 s,@INSTALL_DATA@,${INSTALL} -m 644,
29 s,@INSTALL_PROGRAM@,${INSTALL},
30 s,@prefix@,/usr/local,
31 s,@LIBCURSES@,,
32 s,@CURSESDSP@,,
33 s,@CC@,gcc,
34 s,@WARNINGS@,-Wall -Wno-implicit-int -Wstrict-prototypes -ansi -pedantic,
35 s,@CFLAGS@,-g -O2 -mno-cygwin -fsigned-char -funroll-loops,
36 s,@CEXTRAFLAGS@,,
37 s,@LDFLAGS@,,
38 s,@top_srcdir@,..,
39 s,@top_builddir@,.,
40 s,@srcdir@,../gnushogi,
41 s,@PROGNAME@,gnushogi,
42 s,^LIBS *= *-lm$,#\0,
43 EOF