forked from libretro/fbalpha2012
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile_libretro.sh
executable file
·107 lines (93 loc) · 1.63 KB
/
compile_libretro.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
#!/bin/sh
FORMAT=libretro
SRC_DIR=svn-current/trunk/
#******************
# PROGRAM FUNCTIONS
#******************
clean()
{
cd $SRC_DIR
make -f makefile.libretro clean
}
make_libretro()
{
cd $SRC_DIR
make -f makefile.libretro -j4
}
make_debug()
{
cd $SRC_DIR
make -f makefile.libretro -j4 DEBUG=1
}
#******************
# DISPLAY FUNCTIONS
#******************
title()
{
echo ""
echo "***********************"
echo "COMPILER SCRIPT FOR $FORMAT"
echo "***********************"
}
display_clean()
{
echo "clean Clean the object files"
}
display_make()
{
echo "make Compile libretro library"
}
display_make_debug()
{
echo "make_debug Compile DEBUG libretro library"
}
display_all_options()
{
display_clean
display_make
display_make_debug
}
display_usage()
{
echo "Usage: compile_libretro.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" ]; then
echo ""
echo "*************************************"
echo "DOING:"
display_clean
echo "*************************************"
clean
fi
if [ "$i" = "make" ]; then
echo ""
echo "*************************************"
echo "DOING:"
display_make
echo "*************************************"
make_libretro
fi
if [ "$i" = "make_debug" ]; then
echo ""
echo "*************************************"
echo "DOING:"
display_make
echo "*************************************"
make_debug
fi
done
fi