mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-01-10 06:31:13 +00:00
Improve genglue.sh script for generating trampoline functions
This commit is contained in:
parent
fc9ad6d4e1
commit
2f156d4262
@ -2,7 +2,7 @@
|
||||
|
||||
package_id="org.deadc0de.apple2ix.basic"
|
||||
apple2_src_path=apple2ix-src
|
||||
glue_srcs="$apple2_src_path/disk.c $apple2_src_path/misc.c $apple2_src_path/display.c $apple2_src_path/vm.c $apple2_src_path/cpu-supp.c $apple2_src_path/audio/speaker.c $apple2_src_path/audio/mockingboard.c"
|
||||
glue_srcs="$apple2_src_path/cpu-supp.c $apple2_src_path/disk.c $apple2_src_path/display.c $apple2_src_path/vm.c $apple2_src_path/audio/speaker.c $apple2_src_path/audio/mockingboard.c"
|
||||
|
||||
usage() {
|
||||
if test "$(basename $0)" = "clean" ; then
|
||||
@ -118,9 +118,9 @@ if test "x$do_build" = "x1" -o "x$do_release" = "x1" ; then
|
||||
$CC $CFLAGS -o $apple2_src_path/genfont $apple2_src_path/genfont.c && \
|
||||
$apple2_src_path/genfont < $apple2_src_path/font.txt > $apple2_src_path/font.c
|
||||
|
||||
# glue
|
||||
$apple2_src_path/x86/genglue $glue_srcs > $apple2_src_path/x86/glue.S
|
||||
$apple2_src_path/arm/genglue $glue_srcs > $apple2_src_path/arm/glue.S
|
||||
# trampoline generation
|
||||
TARGET_ARCH=x86 $apple2_src_path/genglue.sh $glue_srcs > $apple2_src_path/x86/glue.S
|
||||
TARGET_ARCH=arm $apple2_src_path/genglue.sh $glue_srcs > $apple2_src_path/arm/glue.S
|
||||
|
||||
if test "x$do_build" = "x1" ; then
|
||||
export BUILD_MODE=debug
|
||||
|
@ -1832,7 +1832,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# ARM glue\n\"$SRCROOT/../src/arm/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/arm/glue.S\"\n# x86 (simulator) glue\n\"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
shellScript = "TARGET_ARCH=arm \"$SRCROOT/../src/genglue.sh\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/arm/glue.S\"\nTARGET_ARCH=x86 \"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
4ACD73551D20A83E00123DE6 /* ShellScript */ = {
|
||||
@ -1860,7 +1860,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# ARM glue\n\"$SRCROOT/../src/arm/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/arm/glue.S\"\n# x86 (simulator) glue\n\"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
shellScript = "TARGET_ARCH=arm \"$SRCROOT/../src/genglue.sh\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/arm/glue.S\"\nTARGET_ARCH=x86 \"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
4ACD73A61D20AB6A00123DE6 /* ShellScript */ = {
|
||||
@ -1888,7 +1888,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# ARM glue\n\"$SRCROOT/../src/arm/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/arm/glue.S\"\n# x86 (simulator) glue\n\"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
shellScript = "TARGET_ARCH=arm \"$SRCROOT/../src/genglue.sh\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/arm/glue.S\"\nTARGET_ARCH=x86 \"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
4ACD73F61D20B11D00123DE6 /* ShellScript */ = {
|
||||
@ -1916,7 +1916,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# ARM glue\n\"$SRCROOT/../src/arm/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/arm/glue.S\"\n# x86 (simulator) glue\n\"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
shellScript = "TARGET_ARCH=arm \"$SRCROOT/../src/genglue.sh\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/arm/glue.S\"\nTARGET_ARCH=x86 \"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
4ACD745C1D26210600123DE6 /* ShellScript */ = {
|
||||
@ -1944,7 +1944,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
shellScript = "TARGET_ARCH=arm \"$SRCROOT/../src/genglue.sh\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/arm/glue.S\"\nTARGET_ARCH=x86 \"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
4AD4FEB31A52464F00F958EC /* ShellScript */ = {
|
||||
@ -1972,7 +1972,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
shellScript = "TARGET_ARCH=arm \"$SRCROOT/../src/genglue.sh\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/arm/glue.S\"\nTARGET_ARCH=x86 \"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
4ADC521C19E8CA4500186B36 /* ShellScript */ = {
|
||||
@ -2000,7 +2000,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
shellScript = "TARGET_ARCH=arm \"$SRCROOT/../src/genglue.sh\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/arm/glue.S\"\nTARGET_ARCH=x86 \"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
773B3DC919568BF20085CE5F /* ShellScript */ = {
|
||||
@ -2028,7 +2028,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
shellScript = "TARGET_ARCH=arm \"$SRCROOT/../src/genglue.sh\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/arm/glue.S\"\nTARGET_ARCH=x86 \"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
779DD847195BD9F900DF89E5 /* ShellScript */ = {
|
||||
@ -2056,7 +2056,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
shellScript = "TARGET_ARCH=arm \"$SRCROOT/../src/genglue.sh\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/arm/glue.S\"\nTARGET_ARCH=x86 \"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
779F568319EB0B9100A6F107 /* ShellScript */ = {
|
||||
@ -2084,7 +2084,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "# ARM glue\n\"$SRCROOT/../src/arm/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/arm/glue.S\"\n# x86 (simulator) glue\n\"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
shellScript = "TARGET_ARCH=arm \"$SRCROOT/../src/genglue.sh\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/arm/glue.S\"\nTARGET_ARCH=x86 \"$SRCROOT/../src/x86/genglue\" \"$SRCROOT/../src/cpu-supp.c\" \"$SRCROOT/../src/disk.c\" \"$SRCROOT/../src/display.c\" \"$SRCROOT/../src/vm.c\" \"$SRCROOT/../src/audio/speaker.c\" \"$SRCROOT/../src/audio/mockingboard.c\" > \"$SRCROOT/../src/x86/glue.S\"";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
935C55901C13715A0013166D /* ShellScript */ = {
|
||||
|
@ -76,7 +76,7 @@ src/rom.c: genrom
|
||||
./genrom src/rom/apple_IIe.rom src/rom/slot6.rom > $@
|
||||
|
||||
src/x86/glue.S: src/cpu-supp.c src/disk.c src/display.c src/vm.c @AUDIO_GLUE_C@
|
||||
./src/x86/genglue $^ > $@
|
||||
TARGET_ARCH=x86 ./src/genglue.sh $^ > $@
|
||||
|
||||
###############################################################################
|
||||
# Testing
|
||||
@ -175,7 +175,7 @@ EXTRA_DIST = reconf.sh configure README.debugger PROBLEMS .apple2 \
|
||||
$(man_MANS) \
|
||||
\
|
||||
src/font.txt \
|
||||
src/x86/genglue \
|
||||
src/genglue.sh \
|
||||
\
|
||||
$(shaders_DATA)
|
||||
|
||||
|
@ -256,7 +256,7 @@ AC_ARG_ENABLE([audio], AS_HELP_STRING([--disable-audio], [Disable emulator audio
|
||||
AC_SEARCH_LIBS(alcOpenDevice, openal, [
|
||||
dnl found OpenAL ...
|
||||
openal_supported='yes'
|
||||
AUDIO_GLUE_C="src/audio/speaker.c src/audio/mockingboard.c src/audio/playqueue.c"
|
||||
AUDIO_GLUE_C="src/audio/speaker.c src/audio/mockingboard.c"
|
||||
AUDIO_O="src/audio/soundcore.o src/audio/soundcore-openal.o src/audio/speaker.o src/audio/playqueue.o src/audio/alhelpers.o src/audio/mockingboard.o src/audio/AY8910.o"
|
||||
dnl HACK there's gotta be a better way ... without this verbosity, CFLAGS are not correct (lacking -DTESTING=1 , etc) if we don't specify specific obj files for test binaries
|
||||
testcpu_AUDIO_O="src/audio/testcpu-soundcore.o src/audio/testcpu-soundcore-openal.o src/audio/testcpu-speaker.o src/audio/testcpu-playqueue.o src/audio/testcpu-alhelpers.o src/audio/testcpu-mockingboard.o src/audio/testcpu-AY8910.o"
|
||||
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo '/* Automatically Generated -- do not edit */'
|
||||
echo '#include "arm/glue-prologue.h"'
|
||||
grep -E -h '^(GLUE_)|(#if)|(#endif)|(#else)|(#elif)' $*
|
||||
exit 0
|
5
src/genglue.sh
Executable file
5
src/genglue.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "#include \"$TARGET_ARCH/glue-prologue.h\""
|
||||
grep -E -h '(GLUE_)|(#[ ]*if)|(#[ ]*endif)|(#[ ]*else)|(#[ ]*elif)' $*
|
||||
exit 0
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo '/* Automatically Generated -- do not edit */'
|
||||
echo '#include "x86/glue-prologue.h"'
|
||||
grep -E -h '^(GLUE_)|(#if)|(#endif)|(#else)|(#elif)' $*
|
||||
exit 0
|
Loading…
x
Reference in New Issue
Block a user