build_dbg
This commit is contained in:
parent
b5c9de24ed
commit
50039bbd03
3
Makefile
3
Makefile
@ -2,6 +2,9 @@
|
|||||||
build_test:
|
build_test:
|
||||||
@build_scripts/build_test.sh
|
@build_scripts/build_test.sh
|
||||||
|
|
||||||
|
build_test_dbg:
|
||||||
|
@build_scripts/build_test_dbg.sh
|
||||||
|
|
||||||
build_lib:
|
build_lib:
|
||||||
@build_scripts/build_lib.sh
|
@build_scripts/build_lib.sh
|
||||||
|
|
||||||
|
|||||||
@ -6,5 +6,5 @@ print "${CYAN}=============[build_lib]==============\n"
|
|||||||
clear_dir "$OUTDIR"
|
clear_dir "$OUTDIR"
|
||||||
clear_dir "$OBJDIR"
|
clear_dir "$OBJDIR"
|
||||||
compile_c "$BUILD_LIB_C_ARGS" "$SRC_C tests/test_marshalling.c"
|
compile_c "$BUILD_LIB_C_ARGS" "$SRC_C tests/test_marshalling.c"
|
||||||
compile_cpp "$BUILD_LIB_C_ARGS" "$SRC_CPP"
|
compile_cpp "$BUILD_LIB_CPP_ARGS" "$SRC_CPP"
|
||||||
link "$BUILD_LIB_CPP_ARGS $BUILD_LIB_LINKER_ARGS" "$LIB_FILE"
|
link "$BUILD_LIB_CPP_ARGS $BUILD_LIB_LINKER_ARGS" "$LIB_FILE"
|
||||||
|
|||||||
10
build_scripts/build_test_dbg.sh
Normal file
10
build_scripts/build_test_dbg.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source build_scripts/init.sh
|
||||||
|
|
||||||
|
print "${CYAN}===========[build_test_dbg]===========\n"
|
||||||
|
clear_dir "$OUTDIR"
|
||||||
|
clear_dir "$OBJDIR"
|
||||||
|
compile_c "$BUILD_TEST_DBG_C_ARGS" "$SRC_C $TESTS_C"
|
||||||
|
compile_cpp "$BUILD_TEST_DBG_CPP_ARGS" "$SRC_CPP $TESTS_CPP"
|
||||||
|
link "$BUILD_TEST_DBG_CPP_ARGS $BUILD_TEST_DBG_LINKER_ARGS" $TEST_DBG_FILE
|
||||||
@ -16,12 +16,18 @@ VALGRIND_ARGS="-s --read-var-info=yes --track-origins=yes --fullpath-after=kerep
|
|||||||
|
|
||||||
# build_lib
|
# build_lib
|
||||||
LIB_FILE=kerep.so
|
LIB_FILE=kerep.so
|
||||||
BUILD_LIB_C_ARGS="-O2 -fpic -shared"
|
BUILD_LIB_C_ARGS="-O2 -fpic -flto -shared"
|
||||||
BUILD_LIB_CPP_ARGS="$BUILD_LIB_CPP_ARGS"
|
BUILD_LIB_CPP_ARGS="$BUILD_LIB_C_ARGS"
|
||||||
BUILD_LIB_LINKER_ARGS="-flto -Wl,-soname,$LIB_FILE"
|
BUILD_LIB_LINKER_ARGS="-Wl,-soname,$LIB_FILE"
|
||||||
|
|
||||||
# build_test
|
# build_test
|
||||||
TEST_FILE=kerep.com
|
TEST_FILE=kerep.com
|
||||||
BUILD_TEST_C_ARGS="-O0 -g"
|
BUILD_TEST_C_ARGS="-O2"
|
||||||
BUILD_TEST_CPP_ARGS="$BUILD_TEST_CPP_ARGS"
|
BUILD_TEST_CPP_ARGS="$BUILD_TEST_C_ARGS"
|
||||||
BUILD_TEST_LINKER_ARGS=""
|
BUILD_TEST_LINKER_ARGS=""
|
||||||
|
|
||||||
|
# build_test_dbg
|
||||||
|
TEST_DBG_FILE=$TEST_FILE
|
||||||
|
BUILD_TEST_DBG_C_ARGS="-O0 -g"
|
||||||
|
BUILD_TEST_DBG_CPP_ARGS="$BUILD_TEST_DBG_C_ARGS"
|
||||||
|
BUILD_TEST_DBG_LINKER_ARGS=""
|
||||||
|
|||||||
@ -4,5 +4,5 @@ source build_scripts/init.sh
|
|||||||
|
|
||||||
print "${CYAN}===========[test_valgrind]============\n"
|
print "${CYAN}===========[test_valgrind]============\n"
|
||||||
cd $OUTDIR
|
cd $OUTDIR
|
||||||
valgrind $VALGRIND_ARGS ./$TEST_FILE
|
valgrind $VALGRIND_ARGS ./$TEST_DBG_FILE
|
||||||
cd ..
|
cd ..
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user