diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-07-06 22:49:55 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-07-06 22:49:55 -0700 |
commit | f0b99910f3558a426bcc80e2aff54c5d0428e5bb (patch) | |
tree | 351abe9676ea14106127e65ce78d16633e0ac92b /subx/gen | |
parent | 5f1de34a679ab0b9c59067f7924f1c953917b53e (diff) | |
download | mu-f0b99910f3558a426bcc80e2aff54c5d0428e5bb.tar.gz |
4313 - some helpers for managing test binaries
I'm getting sick of hitting the <Tab> key.
Diffstat (limited to 'subx/gen')
-rwxr-xr-x | subx/gen | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/subx/gen b/subx/gen new file mode 100755 index 00000000..d8465bc0 --- /dev/null +++ b/subx/gen @@ -0,0 +1,46 @@ +#!/usr/bin/env zsh +# Build a specific example. + +if [ $1 -eq 1 ] +then + gcc -Wall -s teensy/test1.c -o teensy/test1 + exit $? +fi + +if [ $1 -eq 2 ] +then + nasm -f elf teensy/test2.s && gcc -Wall -s teensy/test2.o -o teensy/test2 + exit $? +fi + +if [ $1 -eq 3 ] +then + nasm -f elf teensy/test3.s && gcc -Wall -s -nostartfiles teensy/test3.o -o teensy/test3 + exit $? +fi + +if [ $1 -eq 4 ] +then + nasm -f elf teensy/test4.s && gcc -Wall -s -nostdlib teensy/test4.o -o teensy/test4 + exit $? +fi + +if [ $1 -eq 5 ] +then + nasm -f bin teensy/test5.s -o teensy/test5 && chmod +x teensy/test5 + exit $? +fi + +if [ $1 -eq 6 ] +then + nasm -f elf teensy/test6-global.s && gcc -Wall -s teensy/test6-global.o -o teensy/test6 + exit $? +fi + +if [ $1 -eq 7 ] +then + nasm -f bin teensy/test7-global.s -o teensy/test7 && chmod +x teensy/test7 + exit $? +fi + +exit 127 |