small changes
This commit is contained in:
@@ -6,6 +6,5 @@ print "${CYAN}=============[build_lib]==============\n"
|
||||
clear_dir bin
|
||||
clear_dir obj
|
||||
compile_c "-O2 -fpic -shared" "$SRC_C tests/test_marshalling.c"
|
||||
compile_cpp "-flto -Wl,-soname,$LIB_FILE" "$SRC_CPP"
|
||||
link " " $LIB_FILE
|
||||
rm -rf $OBJDIR
|
||||
compile_cpp "-O2 -fpic -shared" "$SRC_CPP"
|
||||
link "-shared -O2 -fpic -flto -Wl,-soname,$LIB_FILE" "$LIB_FILE"
|
||||
|
||||
@@ -8,4 +8,3 @@ clear_dir obj
|
||||
compile_c "-O0 -g" "$SRC_C $TESTS_C"
|
||||
compile_cpp "-O0 -g" "$SRC_CPP $TESTS_CPP"
|
||||
link " " $TEST_FILE
|
||||
rm -rf $OBJDIR
|
||||
|
||||
@@ -48,6 +48,12 @@ function link {
|
||||
print "${BLUE}outfile: ${GRAY}$outfile\n"
|
||||
local objects="$(find $OBJDIR -name *.o)"
|
||||
print "${BLUE}objects: ${GRAY}$objects\n"
|
||||
$CMP_C $args -o $outfile $(echo $objects | tr '\n' ' ')
|
||||
print "${GREEN}file $CYAN$outfile ${GREEN}created\n"
|
||||
if $CMP_C $args -o $outfile $(echo $objects | tr '\n' ' ')
|
||||
then
|
||||
print "${GREEN}file $CYAN$outfile ${GREEN}created\n"
|
||||
rm -rf $OBJDIR
|
||||
else
|
||||
print "${RED}some error happened\n"
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user