From c69f053c29faa47d0600f5b147835e970d9cf654 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 20 Jul 2020 02:54:22 +0200 Subject: Initial Commit Half-added some basic AARM64 instructions such as ADD, RET, MOV, NOP... --- build.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 build.sh (limited to 'build.sh') diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..cedaf10 --- /dev/null +++ b/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +out_dir="./bin" + +mkdir $out_dir 2> /dev/null + +for f in $(find ./src -type f \( -iname \*.cpp -o -iname \*.s \)) +do + out_file=$(echo $f | sed 's/.\/src/.\/bin/g' | sed 's/\.cpp/\.o/g' | sed 's/\.s//g') + mkdir -p $(dirname $out_file) + if [[ $f == *.s ]] + then + aarch64-linux-gnu-as $f -o $out_file + else + g++ -g -c $f -o $out_file + fi +done + +g++ -o ./bin/disasm $(find ./bin -type f -name "*.o") -lgcc -- cgit 1.4.1