27 |
# SUCH DAMAGE. |
# SUCH DAMAGE. |
28 |
# |
# |
29 |
# |
# |
30 |
# $Id: configure,v 1.270 2007/06/15 17:13:40 debug Exp $ |
# $Id: configure,v 1.277 2007/08/29 20:36:05 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 |
112 |
# Figure out if VERSION should be defined. |
# Figure out if VERSION should be defined. |
113 |
X=`basename \`pwd\`|cut -d \- -f 2-` |
X=`basename \`pwd\`|cut -d \- -f 2-` |
114 |
if [ z"$X" = zgxemul ]; then |
if [ z"$X" = zgxemul ]; then |
115 |
echo '/* No VERSION defined. */' >> config.h |
printf "#define VERSION \"(unknown version)\"\n" >> config.h |
116 |
else |
else |
117 |
printf "#define VERSION \"$X\"\n" >> config.h |
printf "#define VERSION \"$X\"\n" >> config.h |
118 |
fi |
fi |
161 |
CPU_TOOLS="$CPU_TOOLS generate_arm_dpi generate_arm_r" |
CPU_TOOLS="$CPU_TOOLS generate_arm_dpi generate_arm_r" |
162 |
CPU_TOOLS="$CPU_TOOLS generate_arm_loadstore generate_arm_multi" |
CPU_TOOLS="$CPU_TOOLS generate_arm_loadstore generate_arm_multi" |
163 |
|
|
164 |
|
# M32R |
165 |
|
printf " add_cpu_family(m32r_cpu_family_init, ARCH_M32R);" >> config.h |
166 |
|
CPU_ARCHS="$CPU_ARCHS cpu_m32r.o memory_m32r.o" |
167 |
|
|
168 |
# M88K |
# M88K |
169 |
printf " add_cpu_family(m88k_cpu_family_init, ARCH_M88K);" >> config.h |
printf " add_cpu_family(m88k_cpu_family_init, ARCH_M88K);" >> config.h |
170 |
CPU_ARCHS="$CPU_ARCHS cpu_m88k.o memory_m88k.o" |
CPU_ARCHS="$CPU_ARCHS cpu_m88k.o memory_m88k.o" |
378 |
|
|
379 |
rm -f _test_x11 _test_x11.o |
rm -f _test_x11 _test_x11.o |
380 |
|
|
381 |
|
if [ z$XOK = z0 ]; then |
382 |
|
XINCLUDE=-I/usr/local/include |
383 |
|
$CC $CFLAGS _test_x11.c -c -o _test_x11.o \ |
384 |
|
$XINCLUDE 2> /dev/null |
385 |
|
|
386 |
|
XLIB="-L/usr/local/lib -lX11" |
387 |
|
$CC $CFLAGS _test_x11.o -o _test_x11 $XLIB 2> /dev/null |
388 |
|
|
389 |
|
if [ -x _test_x11 ]; then |
390 |
|
XOK=1 |
391 |
|
fi |
392 |
|
fi |
393 |
|
rm -f _test_x11 _test_x11.o |
394 |
|
|
395 |
# Special case for some 64-bit Linux/x86_64 systems: |
# Special case for some 64-bit Linux/x86_64 systems: |
396 |
if [ z$XOK = z0 ]; then |
if [ z$XOK = z0 ]; then |
397 |
$CC $CFLAGS _test_x11.c -c -o _test_x11.o \ |
$CC $CFLAGS _test_x11.c -c -o _test_x11.o \ |
1202 |
|
|
1203 |
|
|
1204 |
# Create the Makefiles: |
# Create the Makefiles: |
1205 |
D=". src src/include src/cpus src/debugger src/devices src/devices/fonts" |
D=". src src/include src/console src/cpus src/debugger src/devices" |
1206 |
D="$D src/disk src/file src/machines src/native src/net src/promemul" |
D="$D src/devices/fonts src/disk src/file src/machines" |
1207 |
D="$D src/useremul" |
D="$D src/net src/promemul src/symbol src/useremul" |
1208 |
for a in $D; do |
for a in $D; do |
1209 |
echo "creating $a/Makefile" |
echo "creating $a/Makefile" |
1210 |
touch $a/Makefile |
touch $a/Makefile |