Modify build-script include folder keys
The key for getting the path of the own module in the includes.txt is no longer '{self}', but rather '{module}', as that is a little easier to understand.
This commit is contained in:
parent
9c691f817f
commit
004f089cf0
|
@ -1,3 +1,3 @@
|
|||
{self}/inc-c
|
||||
{module}/inc-c
|
||||
{module-folder}/utility/inc-c
|
||||
{module-folder}/ecs/inc-c
|
|
@ -1,2 +1,2 @@
|
|||
{self}/inc-c
|
||||
{module}/inc-c
|
||||
{module-folder}/utility/inc-c
|
|
@ -1,4 +1,4 @@
|
|||
{self}/inc-c
|
||||
{module}/inc-c
|
||||
{module-folder}/utility/inc-c
|
||||
{module-folder}/window/inc-c
|
||||
{module-folder}/ecs/inc-c
|
|
@ -1 +1 @@
|
|||
{self}/inc-c
|
||||
{module}/inc-c
|
|
@ -1,3 +1,3 @@
|
|||
{self}/inc-c
|
||||
{module}/inc-c
|
||||
{module-folder}/utility/inc-c
|
||||
{module-folder}/ecs/inc-c
|
|
@ -1,2 +1,2 @@
|
|||
{self}/inc-c
|
||||
{module}/inc-c
|
||||
{module-folder}/utility/inc-c
|
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
cd $(dirname $0)
|
||||
SCRIPT_PATH=$(pwd)
|
||||
|
@ -42,7 +43,7 @@ function make_include_statements() {
|
|||
|
||||
for INCLUDE_PATH in $(cat modules/$MODULE_NAME/includes.txt)
|
||||
do
|
||||
MODIFIED_PATH="${INCLUDE_PATH//"{self}"/"$PROJECT_PATH/modules/$MODULE_NAME"}"
|
||||
MODIFIED_PATH="${INCLUDE_PATH//"{module}"/"$PROJECT_PATH/modules/$MODULE_NAME"}"
|
||||
MODIFIED_PATH="${MODIFIED_PATH//"{module-folder}"/"$PROJECT_PATH/modules"}"
|
||||
echo "-I ${MODIFIED_PATH//"{dependencies}"/"$PROJECT_PATH/dependencies"}"
|
||||
done
|
||||
|
@ -68,7 +69,14 @@ function build_single_module() {
|
|||
gcc -c -o .build/modules/$MODULE_NAME/objects/$OBJECT_NAME -g3 modules/$MODULE_NAME/src-c/$SOURCE $INCLUDE_STATEMENTS
|
||||
done
|
||||
|
||||
if [[ $(ls .build/modules/$MODULE_NAME/objects/ | grep ".o$") == "" ]];
|
||||
then
|
||||
echo "> Empty Module, not creating archive."
|
||||
echo " "
|
||||
return
|
||||
fi
|
||||
ar -rvs .build/archives/voxula-$MODULE_NAME.a .build/modules/$MODULE_NAME/objects/*.o
|
||||
echo " "
|
||||
}
|
||||
|
||||
mkdir -p .build/archives
|
||||
|
|
Loading…
Reference in New Issue