summaryrefslogtreecommitdiff
path: root/build.sh
blob: 2f20b661eecba60387635c3cb880aec3ac9532e5 (plain) (blame)
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
62
63
64
65
66
67
68
69
#!/usr/bin/env bash
export CROSS=i686-w64-mingw32.shared
cross_req="cc smpeg ffmpeg sdl sdl_image sdl_ttf sdl_net sdl_gfx libxml2 curl libpng zlib gettext sdl_mixer"


inf()
{
    echo "*** sys-info *** >---------------------------------------------------"
    uname -a
    echo "req. gcc:         `which gcc`"
    echo "req. g++:         `which g++`"
    echo "req. python:      `which python`"
    echo "req. autoconf:    `which autoconf`"
    echo "req. automake:    `which automake`"
    echo "req. autopoint:   `which autopoint`"
    echo "req. bash:        `which bash`"
    echo "req. bison:       `which bison`"
    echo "req. bzip2:       `which bzip2`"
    echo "req. flex:        `which flex`"
    echo "req. gettext:     `which gettext`"
    echo "req. git:         `which git`"
    echo "req. gperf:       `which gperf`"
    echo "req. intltool:    `which intltoolize`" 
    echo "req. libtool-bin: `which libtool`"
    echo "req. lzip:        `which lzip`"
    echo "req. make:        `which make`"
    echo "req. openssl:     `which openssl`"
    echo "req. p7zip-full:  `which p7zip`"
    echo "req. patch:       `which patch`"
    echo "req. perl:        `which perl`"
    echo "req. ruby:        `which ruby`"
    echo "req. sed:         `which sed`"
    echo "req. unzip:       `which unzip`"
    echo "req. wget:        `which wget`"
    echo "req. xz-utils:    `which lzma`"
    echo "*** sys-info *** <---------------------------------------------------"
}

mxe()
{
    echo "*** mxe-build >------------------------------------------------------"
    cd /
    git clone https://github.com/mxe/mxe.git
    cd mxe
    
    echo "MXE_TARGETS := ${CROSS}" > settings.mk
    echo "LOCAL_PKG_LIST := ${cross_req}" >> settings.mk
    echo ".DEFAULT_GOAL  := local-pkg-list" >> settings.mk
    echo 'local-pkg-list: $(LOCAL_PKG_LIST)' >> settings.mk

    git apply ../mxe.patch || exit 1

    make || exit 1
    make clean-junk || exit 1 # disc space!
    echo "*** mxe-build <------------------------------------------------------"
}


test_mxe()
{
    export PATH=/mxe/usr/bin:/mxe/usr/${CROSS}/bin:$PATH
    echo `${CROSS}-gcc --version`
    echo `${CROSS}-g++ --version`
    echo "${PATH}"
}

inf
mxe
test_mxe