diff options
| author | Kai Gunger <kgunger12@gmail.com> | 2026-07-11 15:10:47 -0400 |
|---|---|---|
| committer | Kai Gunger <kgunger12@gmail.com> | 2026-07-11 15:10:47 -0400 |
| commit | 71fd03b37ae0fe5e1f252c732395e40ded8e089d (patch) | |
| tree | ede7713feac88e04b0eaaacb2205ca7101908d61 /run.sh | |
Initial commit, bring existing tnslc from tnsl-lang
Diffstat (limited to 'run.sh')
| -rwxr-xr-x | run.sh | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -0,0 +1,26 @@ +#!/bin/bash + +BUILD_DIR=./out/NEXT +ARTIFACT_DIR=$BUILD_DIR/artifacts + +mkdir -p $BUILD_DIR +mkdir -p $ARTIFACT_DIR +filename=$1 +filename="${filename%.*}" + +./out/tnslc $filename.tnsl + +if [ $? -ne 0 ]; then + exit $? +fi + +mv out.asm $ARTIFACT_DIR/$filename.asm + +nasm -g -f elf64 -o $ARTIFACT_DIR/$filename.o $ARTIFACT_DIR/$filename.asm + +if [ $? -ne 0 ]; then + exit $? +fi + +gcc -ggdb -o $BUILD_DIR/$filename $ARTIFACT_DIR/$filename.o + |