Changed build.bash as needed due to the directory renaming
This commit is contained in:
parent
6243979124
commit
0b0b1d227f
10
build.bash
10
build.bash
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/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`
|
INVOCATION_PATH=`pwd`
|
||||||
|
|
||||||
function build_checks() {
|
function build_checks() {
|
||||||
|
@ -15,7 +15,7 @@ function build_checks() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $check_folder
|
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 ..
|
cd ..
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -29,14 +29,14 @@ function compile_sources() {
|
||||||
rm -r .build/objects/
|
rm -r .build/objects/
|
||||||
rm .build/libparcel.a
|
rm .build/libparcel.a
|
||||||
mkdir -p .build/objects
|
mkdir -p .build/objects
|
||||||
for source_file in $(find "code/src/")
|
for source_file in $(find "core-parser/src/")
|
||||||
do
|
do
|
||||||
if [[ ! -f $source_file ]] then
|
if [[ ! -f $source_file ]] then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Cut out the prefix (code/src/)
|
# Cut out the prefix (core-parser/src/)
|
||||||
BASENAME=`echo $source_file | cut -c '10-'`
|
BASENAME=`echo $source_file | cut -c '17-'`
|
||||||
echo "==== COMPILING $source_file ===="
|
echo "==== COMPILING $source_file ===="
|
||||||
gcc -c $COMPILATION_FLAGS -o .build/objects/$BASENAME.o $source_file $INCLUDE_STATEMENTS
|
gcc -c $COMPILATION_FLAGS -o .build/objects/$BASENAME.o $source_file $INCLUDE_STATEMENTS
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue