27 |
# SUCH DAMAGE. |
# SUCH DAMAGE. |
28 |
# |
# |
29 |
# |
# |
30 |
# $Id: configure,v 1.119 2005/03/14 12:13:49 debug Exp $ |
# $Id: configure,v 1.123 2005/04/17 01:42:21 debug Exp $ |
31 |
# |
# |
32 |
# This is a minimal configure script, hardcoded for GXemul. This script |
# This is a minimal configure script, hardcoded for GXemul. This script |
33 |
# figures out which compiler flags will work, and creates Makefiles in |
# figures out which compiler flags will work, and creates Makefiles in |
54 |
# |
# |
55 |
############################################################################### |
############################################################################### |
56 |
|
|
57 |
ENABLEALPHA=YES |
ENABLEALPHA=NO |
58 |
ENABLEHPPA=YES |
ENABLEHPPA=NO |
59 |
ENABLEMIPS=YES |
ENABLEMIPS=YES |
60 |
ENABLEPPC=YES |
ENABLEPPC=YES |
61 |
ENABLESPARC=YES |
ENABLESPARC=NO |
62 |
ENABLEURISC=YES |
ENABLEURISC=YES |
63 |
|
ENABLEX86=NO |
64 |
|
|
65 |
if [ z"$*" != z ]; then |
if [ z"$*" != z ]; then |
66 |
# Parse command line options: |
# Parse command line options: |
73 |
NOBINTRANS=YES |
NOBINTRANS=YES |
74 |
else if [ z$a = z--enable-mips16 ]; then |
else if [ z$a = z--enable-mips16 ]; then |
75 |
MIPS16=YES |
MIPS16=YES |
76 |
else if [ z$a = z--disable-alpha ]; then |
else if [ z$a = z--enable-alpha ]; then |
77 |
ENABLEALPHA=NO |
ENABLEALPHA=YES |
78 |
else if [ z$a = z--disable-hppa ]; then |
else if [ z$a = z--enable-hppa ]; then |
79 |
ENABLEHPPA=NO |
ENABLEHPPA=YES |
80 |
else if [ z$a = z--disable-mips ]; then |
else if [ z$a = z--disable-mips ]; then |
81 |
ENABLEMIPS=NO |
ENABLEMIPS=NO |
82 |
else if [ z$a = z--disable-ppc ]; then |
else if [ z$a = z--disable-ppc ]; then |
83 |
ENABLEPPC=NO |
ENABLEPPC=NO |
84 |
else if [ z$a = z--disable-sparc ]; then |
else if [ z$a = z--enable-sparc ]; then |
85 |
ENABLESPARC=NO |
ENABLESPARC=YES |
86 |
else if [ z$a = z--disable-urisc ]; then |
else if [ z$a = z--disable-urisc ]; then |
87 |
ENABLEURISC=NO |
ENABLEURISC=NO |
88 |
|
else if [ z$a = z--enable-x86 ]; then |
89 |
|
ENABLEX86=YES |
90 |
else if [ z$a = z--enable-delays ]; then |
else if [ z$a = z--enable-delays ]; then |
91 |
DELAYS=YES |
DELAYS=YES |
92 |
else if [ z$a = z--enable-caches ]; then |
else if [ z$a = z--enable-caches ]; then |
105 |
echo " --enable-delays enable instruction" \ |
echo " --enable-delays enable instruction" \ |
106 |
"latency/delay emulation" |
"latency/delay emulation" |
107 |
echo " --disable-x don't include X11 support" |
echo " --disable-x don't include X11 support" |
108 |
printf "\nCPU selection options:\n" |
printf "\nCPU selection options: (most of these" |
109 |
echo " --disable-alpha disable Alpha CPU emulation" |
printf " are experimental)\n" |
110 |
echo " --disable-hppa disable HPPA CPU emulation" |
echo " --enable-alpha enable Alpha CPU emulation" |
111 |
|
echo " --enable-hppa enable HPPA CPU emulation" |
112 |
echo " --disable-mips disable MIPS CPU emulation" |
echo " --disable-mips disable MIPS CPU emulation" |
113 |
echo " --disable-ppc disable PPC CPU emulation" |
echo " --disable-ppc disable PPC CPU emulation" |
114 |
echo " --disable-sparc disable SPARC CPU emulation" |
echo " --enable-sparc enable SPARC CPU emulation" |
115 |
echo " --disable-urisc disable URISC CPU emulation" |
echo " --disable-urisc disable URISC CPU emulation" |
116 |
|
echo " --enable-x86 enable x86 CPU emulation" |
117 |
printf "\nMIPS-specific options:\n" |
printf "\nMIPS-specific options:\n" |
118 |
echo " --enable-mips16 enable MIPS16 instruction" \ |
echo " --enable-mips16 enable MIPS16 instruction" \ |
119 |
"support (experimental)" |
"support (experimental)" |
124 |
echo "Run $0 --help to get a list of" \ |
echo "Run $0 --help to get a list of" \ |
125 |
"available options." |
"available options." |
126 |
exit |
exit |
127 |
fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi |
fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi; fi |
128 |
done |
done |
129 |
fi |
fi |
130 |
|
|
167 |
fi |
fi |
168 |
if [ z$ENABLEALPHA = zYES ]; then |
if [ z$ENABLEALPHA = zYES ]; then |
169 |
printf "#define ENABLE_ALPHA\n" >> config.h |
printf "#define ENABLE_ALPHA\n" >> config.h |
|
else |
|
|
echo 'Disabling Alpha emulation support.' |
|
170 |
fi |
fi |
171 |
if [ z$ENABLEHPPA = zYES ]; then |
if [ z$ENABLEHPPA = zYES ]; then |
172 |
printf "#define ENABLE_HPPA\n" >> config.h |
printf "#define ENABLE_HPPA\n" >> config.h |
|
else |
|
|
echo 'Disabling HPPA emulation support.' |
|
173 |
fi |
fi |
174 |
if [ z$ENABLEMIPS = zYES ]; then |
if [ z$ENABLEMIPS = zYES ]; then |
175 |
printf "#define ENABLE_MIPS\n" >> config.h |
printf "#define ENABLE_MIPS\n" >> config.h |
|
else |
|
|
echo 'Disabling MIPS emulation support.' |
|
176 |
fi |
fi |
177 |
if [ z$ENABLEPPC = zYES ]; then |
if [ z$ENABLEPPC = zYES ]; then |
178 |
printf "#define ENABLE_PPC\n" >> config.h |
printf "#define ENABLE_PPC\n" >> config.h |
|
else |
|
|
echo 'Disabling PPC emulation support.' |
|
179 |
fi |
fi |
180 |
if [ z$ENABLESPARC = zYES ]; then |
if [ z$ENABLESPARC = zYES ]; then |
181 |
printf "#define ENABLE_SPARC\n" >> config.h |
printf "#define ENABLE_SPARC\n" >> config.h |
|
else |
|
|
echo 'Disabling SPARC emulation support.' |
|
182 |
fi |
fi |
183 |
if [ z$ENABLEURISC = zYES ]; then |
if [ z$ENABLEURISC = zYES ]; then |
184 |
printf "#define ENABLE_URISC\n" >> config.h |
printf "#define ENABLE_URISC\n" >> config.h |
185 |
else |
fi |
186 |
echo 'Disabling URISC emulation support.' |
if [ z$ENABLEX86 = zYES ]; then |
187 |
|
printf "#define ENABLE_X86\n" >> config.h |
188 |
fi |
fi |
189 |
|
|
190 |
|
|
1035 |
|
|
1036 |
############################################################################### |
############################################################################### |
1037 |
|
|
1038 |
INCLUDE=-I../include/ |
INCLUDE=-Iinclude/ |
1039 |
|
DINCLUDE=-I../include/ |
1040 |
|
|
1041 |
echo C compiler flags: $CFLAGS $CWARNINGS $INCLUDE |
echo C compiler flags: $CFLAGS $CWARNINGS |
1042 |
echo Linker flags: $OTHERLIBS |
echo Linker flags: $OTHERLIBS |
1043 |
echo "CWARNINGS=$CWARNINGS" >> _Makefile.header |
echo "CWARNINGS=$CWARNINGS" >> _Makefile.header |
1044 |
echo "COPTIM=$CFLAGS" >> _Makefile.header |
echo "COPTIM=$CFLAGS" >> _Makefile.header |
1045 |
echo "INCLUDE=$INCLUDE" >> _Makefile.header |
echo "INCLUDE=$INCLUDE" >> _Makefile.header |
1046 |
|
echo "DINCLUDE=$DINCLUDE" >> _Makefile.header |
1047 |
echo "CC=$CC" >> _Makefile.header |
echo "CC=$CC" >> _Makefile.header |
1048 |
echo "OTHERLIBS=$OTHERLIBS" >> _Makefile.header |
echo "OTHERLIBS=$OTHERLIBS" >> _Makefile.header |
1049 |
echo "" >> _Makefile.header |
echo "" >> _Makefile.header |
1204 |
|
|
1205 |
# Create the Makefiles: |
# Create the Makefiles: |
1206 |
|
|
1207 |
for a in . src devices devices/fonts tests; do |
for a in . src src/devices src/devices/fonts tests; do |
1208 |
echo "creating $a/Makefile" |
echo "creating $a/Makefile" |
1209 |
touch $a/Makefile |
touch $a/Makefile |
1210 |
cat _Makefile.header > $a/Makefile |
cat _Makefile.header > $a/Makefile |