27 |
# SUCH DAMAGE. |
# SUCH DAMAGE. |
28 |
# |
# |
29 |
# |
# |
30 |
# $Id: configure,v 1.252 2007/04/10 17:52:27 debug Exp $ |
# $Id: configure,v 1.270 2007/06/15 17:13:40 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 |
49 |
# o) which compiler flags to use (overridden by setting CFLAGS) |
# o) which compiler flags to use (overridden by setting CFLAGS) |
50 |
# o) X11 flags and libraries (TODO: should be possible to override |
# o) X11 flags and libraries (TODO: should be possible to override |
51 |
# via command line options?) |
# via command line options?) |
|
# o) native code generation backend (i.e. detect host ABI) |
|
|
# |
|
52 |
# |
# |
53 |
# The general philosophy regarding command line switches is that anything |
# The general philosophy regarding command line switches is that anything |
54 |
# which can be incorporated into the program as a runtime command line option |
# which can be incorporated into the program as a runtime command line option |
93 |
fi |
fi |
94 |
|
|
95 |
|
|
|
# Stable releases: |
|
|
ENABLEARM=YES |
|
|
ENABLEMIPS=YES |
|
|
ENABLEPPC=YES |
|
|
ENABLESH=YES |
|
|
|
|
|
if [ z"$UNSTABLE" = zYES ]; then |
|
|
# Development: |
|
|
printf "###\n### DEVELOPMENT (UNSTABLE)\n###\n### " |
|
|
printf "(Enabling some archs that are not working yet.)\n###\n\n" |
|
|
ENABLEALPHA=YES |
|
|
ENABLEAVR=YES |
|
|
ENABLEM68K=YES |
|
|
ENABLESPARC=YES |
|
|
fi |
|
|
|
|
|
|
|
96 |
############################################################################### |
############################################################################### |
97 |
# |
# |
98 |
# Configure options: |
# Configure options: |
120 |
|
|
121 |
if [ z"$UNSTABLE" = zYES ]; then |
if [ z"$UNSTABLE" = zYES ]; then |
122 |
printf "#define UNSTABLE_DEVEL\n" >> config.h |
printf "#define UNSTABLE_DEVEL\n" >> config.h |
123 |
|
else |
124 |
|
CFLAGS="-DNDEBUG $CFLAGS" |
125 |
fi |
fi |
126 |
|
|
127 |
|
|
129 |
printf "#define COMPILE_DATE \"$ZZ\"\n" >> config.h |
printf "#define COMPILE_DATE \"$ZZ\"\n" >> config.h |
130 |
|
|
131 |
|
|
132 |
|
# Include support for all CPU types: |
133 |
|
printf "#define ADD_ALL_CPU_FAMILIES " >> config.h |
134 |
|
|
135 |
# Support for various CPU types: |
# Alpha |
136 |
if [ z$ENABLEALPHA = zYES ]; then |
printf " add_cpu_family(alpha_cpu_family_init, ARCH_ALPHA);" >> config.h |
137 |
printf "#define ENABLE_ALPHA\n" >> config.h |
CPU_ARCHS="$CPU_ARCHS cpu_alpha.o cpu_alpha_palcode.o memory_alpha.o" |
138 |
CPU_ARCHS="$CPU_ARCHS cpu_alpha.o cpu_alpha_palcode.o memory_alpha.o" |
CPU_TOOLS="$CPU_TOOLS generate_alpha_misc" |
139 |
CPU_TOOLS="$CPU_TOOLS generate_alpha_misc" |
|
140 |
fi |
# ARM |
141 |
if [ z$ENABLEARM = zYES ]; then |
printf " add_cpu_family(arm_cpu_family_init, ARCH_ARM);" >> config.h |
142 |
printf "#define ENABLE_ARM\n" >> config.h |
CPU_ARCHS="$CPU_ARCHS cpu_arm.o cpu_arm_coproc.o memory_arm.o " |
143 |
CPU_ARCHS="$CPU_ARCHS cpu_arm.o cpu_arm_coproc.o memory_arm.o " |
CPU_ARCHS="$CPU_ARCHS tmp_arm_loadstore.o" |
144 |
CPU_ARCHS="$CPU_ARCHS tmp_arm_dpi.o tmp_arm_loadstore.o tmp_arm_r.o" |
CPU_ARCHS="$CPU_ARCHS tmp_arm_loadstore_p0_u0_w0.o" |
145 |
CPU_ARCHS="$CPU_ARCHS tmp_arm_r0.o tmp_arm_r1.o" |
CPU_ARCHS="$CPU_ARCHS tmp_arm_loadstore_p0_u0_w1.o" |
146 |
CPU_ARCHS="$CPU_ARCHS tmp_arm_r2.o tmp_arm_r3.o" |
CPU_ARCHS="$CPU_ARCHS tmp_arm_loadstore_p0_u1_w0.o" |
147 |
CPU_ARCHS="$CPU_ARCHS tmp_arm_r4.o tmp_arm_r5.o" |
CPU_ARCHS="$CPU_ARCHS tmp_arm_loadstore_p0_u1_w1.o" |
148 |
CPU_ARCHS="$CPU_ARCHS tmp_arm_r6.o tmp_arm_r7.o" |
CPU_ARCHS="$CPU_ARCHS tmp_arm_loadstore_p1_u0_w0.o" |
149 |
CPU_ARCHS="$CPU_ARCHS tmp_arm_r8.o tmp_arm_r9.o" |
CPU_ARCHS="$CPU_ARCHS tmp_arm_loadstore_p1_u0_w1.o" |
150 |
CPU_ARCHS="$CPU_ARCHS tmp_arm_ra.o tmp_arm_rb.o" |
CPU_ARCHS="$CPU_ARCHS tmp_arm_loadstore_p1_u1_w0.o" |
151 |
CPU_ARCHS="$CPU_ARCHS tmp_arm_rc.o tmp_arm_rd.o" |
CPU_ARCHS="$CPU_ARCHS tmp_arm_loadstore_p1_u1_w1.o" |
152 |
CPU_ARCHS="$CPU_ARCHS tmp_arm_re.o tmp_arm_rf.o tmp_arm_multi.o" |
CPU_ARCHS="$CPU_ARCHS tmp_arm_dpi.o tmp_arm_r.o" |
153 |
CPU_TOOLS="$CPU_TOOLS generate_arm_dpi generate_arm_r" |
CPU_ARCHS="$CPU_ARCHS tmp_arm_r0.o tmp_arm_r1.o" |
154 |
CPU_TOOLS="$CPU_TOOLS generate_arm_loadstore generate_arm_multi" |
CPU_ARCHS="$CPU_ARCHS tmp_arm_r2.o tmp_arm_r3.o" |
155 |
fi |
CPU_ARCHS="$CPU_ARCHS tmp_arm_r4.o tmp_arm_r5.o" |
156 |
if [ z$ENABLEAVR = zYES ]; then |
CPU_ARCHS="$CPU_ARCHS tmp_arm_r6.o tmp_arm_r7.o" |
157 |
printf "#define ENABLE_AVR\n" >> config.h |
CPU_ARCHS="$CPU_ARCHS tmp_arm_r8.o tmp_arm_r9.o" |
158 |
CPU_ARCHS="$CPU_ARCHS cpu_avr.o" |
CPU_ARCHS="$CPU_ARCHS tmp_arm_ra.o tmp_arm_rb.o" |
159 |
fi |
CPU_ARCHS="$CPU_ARCHS tmp_arm_rc.o tmp_arm_rd.o" |
160 |
if [ z$ENABLEM68K = zYES ]; then |
CPU_ARCHS="$CPU_ARCHS tmp_arm_re.o tmp_arm_rf.o tmp_arm_multi.o" |
161 |
printf "#define ENABLE_M68K\n" >> config.h |
CPU_TOOLS="$CPU_TOOLS generate_arm_dpi generate_arm_r" |
162 |
CPU_ARCHS="$CPU_ARCHS cpu_m68k.o" |
CPU_TOOLS="$CPU_TOOLS generate_arm_loadstore generate_arm_multi" |
163 |
fi |
|
164 |
if [ z$ENABLEMIPS = zYES ]; then |
# M88K |
165 |
printf "#define ENABLE_MIPS\n" >> config.h |
printf " add_cpu_family(m88k_cpu_family_init, ARCH_M88K);" >> config.h |
166 |
CPU_ARCHS="$CPU_ARCHS cpu_mips.o cpu_mips_coproc.o " |
CPU_ARCHS="$CPU_ARCHS cpu_m88k.o memory_m88k.o" |
167 |
CPU_ARCHS="$CPU_ARCHS cpu_mips_instr_unaligned.o" |
CPU_TOOLS="$CPU_TOOLS generate_m88k_bcnd" |
168 |
CPU_TOOLS="$CPU_TOOLS generate_mips_loadstore" |
CPU_TOOLS="$CPU_TOOLS generate_m88k_loadstore" |
169 |
CPU_TOOLS="$CPU_TOOLS generate_mips_loadstore_multi" |
|
170 |
fi |
# MIPS |
171 |
if [ z$ENABLEPPC = zYES ]; then |
printf " add_cpu_family(mips_cpu_family_init, ARCH_MIPS);" >> config.h |
172 |
printf "#define ENABLE_PPC\n" >> config.h |
CPU_ARCHS="$CPU_ARCHS cpu_mips.o cpu_mips_coproc.o " |
173 |
CPU_ARCHS="$CPU_ARCHS cpu_ppc.o" |
CPU_ARCHS="$CPU_ARCHS cpu_mips_instr_unaligned.o" |
174 |
CPU_TOOLS="$CPU_TOOLS generate_ppc_loadstore" |
CPU_TOOLS="$CPU_TOOLS generate_mips_loadstore" |
175 |
fi |
CPU_TOOLS="$CPU_TOOLS generate_mips_loadstore_multi" |
176 |
if [ z$ENABLESH = zYES ]; then |
|
177 |
printf "#define ENABLE_SH\n" >> config.h |
# POWER/PowerPC |
178 |
CPU_ARCHS="$CPU_ARCHS cpu_sh.o memory_sh.o" |
printf " add_cpu_family(ppc_cpu_family_init, ARCH_PPC);" >> config.h |
179 |
fi |
CPU_ARCHS="$CPU_ARCHS cpu_ppc.o" |
180 |
if [ z$ENABLESPARC = zYES ]; then |
CPU_TOOLS="$CPU_TOOLS generate_ppc_loadstore" |
181 |
printf "#define ENABLE_SPARC\n" >> config.h |
|
182 |
CPU_ARCHS="$CPU_ARCHS cpu_sparc.o memory_sparc.o" |
# SuperH |
183 |
CPU_TOOLS="$CPU_TOOLS generate_sparc_loadstore" |
printf " add_cpu_family(sh_cpu_family_init, ARCH_SH);" >> config.h |
184 |
fi |
CPU_ARCHS="$CPU_ARCHS cpu_sh.o memory_sh.o" |
185 |
|
|
186 |
|
# SPARC |
187 |
|
printf " add_cpu_family(sparc_cpu_family_init, ARCH_SPARC);" >> config.h |
188 |
|
CPU_ARCHS="$CPU_ARCHS cpu_sparc.o memory_sparc.o" |
189 |
|
CPU_TOOLS="$CPU_TOOLS generate_sparc_loadstore" |
190 |
|
|
191 |
|
printf "\n" >> config.h |
192 |
|
|
193 |
|
|
194 |
############################################################################### |
############################################################################### |
235 |
#\n\n" >> _Makefile.header |
#\n\n" >> _Makefile.header |
236 |
|
|
237 |
|
|
238 |
echo 'int main(int argc, char *argv[]) { return 0; }' > _testprog.c |
# Try with the simplest possible test program. Actually, test static variables |
239 |
|
# as well, because GXemul uses things like NULL-initialized global pointers, |
240 |
|
# and it is important that they work. (GCC on Solaris is known to be completely |
241 |
|
# broken, for instance.) |
242 |
|
|
243 |
|
echo '#include <stdio.h> |
244 |
|
|
245 |
|
int main(int argc, char *argv[]) |
246 |
|
{ |
247 |
|
static int x = 0; |
248 |
|
static int y = 1; |
249 |
|
printf("%i,%i", x, y); |
250 |
|
return 0; |
251 |
|
} |
252 |
|
' > _testprog.c |
253 |
|
|
254 |
|
|
255 |
# Try to detect which C compiler to use, if CC is not set: |
# Try to detect which C compiler to use, if CC is not set: |
256 |
printf "checking which C compiler to use... " |
printf "checking which C compiler to use... " |
257 |
|
rm -f _testprog |
258 |
if [ z"$CC" = z ]; then |
if [ z"$CC" = z ]; then |
|
CC=cc |
|
|
|
|
259 |
# Try gcc first: |
# Try gcc first: |
260 |
printf "#!/bin/sh\ngcc _testprog.c -o _testprog >" > _test.sh |
printf "#!/bin/sh\ngcc $CFLAGS _testprog.c -o _testprog >" > _test.sh |
261 |
printf " /dev/null 2> /dev/null\n" >> _test.sh |
printf " /dev/null 2> /dev/null\n" >> _test.sh |
262 |
chmod 755 _test.sh |
chmod 755 _test.sh |
263 |
./_test.sh > /dev/null 2> /dev/null |
./_test.sh > /dev/null 2> /dev/null |
264 |
if [ -x _testprog ]; then |
if [ -x _testprog ]; then |
265 |
CC=gcc |
if [ z`./_testprog` = z0,1 ]; then |
266 |
|
CC=gcc |
267 |
|
else |
268 |
|
printf "broken gcc detected\n" |
269 |
|
printf "The test program:\n\n" |
270 |
|
cat _testprog.c |
271 |
|
printf "\nshould have resulted in 0,1, but the" |
272 |
|
printf " result was: " |
273 |
|
./_testprog |
274 |
|
printf "\n\nchecking for other C compilers... " |
275 |
|
fi |
276 |
fi |
fi |
277 |
rm -f _testprog |
rm -f _testprog |
278 |
|
|
279 |
# If both gcc and cc exist, then cc might be a vendor specific |
# If both gcc and cc exist, then cc might be a vendor specific |
280 |
# compiler which produces faster code than gcc (eg on Solaris): |
# compiler which produces faster code than gcc (eg on Solaris): |
281 |
printf "#!/bin/sh\ncc _testprog.c -o _testprog >" > _test.sh |
printf "#!/bin/sh\ncc $CFLAGS _testprog.c -o _testprog >" > _test.sh |
282 |
printf " /dev/null 2> /dev/null\n" >> _test.sh |
printf " /dev/null 2> /dev/null\n" >> _test.sh |
283 |
chmod 755 _test.sh |
chmod 755 _test.sh |
284 |
./_test.sh > /dev/null 2> /dev/null |
./_test.sh > /dev/null 2> /dev/null |
285 |
if [ -x _testprog ]; then |
if [ -x _testprog ]; then |
286 |
CC=cc |
if [ z`./_testprog` = z0,1 ]; then |
287 |
|
CC=cc |
288 |
|
else |
289 |
|
printf "broken cc detected\n" |
290 |
|
printf "checking for other C compilers... " |
291 |
|
fi |
292 |
fi |
fi |
293 |
rm -f _testprog |
rm -f _testprog |
294 |
|
|
295 |
|
# Actually, don't try ccc on Alpha. ccc generates broken code :( |
296 |
|
|
297 |
# # Try ccc (FreeBSD/Alpha): |
# # Try ccc (FreeBSD/Alpha): |
298 |
# printf "#!/bin/sh\nccc _testprog.c -o _testprog >" > _test.sh |
# printf "#!/bin/sh\nccc $CFLAGS _testprog.c -o _testprog >" > _test.sh |
299 |
# printf " /dev/null 2> /dev/null\n" >> _test.sh |
# printf " /dev/null 2> /dev/null\n" >> _test.sh |
300 |
# chmod 755 _test.sh |
# chmod 755 _test.sh |
301 |
# ./_test.sh > /dev/null 2> /dev/null |
# ./_test.sh > /dev/null 2> /dev/null |
309 |
|
|
310 |
|
|
311 |
rm -f _testprog |
rm -f _testprog |
312 |
|
|
313 |
|
if [ z$CC = z ]; then |
314 |
|
printf "no working compiler detected\n" |
315 |
|
printf "\nPlease set the CC environment variable to a working C " |
316 |
|
printf "compiler before running\nthe configure script, and make" |
317 |
|
printf " sure that the CFLAGS environment variable is\nalso valid" |
318 |
|
printf " for that compiler.\n" |
319 |
|
exit |
320 |
|
fi |
321 |
|
|
322 |
printf "$CC $CFLAGS" |
printf "$CC $CFLAGS" |
323 |
|
|
324 |
|
|
598 |
rm -f _testprog |
rm -f _testprog |
599 |
|
|
600 |
|
|
601 |
|
# -Wstrict-aliasing |
602 |
|
if [ ! z"$DEBUG" = zYES ]; then |
603 |
|
printf "checking whether -Wstrict-aliasing can be used... " |
604 |
|
$CC $CFLAGS -Wstrict-aliasing _testprog.c -o \ |
605 |
|
_testprog 1> _testprog.stdout 2>&1 |
606 |
|
cat _testprog.stdout >> _testprog.error |
607 |
|
if grep frame _testprog.error > /dev/null 2>&1; then |
608 |
|
printf "no\n" |
609 |
|
else |
610 |
|
if [ -x _testprog ]; then |
611 |
|
CWARNINGS="-Wstrict-aliasing $CWARNINGS" |
612 |
|
printf "yes\n" |
613 |
|
else |
614 |
|
printf "no\n" |
615 |
|
fi |
616 |
|
fi |
617 |
|
rm -f _testprog _testprog.error _testprog.stdout |
618 |
|
fi |
619 |
|
|
620 |
|
|
621 |
if [ z"$COMPAQCC" = zYES ]; then |
if [ z"$COMPAQCC" = zYES ]; then |
622 |
# -O4 is possible, but sometimes -O3 is better? |
# -O4 is possible, but sometimes -O3 is better? |
623 |
if [ ! z"$DEBUG" = zYES ]; then |
if [ ! z"$DEBUG" = zYES ]; then |
677 |
fi |
fi |
678 |
rm -f _testprog |
rm -f _testprog |
679 |
|
|
680 |
# # -intrinsics |
# -intrinsics |
681 |
# $CC $CFLAGS _testprog.c -o _testprog -intrinsics 2> /dev/null |
printf "checking whether -intrinsics can be used... " |
682 |
# if [ -x _testprog ]; then |
$CC $CFLAGS _testprog.c -o _testprog -intrinsics 2> /dev/null |
683 |
# CFLAGS="-intrinsics $CFLAGS" |
if [ -x _testprog ]; then |
684 |
# fi |
CFLAGS="-intrinsics $CFLAGS" |
685 |
# rm -f _testprog |
printf "yes\n" |
686 |
|
else |
687 |
|
printf "no\n" |
688 |
|
fi |
689 |
|
rm -f _testprog |
690 |
|
|
691 |
# -fast |
# -fast |
692 |
printf "checking whether -fast can be used... " |
printf "checking whether -fast can be used... " |
740 |
fi |
fi |
741 |
|
|
742 |
|
|
743 |
|
# -fstrict-aliasing |
744 |
|
if [ ! z"$DEBUG" = zYES ]; then |
745 |
|
printf "checking whether -fstrict-aliasing can be used... " |
746 |
|
$CC $CFLAGS -fstrict-aliasing _testprog.c -o \ |
747 |
|
_testprog 1> _testprog.stdout 2>&1 |
748 |
|
cat _testprog.stdout >> _testprog.error |
749 |
|
if grep frame _testprog.error > /dev/null 2>&1; then |
750 |
|
printf "no\n" |
751 |
|
else |
752 |
|
if [ -x _testprog ]; then |
753 |
|
CFLAGS="-fstrict-aliasing $CFLAGS" |
754 |
|
printf "yes\n" |
755 |
|
else |
756 |
|
printf "no\n" |
757 |
|
fi |
758 |
|
fi |
759 |
|
rm -f _testprog _testprog.error _testprog.stdout |
760 |
|
fi |
761 |
|
|
762 |
|
|
763 |
# -g, for development builds |
# -g, for development builds |
764 |
if [ z"$UNSTABLE" = zYES ]; then |
if [ z"$UNSTABLE" = zYES ]; then |
765 |
printf "checking whether -g can be used... " |
printf "checking whether -g can be used... " |
766 |
if [ z"$COMPAQCC" = zYES ]; then |
if [ z"$COMPAQCC" = zYES ]; then |
767 |
printf "skipping\n" |
$CC $CFLAGS -g3 _testprog.c -o _testprog > _testprog.stdout 2>&1 |
768 |
|
cat _testprog.stdout >> _testprog.error |
769 |
|
if [ -x _testprog ]; then |
770 |
|
CFLAGS="-g3 $CFLAGS" |
771 |
|
printf "yes (-g3)\n" |
772 |
|
else |
773 |
|
printf "no\n" |
774 |
|
fi |
775 |
else |
else |
776 |
$CC $CFLAGS -g _testprog.c -o _testprog > _testprog.stdout 2>&1 |
$CC $CFLAGS -g _testprog.c -o _testprog > _testprog.stdout 2>&1 |
777 |
cat _testprog.stdout >> _testprog.error |
cat _testprog.stdout >> _testprog.error |
779 |
CFLAGS="-g $CFLAGS" |
CFLAGS="-g $CFLAGS" |
780 |
printf "yes\n" |
printf "yes\n" |
781 |
else |
else |
782 |
printf "no\n" |
printf "no\n" |
783 |
fi |
fi |
784 |
fi |
fi |
785 |
rm -f _testprog _testprog.error _testprog.stdout |
rm -f _testprog _testprog.error _testprog.stdout |
786 |
fi |
fi |
1018 |
printf "#include <stdio.h>\n#include <inttypes.h>\nint main(int argc, char *argv[]){ |
printf "#include <stdio.h>\n#include <inttypes.h>\nint main(int argc, char *argv[]){ |
1019 |
printf(\"%%lx\\\n\", (int64_t)128);return 0;}\n" > _testpri.c |
printf(\"%%lx\\\n\", (int64_t)128);return 0;}\n" > _testpri.c |
1020 |
rm -f _testpri |
rm -f _testpri |
1021 |
$CC $CFLAGS $CWARNINGS _testpri.c -o _testpri 2> /dev/null |
$CC $CFLAGS $CWARNINGS _testpri.c -o _testpri 2> _testpri.result |
1022 |
if [ z`./_testpri` = z80 ]; then |
if [ z`./_testpri` = z80 ]; then |
1023 |
printf "PRIx64=lx\n" |
printf "PRIx64=lx\n" |
1024 |
else |
else |
1028 |
fi |
fi |
1029 |
fi |
fi |
1030 |
fi |
fi |
1031 |
rm -f _testpri.c _testpri |
rm -f _testpri.c _testpri _testpri.result |
1032 |
|
|
1033 |
|
|
1034 |
# Check for 64-bit off_t: |
# Check for 64-bit off_t: |
1118 |
else |
else |
1119 |
printf "yes\n" |
printf "yes\n" |
1120 |
fi |
fi |
1121 |
rm -f _testuint.c _testuint |
rm -f _testuint* |
1122 |
|
|
1123 |
|
printf "checking for __FUNCTION__... " |
1124 |
|
printf "#include <stdio.h>\n\nint main(int argc, char *argv[]) { |
1125 |
|
if (__FUNCTION__) printf(__FUNCTION__);\n return 0;\n}\n" > _testfunction.c |
1126 |
|
$CC $CFLAGS _testfunction.c -o _testfunction 2> /dev/null |
1127 |
|
if [ ! -x _testfunction ]; then |
1128 |
|
printf "no\n" |
1129 |
|
else |
1130 |
|
if [ z`./_testfunction` = zmain ]; then |
1131 |
|
printf "yes\n" |
1132 |
|
printf "#define HAVE___FUNCTION__\n" >> config.h |
1133 |
|
else |
1134 |
|
printf "no\n" |
1135 |
|
fi |
1136 |
|
fi |
1137 |
|
rm -f _testfunction* |
1138 |
|
|
1139 |
|
|
1140 |
############################################################################### |
############################################################################### |
1164 |
|
|
1165 |
|
|
1166 |
############################################################################### |
############################################################################### |
|
# |
|
|
# Native code generation backend: (Detect host ABI.) |
|
|
# |
|
|
############################################################################### |
|
|
|
|
|
if [ z$UNSTABLE = zYES ]; then |
|
|
printf "detecting native code generation ABI... " |
|
|
|
|
|
if [ z"`uname -m`" = zalpha ]; then |
|
|
NATIVE_CODE_GENERATION=YES |
|
|
printf "Alpha\n" |
|
|
printf "#define NATIVE_CODE_GENERATION\n" >> config.h |
|
|
printf "#define HOST_ARCH_ALPHA\n" >> config.h |
|
|
fi |
|
|
|
|
|
if [ z"`uname -m`" = zamd64 ]; then |
|
|
NATIVE_CODE_GENERATION=YES |
|
|
printf "amd64\n" |
|
|
printf "#define NATIVE_CODE_GENERATION\n" >> config.h |
|
|
printf "#define HOST_ARCH_AMD64\n" >> config.h |
|
|
fi |
|
|
|
|
|
if [ z"`uname -m`" = zx86_64 ]; then |
|
|
NATIVE_CODE_GENERATION=YES |
|
|
printf "amd64\n" |
|
|
printf "#define NATIVE_CODE_GENERATION\n" >> config.h |
|
|
printf "#define HOST_ARCH_AMD64\n" >> config.h |
|
|
fi |
|
|
|
|
|
if [ z$NATIVE_CODE_GENERATION = z ]; then |
|
|
printf "not supported yet for this host platform\n" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
############################################################################### |
|
1167 |
|
|
1168 |
INCLUDE=-Iinclude/ |
INCLUDE=-Iinclude/ |
1169 |
DINCLUDE=-I../include/ |
DINCLUDE=-I../include/ |
1186 |
# Create the Makefiles: |
# Create the Makefiles: |
1187 |
D=". src src/include src/cpus src/debugger src/devices src/devices/fonts" |
D=". src src/include src/cpus src/debugger src/devices src/devices/fonts" |
1188 |
D="$D src/disk src/file src/machines src/native src/net src/promemul" |
D="$D src/disk src/file src/machines src/native src/net src/promemul" |
1189 |
|
D="$D src/useremul" |
1190 |
for a in $D; do |
for a in $D; do |
1191 |
echo "creating $a/Makefile" |
echo "creating $a/Makefile" |
1192 |
touch $a/Makefile |
touch $a/Makefile |
1201 |
rm -f _Makefile.header |
rm -f _Makefile.header |
1202 |
|
|
1203 |
echo Configured. You may now run make to build gxemul. |
echo Configured. You may now run make to build gxemul. |
1204 |
|
|