forked from libretro/fceu-next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile_libsnes.sh
executable file
·160 lines (141 loc) · 3.03 KB
/
compile_libsnes.sh
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#!/bin/sh
FORMAT=libsnes
START_DIR=`pwd`
#******************
# PROGRAM FUNCTIONS
#******************
function clean_fceux()
{
make -f Makefile.libsnes-fceux clean
}
function clean_fceumm()
{
make -f Makefile.libsnes-fceumm clean
}
function make_libsnes_fceumm()
{
make -f Makefile.libsnes-fceumm
}
function make_libsnes_fceumm_debug()
{
make -f Makefile.libsnes-fceumm DEBUG=1
}
function make_libsnes_fceux()
{
make -f Makefile.libsnes-fceux
}
function make_libsnes_fceux_debug()
{
make -f Makefile.libsnes-fceux DEBUG=1
}
#******************
# DISPLAY FUNCTIONS
#******************
function title()
{
echo ""
echo "***********************"
echo "COMPILER SCRIPT FOR $FORMAT"
echo "***********************"
}
function display_clean_fceumm()
{
echo "clean_fceumm Clean the object files"
}
function display_clean_fceux()
{
echo "clean_fceux Clean the object files"
}
function display_make_fceux()
{
echo "make_fceux Compile libsnes library for FCEUx"
}
function display_make_fceux_debug()
{
echo "make_fceux_debug Compile DEBUG libsnes library for FCEUx"
}
function display_make_fceumm()
{
echo "make_fceumm Compile libsnes library for FCEUmm"
}
function display_make_fceumm_debug()
{
echo "make_fceumm_debug Compile DEBUG libsnes library for FCEUmm"
}
function display_all_options()
{
display_clean_fceux
display_clean_fceumm
display_make_fceux
display_make_fceux_debug
display_make_fceumm
display_make_fceumm_debug
}
function display_usage()
{
echo "Usage: compile_libsnes.sh [options]"
echo "Options:"
display_all_options
}
#***********************
# MAIN CONTROL FLOW LOOP
#***********************
title
if [ ! -n "$1" ]; then
display_usage
else
for i in "$@"
do
if [ "$i" = "help" ]; then
display_usage
fi
if [ "$i" = "clean_fceux" ]; then
echo ""
echo "*************************************"
echo "DOING:"
display_clean_fceux
echo "*************************************"
clean_fceux
fi
if [ "$i" = "clean_fceumm" ]; then
echo ""
echo "*************************************"
echo "DOING:"
display_clean_fceumm
echo "*************************************"
clean_fceumm
fi
if [ "$i" = "make_fceux" ]; then
echo ""
echo "*************************************"
echo "DOING:"
display_make_fceux
echo "*************************************"
make_libsnes_fceux
fi
if [ "$i" = "make_fceux_debug" ]; then
echo ""
echo "*************************************"
echo "DOING:"
display_make_fceux_debug
echo "*************************************"
make_libsnes_fceux_debug
fi
if [ "$i" = "make_fceumm" ]; then
echo ""
echo "*************************************"
echo "DOING:"
display_make_fceumm
echo "*************************************"
make_libsnes_fceumm
fi
if [ "$i" = "make_fceumm_debug" ]; then
echo ""
echo "*************************************"
echo "DOING:"
display_make_fceumm_debug
echo "*************************************"
make_libsnes_fceumm_debug
fi
done
fi