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/
|
.build/
|
||||||
.local/
|
.local/
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
PROJECT_NAME="librr"
|
||||||
PROJECT_ROOT=`pwd`
|
PROJECT_ROOT=`pwd`
|
||||||
GCC_ARGUMENTS="-std=c11 -Wall"
|
GCC_ARGUMENTS="-std=c11 -Wall"
|
||||||
|
|
||||||
|
@ -37,13 +38,17 @@ function compile_folder() {
|
||||||
echo "==== Building '$SOURCE_FILE' ===="
|
echo "==== Building '$SOURCE_FILE' ===="
|
||||||
gcc -c $GCC_ARGUMENTS -o $OBJECTS_FOLDER/$SOURCE_FILE.o $SOURCE_FILE $2
|
gcc -c $GCC_ARGUMENTS -o $OBJECTS_FOLDER/$SOURCE_FILE.o $SOURCE_FILE $2
|
||||||
done
|
done
|
||||||
|
|
||||||
|
ar -rvs $PROJECT_ROOT/.build/$PROJECT_NAME-$1.a $OBJECTS_FOLDER/*.o
|
||||||
}
|
}
|
||||||
|
|
||||||
function compile_all_modules() {
|
function compile_all_modules() {
|
||||||
for MODULE in $MODULES
|
for MODULE in $MODULES
|
||||||
do
|
do
|
||||||
echo "============ CURRENT MODULE: $MODULE ============"
|
echo "============ CURRENT MODULE: $MODULE ============"
|
||||||
compile_folder "$MODULE" "-I $PROJECT_ROOT/$MODULE/exports/"
|
compile_folder \
|
||||||
|
"$MODULE" \
|
||||||
|
"-I $PROJECT_ROOT/$MODULE/exports/"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue