Added archive creation to build.bash and added VS Code folder to .gitignore
This commit is contained in:
parent
1f8ff01c81
commit
98a33df03c
|
@ -1,4 +1,6 @@
|
|||
|
||||
.vscode/
|
||||
|
||||
.build/
|
||||
.local/
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
PROJECT_NAME="librr"
|
||||
PROJECT_ROOT=`pwd`
|
||||
GCC_ARGUMENTS="-std=c11 -Wall"
|
||||
|
||||
|
@ -37,13 +38,17 @@ function compile_folder() {
|
|||
echo "==== Building '$SOURCE_FILE' ===="
|
||||
gcc -c $GCC_ARGUMENTS -o $OBJECTS_FOLDER/$SOURCE_FILE.o $SOURCE_FILE $2
|
||||
done
|
||||
|
||||
ar -rvs $PROJECT_ROOT/.build/$PROJECT_NAME-$1.a $OBJECTS_FOLDER/*.o
|
||||
}
|
||||
|
||||
function compile_all_modules() {
|
||||
for MODULE in $MODULES
|
||||
do
|
||||
echo "============ CURRENT MODULE: $MODULE ============"
|
||||
compile_folder "$MODULE" "-I $PROJECT_ROOT/$MODULE/exports/"
|
||||
compile_folder \
|
||||
"$MODULE" \
|
||||
"-I $PROJECT_ROOT/$MODULE/exports/"
|
||||
done
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue