kerep added as submodule
This commit is contained in:
parent
62963e6666
commit
fda9226e0d
3
.gitignore
vendored
3
.gitignore
vendored
@ -10,5 +10,4 @@ obj/
|
|||||||
.editorconfig
|
.editorconfig
|
||||||
*.user
|
*.user
|
||||||
*.vcxproj.filters
|
*.vcxproj.filters
|
||||||
.config
|
.config
|
||||||
deps/kerep.a
|
|
||||||
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "kerep"]
|
||||||
|
path = kerep
|
||||||
|
url = https://github.com/Timerix22/kerep.git
|
||||||
@ -1,11 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source build_scripts/init.sh
|
source build_scripts/pre_build.sh
|
||||||
|
|
||||||
print "${CYAN}===============[build]================\n"
|
print "${CYAN}===============[build]================\n"
|
||||||
clear_dir "$OUTDIR"
|
|
||||||
clear_dir "$OBJDIR"
|
|
||||||
compile_c "$BUILD_C_ARGS" "$SRC_C"
|
compile_c "$BUILD_C_ARGS" "$SRC_C"
|
||||||
compile_cpp "$BUILD_CPP_ARGS" "$SRC_CPP"
|
compile_cpp "$BUILD_CPP_ARGS" "$SRC_CPP"
|
||||||
ar x deps/* --output=obj
|
|
||||||
link "$BUILD_CPP_ARGS $BUILD_LINKER_ARGS" "$BUILD_FILE"
|
link "$BUILD_CPP_ARGS $BUILD_LINKER_ARGS" "$BUILD_FILE"
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
source build_scripts/init.sh
|
source build_scripts/pre_build.sh
|
||||||
|
|
||||||
print "${CYAN}=============[build_dbg]==============\n"
|
print "${CYAN}=============[build_dbg]==============\n"
|
||||||
clear_dir "$OUTDIR"
|
|
||||||
clear_dir "$OBJDIR"
|
|
||||||
compile_c "$BUILD_DBG_C_ARGS" "$SRC_C"
|
compile_c "$BUILD_DBG_C_ARGS" "$SRC_C"
|
||||||
compile_cpp "$BUILD_DBG_CPP_ARGS" "$SRC_CPP"
|
compile_cpp "$BUILD_DBG_CPP_ARGS" "$SRC_CPP"
|
||||||
link "$BUILD_DBG_CPP_ARGS $BUILD_DBG_LINKER_ARGS" "$BUILD_FILE"
|
link "$BUILD_DBG_CPP_ARGS $BUILD_DBG_LINKER_ARGS" "$BUILD_FILE"
|
||||||
|
|||||||
@ -5,5 +5,5 @@ source build_scripts/init.sh
|
|||||||
print "${CYAN}===========[test_valgrind]============\n"
|
print "${CYAN}===========[test_valgrind]============\n"
|
||||||
cd $OUTDIR
|
cd $OUTDIR
|
||||||
valgrind $VALGRIND_ARGS ./$BUILD_DBG_FILE
|
valgrind $VALGRIND_ARGS ./$BUILD_DBG_FILE
|
||||||
cat "valgrind.log"
|
cat valgrind.log
|
||||||
cd ..
|
cd ..
|
||||||
|
|||||||
@ -2,22 +2,12 @@
|
|||||||
source build_scripts/colors.sh
|
source build_scripts/colors.sh
|
||||||
|
|
||||||
printf "${CYAN}=============[build_deps]=============\n"
|
printf "${CYAN}=============[build_deps]=============\n"
|
||||||
mkdir -p deps
|
|
||||||
cd ../kerep/
|
|
||||||
|
|
||||||
|
cd kerep
|
||||||
if [ ! -f "bin/kerep.a" ]; then
|
if [ ! -f "bin/kerep.a" ]; then
|
||||||
printf "${YELLOW}../kerep/bin/kerep.a doesn't exist\n"
|
printf "${YELLOW}kerep/bin/kerep.a doesn't exist\n"
|
||||||
while true; do
|
|
||||||
printf "${WHITE}build it from source? (y/n) "
|
|
||||||
read answ
|
|
||||||
case $answ in
|
|
||||||
[Yy] ) break;;
|
|
||||||
[Nn] ) exit;;
|
|
||||||
* ) printf "${RED}incorrect answer\n";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
make build_static_lib
|
make build_static_lib
|
||||||
fi
|
fi
|
||||||
cp bin/kerep.a ../cobek/deps/
|
cp bin/kerep.a ../obj/
|
||||||
printf "${GREEN} copied ${CYAN}kerep.a\n"
|
printf "${GREEN}copied ${CYAN}kerep.a\n"
|
||||||
cd ../cobek
|
cd ..
|
||||||
|
|||||||
@ -59,7 +59,8 @@ function link {
|
|||||||
print "${BLUE}args: ${GRAY}$args\n"
|
print "${BLUE}args: ${GRAY}$args\n"
|
||||||
local outfile=$OUTDIR/$2
|
local outfile=$OUTDIR/$2
|
||||||
print "${BLUE}outfile: ${GRAY}$outfile\n"
|
print "${BLUE}outfile: ${GRAY}$outfile\n"
|
||||||
local objects="$(find $OBJDIR -name *.o)"
|
local objects="$(find $OBJDIR -name *.o)
|
||||||
|
$(find $OBJDIR -name *.a)"
|
||||||
print "${BLUE}objects: ${GRAY}$objects\n"
|
print "${BLUE}objects: ${GRAY}$objects\n"
|
||||||
if $CMP_CPP $args -o $outfile $(echo $objects | tr '\n' ' ')
|
if $CMP_CPP $args -o $outfile $(echo $objects | tr '\n' ' ')
|
||||||
then
|
then
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
reset
|
|
||||||
tabs 4
|
tabs 4
|
||||||
|
|
||||||
source build_scripts/colors.sh
|
source build_scripts/colors.sh
|
||||||
@ -21,5 +20,3 @@ if [ ! -f ".config" ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
source .config
|
source .config
|
||||||
|
|
||||||
bash build_scripts/build_deps.sh
|
|
||||||
|
|||||||
7
build_scripts/pre_build.sh
Normal file
7
build_scripts/pre_build.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source build_scripts/init.sh
|
||||||
|
|
||||||
|
clear_dir "$OUTDIR"
|
||||||
|
clear_dir "$OBJDIR"
|
||||||
|
bash build_scripts/build_deps.sh
|
||||||
Loading…
Reference in New Issue
Block a user