summaryrefslogtreecommitdiff
path: root/tnslc/build.sh
blob: 1f85a60b909933469dc81fc894b4c014d4273ace (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

BUILD_DIR=./out
ARTIFACT_DIR=$BUILD_DIR/artifacts

mkdir -p $BUILD_DIR
mkdir -p $ARTIFACT_DIR
filename=tnslc.tnsl
filename="${filename%.*}"
valgrind ./ctc $filename.tnsl $ARTIFACT_DIR/$filename.asm
nasm -g -f elf64 -o $ARTIFACT_DIR/$filename.o $ARTIFACT_DIR/$filename.asm
gcc -ggdb -o $BUILD_DIR/$filename $ARTIFACT_DIR/$filename.o