From 0f0ecf0307f17d7621fb595b8d337aa8daf46564 Mon Sep 17 00:00:00 2001 From: Wesley Irvin Date: Sun, 4 Feb 2024 13:39:28 -0500 Subject: [PATCH] Build Script Tweaks Changed location of the /build directory to be in the root to make for easier cleaning of project. Added in a clean-all.sh script as well to clean everything. Clean Script Added in a way to clean the build environment as well. --- clean-all.sh | 10 ++++++++++ quantum/build.sh | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 clean-all.sh diff --git a/clean-all.sh b/clean-all.sh new file mode 100755 index 0000000..7c2a394 --- /dev/null +++ b/clean-all.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Clean up paths if they exist +if [[ -d "./build/" ]]; then + rm -rf ./build +fi + +if [[ -d "./bin/" ]]; then + rm -rf ./bin +fi diff --git a/quantum/build.sh b/quantum/build.sh index 2a8ec71..71e6562 100755 --- a/quantum/build.sh +++ b/quantum/build.sh @@ -4,13 +4,13 @@ set echo on -mkdir -p build/ +mkdir -p ../build/ # Get a list of all the .c files. cFilenames=$(find . -type f -name "*.c") assembly="quantum" -objLocation="build/libquantum.o" +objLocation="../build/libquantum.o" compilerFlags="-g -c -fpic" includeFlags="-Isrc" -- 2.49.1