Changed build.bash as needed due to the directory renaming

This commit is contained in:
Eric-Paul Ickhorn 2023-11-28 22:27:17 +01:00
parent 6243979124
commit 0b0b1d227f
1 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
INCLUDE_STATEMENTS="-I code/inc/ -I code/exports/"
INCLUDE_STATEMENTS="-I core-parser/inc/ -I core-parser/exports/"
INVOCATION_PATH=`pwd`
function build_checks() {
@ -15,7 +15,7 @@ function build_checks() {
fi
cd $check_folder
gcc src/*.c $INVOCATION_PATH/.build/libparcel.a -o check.elf -I $INVOCATION_PATH/code/inc/
gcc src/*.c $INVOCATION_PATH/.build/libparcel.a -o check.elf -I $INVOCATION_PATH/core-parser/inc/
cd ..
done
}
@ -29,14 +29,14 @@ function compile_sources() {
rm -r .build/objects/
rm .build/libparcel.a
mkdir -p .build/objects
for source_file in $(find "code/src/")
for source_file in $(find "core-parser/src/")
do
if [[ ! -f $source_file ]] then
continue
fi
# Cut out the prefix (code/src/)
BASENAME=`echo $source_file | cut -c '10-'`
# Cut out the prefix (core-parser/src/)
BASENAME=`echo $source_file | cut -c '17-'`
echo "==== COMPILING $source_file ===="
gcc -c $COMPILATION_FLAGS -o .build/objects/$BASENAME.o $source_file $INCLUDE_STATEMENTS
done