forked from andoma/movian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.wii
executable file
·104 lines (87 loc) · 2.24 KB
/
configure.wii
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/bin/bash
#
# HTS configure script for Nintendo wii with devkitpro
#
# Copyright (c) 2005-2008 Andreas Öman
#
# Based on FFmpeg's configure script:
#
# Copyright (c) 2000-2002 Fabrice Bellard
# Copyright (c) 2005-2008 Diego Biurrun
# Copyright (c) 2005-2008 Mans Rullgard
#
PLATFORM="wii"
OSENV="wii"
DEFAULT_UI="glw"
source support/configure.inc
DEVKITPRO="${TOPDIR}/wiisupport/devkitpro"
LIBFREETYPEPATH="${TOPDIR}/wiisupport/freetype-ppc"
enable tinysmb
enable dvd
enable dvd_wii
show_help(){
common_help
echo " --devkitpro=PATH Path to devkitpro [$DEVKITPRO]"
echo " --freetype=PATH Path to freetype [$LIBFREETYPEPATH]"
exit 1
}
for opt do
optval="${opt#*=}"
case "$opt" in
--help) show_help
;;
--devkitpro=*) DEVKITPRO="$optval"
;;
--freetype=*) LIBFREETYPEPATH="$optval"
;;
*)
common_opt $opt $optval
esac
done
setup_env "$@"
enable libogc
enable glw_frontend_wii
enable glw_backend_gx
enable glw
DEVKITPPC=${DEVKITPRO}/devkitPPC
LIBOGC=${DEVKITPRO}/libogc
PORTLIBS=${DEVKITPRO}/portlibs/ppc
cat >> ${CONFIG_MAK} <<EOF
CC=${DEVKITPPC}/bin/powerpc-eabi-gcc
STRIP=${DEVKITPPC}/bin/powerpc-eabi-strip
CFLAGS_cfg += -I${LIBOGC}/include -I${PORTLIBS}/include
CFLAGS_cfg += -DWII -DEABI -mrvl -mcpu=750 -meabi -mhard-float
LDFLAGS_cfg += -DEABI -mrvl -mcpu=750 -meabi -mhard-float
EOF
#
# tinysmb
#
if enabled tinysmb; then
echo >>${CONFIG_MAK} "LDFLAGS_cfg += -ltinysmb"
fi
#
# configure ffmpeg
#
setup_ffmpeg --extra-cflags="-I${LIBOGC}/include -I${PORTLIBS}/include -D__LARGE64_FILES -include ${TOPDIR}/support/nostrictansi.h" \
--extra-ldflags="-L${DEVKITPRO}/libogc/lib/wii -L${PORTLIBS}/lib" \
--cross-prefix=${DEVKITPPC}/bin/powerpc-eabi- \
--enable-cross-compile \
--arch=powerpc \
--target-os=none \
--cpu=750 \
--disable-altivec \
--enable-small \
--disable-decoder=twinvq \
--disable-decoder=snow \
--disable-decoder=cavs
#
#
#
cat >> ${CONFIG_MAK} <<EOF
LDFLAGS_cfg += -L${PORTLIBS}/lib -lz
LDFLAGS_cfg += -L${LIBFREETYPEPATH}/lib -lfreetype
CFLAGS_cfg += -I${LIBFREETYPEPATH}/include -DWORDS_BIGENDIAN
CFLAGS_cfg += -I${LIBFREETYPEPATH}/include/freetype2
LDFLAGS_cfg += -L${DEVKITPRO}/libogc/lib/wii -lfat -ldi -lwiikeyboard -lwiiuse -lbte -logc
EOF
finalize