Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 105 lines (87 sloc) 2.295 kb
78128db @andoma Showtime build system revamp
andoma authored
1 #!/bin/bash
2 #
3 # HTS configure script for Nintendo wii with devkitpro
4 #
5 # Copyright (c) 2005-2008 Andreas Öman
6 #
7 # Based on FFmpeg's configure script:
8 #
9 # Copyright (c) 2000-2002 Fabrice Bellard
10 # Copyright (c) 2005-2008 Diego Biurrun
11 # Copyright (c) 2005-2008 Mans Rullgard
12 #
13
079e2fd @andoma Fix wii target compilation
andoma authored
14 PLATFORM="wii"
f63e435 @andoma Fix compilation on Wii.
andoma authored
15 OSENV="wii"
a374163 @andoma Make place for other POSIX OSes in the configure scriptery.
andoma authored
16 DEFAULT_UI="glw"
78128db @andoma Showtime build system revamp
andoma authored
17
079e2fd @andoma Fix wii target compilation
andoma authored
18 source support/configure.inc
eadd26e @andoma Make it compile on Wii again. While at it, add instructions in README of...
andoma authored
19 DEVKITPRO="${TOPDIR}/wiisupport/devkitpro"
20 LIBFREETYPEPATH="${TOPDIR}/wiisupport/freetype-ppc"
78128db @andoma Showtime build system revamp
andoma authored
21
4be2a9e @andoma Add support for libtinysmb on wii
andoma authored
22 enable tinysmb
0abe094 @andoma Initial stab of DVD drive support on Wii
andoma authored
23 enable dvd
1b84180 @andoma Add support for playing DVD on Wii
andoma authored
24 enable dvd_wii
78128db @andoma Showtime build system revamp
andoma authored
25
26 show_help(){
068189b @andoma Move some of the configure-help to common code
andoma authored
27 common_help
28 echo " --devkitpro=PATH Path to devkitpro [$DEVKITPRO]"
29 echo " --freetype=PATH Path to freetype [$LIBFREETYPEPATH]"
78128db @andoma Showtime build system revamp
andoma authored
30 exit 1
31 }
32
33 for opt do
34 optval="${opt#*=}"
35 case "$opt" in
36 --help) show_help
37 ;;
38 --devkitpro=*) DEVKITPRO="$optval"
39 ;;
40 --freetype=*) LIBFREETYPEPATH="$optval"
41 ;;
e77ad14 @andoma Cleanup configure framework a bit. Warn if user tries to enter options w...
andoma authored
42 *)
43 common_opt $opt $optval
78128db @andoma Showtime build system revamp
andoma authored
44 esac
45 done
46
4c3cd71 @andoma Don't just put configure arguments as comment in config.mak. Instead set...
andoma authored
47 setup_env "$@"
78128db @andoma Showtime build system revamp
andoma authored
48
49 enable libogc
50 enable glw_frontend_wii
51 enable glw_backend_gx
52 enable glw
53
54 DEVKITPPC=${DEVKITPRO}/devkitPPC
55 LIBOGC=${DEVKITPRO}/libogc
a0fcfb0 @andoma Up wii target to latest devkitpro and libogc
andoma authored
56 PORTLIBS=${DEVKITPRO}/portlibs/ppc
78128db @andoma Showtime build system revamp
andoma authored
57
58 cat >> ${CONFIG_MAK} <<EOF
b80bdbb @andoma Update to devkitPPC r18
andoma authored
59 CC=${DEVKITPPC}/bin/powerpc-eabi-gcc
60 STRIP=${DEVKITPPC}/bin/powerpc-eabi-strip
78128db @andoma Showtime build system revamp
andoma authored
61
a0fcfb0 @andoma Up wii target to latest devkitpro and libogc
andoma authored
62 CFLAGS_cfg += -I${LIBOGC}/include -I${PORTLIBS}/include
3cf5783 @andoma Fix WII compile problems
andoma authored
63 CFLAGS_cfg += -DWII -DEABI -mrvl -mcpu=750 -meabi -mhard-float
78128db @andoma Showtime build system revamp
andoma authored
64
b80bdbb @andoma Update to devkitPPC r18
andoma authored
65 LDFLAGS_cfg += -DEABI -mrvl -mcpu=750 -meabi -mhard-float
78128db @andoma Showtime build system revamp
andoma authored
66 EOF
67
68
4be2a9e @andoma Add support for libtinysmb on wii
andoma authored
69 #
70 # tinysmb
71 #
72 if enabled tinysmb; then
73 echo >>${CONFIG_MAK} "LDFLAGS_cfg += -ltinysmb"
74 fi
78128db @andoma Showtime build system revamp
andoma authored
75
76
77 #
78 # configure ffmpeg
79 #
dcb2df8 @andoma Fix compile of ffmpeg on wii
andoma authored
80 setup_ffmpeg --extra-cflags="-I${LIBOGC}/include -I${PORTLIBS}/include -D__LARGE64_FILES -include ${TOPDIR}/support/nostrictansi.h" \
a0fcfb0 @andoma Up wii target to latest devkitpro and libogc
andoma authored
81 --extra-ldflags="-L${DEVKITPRO}/libogc/lib/wii -L${PORTLIBS}/lib" \
b80bdbb @andoma Update to devkitPPC r18
andoma authored
82 --cross-prefix=${DEVKITPPC}/bin/powerpc-eabi- \
78128db @andoma Showtime build system revamp
andoma authored
83 --enable-cross-compile \
84 --arch=powerpc \
d8fe74f @andoma Fix compile on wii
andoma authored
85 --target-os=none \
78128db @andoma Showtime build system revamp
andoma authored
86 --cpu=750 \
7766484 @andoma add --enable-small for ffmpeg. Also skip a few very obscure buy huge cod...
andoma authored
87 --disable-altivec \
88 --enable-small \
89 --disable-decoder=twinvq \
90 --disable-decoder=snow \
91 --disable-decoder=cavs
78128db @andoma Showtime build system revamp
andoma authored
92
079e2fd @andoma Fix wii target compilation
andoma authored
93 #
f63e435 @andoma Fix compilation on Wii.
andoma authored
94 #
079e2fd @andoma Fix wii target compilation
andoma authored
95 #
f63e435 @andoma Fix compilation on Wii.
andoma authored
96 cat >> ${CONFIG_MAK} <<EOF
a0fcfb0 @andoma Up wii target to latest devkitpro and libogc
andoma authored
97 LDFLAGS_cfg += -L${PORTLIBS}/lib -lz
f63e435 @andoma Fix compilation on Wii.
andoma authored
98 LDFLAGS_cfg += -L${LIBFREETYPEPATH}/lib -lfreetype
0abe094 @andoma Initial stab of DVD drive support on Wii
andoma authored
99 CFLAGS_cfg += -I${LIBFREETYPEPATH}/include -DWORDS_BIGENDIAN
f63e435 @andoma Fix compilation on Wii.
andoma authored
100 CFLAGS_cfg += -I${LIBFREETYPEPATH}/include/freetype2
be70d46 @andoma Setup devkitpro as most people do
andoma authored
101 LDFLAGS_cfg += -L${DEVKITPRO}/libogc/lib/wii -lfat -ldi -lwiikeyboard -lwiiuse -lbte -logc
079e2fd @andoma Fix wii target compilation
andoma authored
102 EOF
78128db @andoma Showtime build system revamp
andoma authored
103
f63e435 @andoma Fix compilation on Wii.
andoma authored
104 finalize
Something went wrong with that request. Please try again.