File: crosscompile.sh

package info (click to toggle)
spring 106.0%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 55,316 kB
  • sloc: cpp: 543,954; ansic: 44,800; python: 12,575; java: 12,201; awk: 5,889; sh: 1,796; asm: 1,546; xml: 655; perl: 405; php: 211; objc: 194; makefile: 76; sed: 2
file content (30 lines) | stat: -rwxr-xr-x 755 bytes parent folder | download | duplicates (7)
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

#for cross-compiling install gcc-mingw32 >=4.4
#at ubuntu lucid this is the default

cd ../../../..

SPRINGSRC=`pwd`

echo output will be in ${SPRINGSRC}/dist

if [ ! -f win32.cmake ] ; then
cat > win32.cmake <<EOF
SET(CMAKE_SYSTEM_NAME Windows)
SET(CMAKE_C_COMPILER i586-mingw32msvc-gcc)
SET(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
SET(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc)
SET(MINGWLIBS ${SPRINGSRC}/mingwlibs)
SET(CMAKE_INSTALL_PREFIX  ${SPRINGSRC}/dist)
EOF
fi

if [ ! -d mingwlibs ]; then
	git clone git://github.com/spring/mingwlibs
	cd mingwlibs
	git checkout remotes/origin/boost_1.42.0_mingw_4.4.2
	git checkout boost_1.42.0_mingw_4.4.2
fi
cd ${SPRINGSRC}
cmake ${SPRINGSRC} "-DCMAKE_TOOLCHAIN_FILE=${SPRINGSRC}/win32.cmake"
make install