File: mk-release-win

package info (click to toggle)
links2 2.29-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,852 kB
  • sloc: ansic: 181,859; sh: 2,585; cpp: 1,450; makefile: 84; awk: 49; perl: 34
file content (61 lines) | stat: -rwxr-xr-x 1,691 bytes parent folder | download | duplicates (2)
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
#!/bin/sh
set -e
cp ../links-current/links*.nsi ../links-current/certs/links.crt ../links-current/COPYING ../links-current/BRAILLE_HOWTO ../links-current/KEYS ../links-current/README .
cp ../links-current/linkswin.ico links.ico
unix2dos COPYING BRAILLE_HOWTO KEYS README
CC=gcc
export CC
if [ -n "$NO_LTO" ]; then
	LTO_ARGS=""
else
	if $CC -v 2>&1|grep -q '4\.5'; then
		LTO_ARGS="-flto -fwhole-program"
	else
		LTO_ARGS="-flto=12 -fwhole-program"
	fi
fi
if [ "`uname -m`" != x86_64 ]; then
	ARCH_CFLAGS="-O2 -march=pentiumpro -mtune=generic"
else
	ARCH_CFLAGS="-O2 -mtune=generic"
fi
CFLAGS="-DWINDOWS_RELEASE $ARCH_CFLAGS $LTO_ARGS -shared-libgcc -Wall -W -Wno-unused-parameter -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes"
export CFLAGS
windres --preprocessor cat -O coff ../links-current/linkswin.rc linkswin.res
LIBS=../linkswin.res
export LIBS

LDFLAGS=""
export LDFLAGS
mkdir -p links-text
cd links-text
if [ ! -f config.h -o ! -f Makefile ]; then
	../../links-current/configure --enable-utf8 --disable-graphics --without-x --enable-debuglevel=0
fi
make -j12
cp links.exe ..
cd ..

LDFLAGS=""
export LDFLAGS
mkdir -p links-graphics
cd links-graphics
if [ ! -f config.h -o ! -f Makefile ]; then
	CPPFLAGS="-DUSE_WIN32_HEAP"
	export CPPFLAGS
	../../links-current/configure --disable-utf8 --enable-graphics --without-x --enable-debuglevel=0
fi
make -j12 LDFLAGS="-mwindows"
cp links.exe ../links-g.exe
cd ..

mkdir -p dll
cp /bin/cygwin1.dll dll
strip links.exe links-g.exe
#dll/cygwin1.dll

if [ "`uname -m`" != x86_64 ]; then
	/cygdrive/c/Program\ Files\ \(x86\)/NSIS/makensis.exe links.nsi
else
	/cygdrive/c/Program\ Files\ \(x86\)/NSIS/makensis.exe links64.nsi
fi