Fix inline bug, build.sh
All checks were successful
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=OFF (push) Successful in 16s
CMake / ubuntu-latest - shared=ON, pthread=OFF, posix=OFF (push) Successful in 18s
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=ON (push) Successful in 16s
CMake / ubuntu-latest - shared=ON, pthread=OFF, posix=ON (push) Successful in 17s
CMake / ubuntu-latest - shared=OFF, pthread=ON, posix=ON (push) Successful in 15s
CMake / ubuntu-latest - shared=ON, pthread=ON, posix=ON (push) Successful in 12s
All checks were successful
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=OFF (push) Successful in 16s
CMake / ubuntu-latest - shared=ON, pthread=OFF, posix=OFF (push) Successful in 18s
CMake / ubuntu-latest - shared=OFF, pthread=OFF, posix=ON (push) Successful in 16s
CMake / ubuntu-latest - shared=ON, pthread=OFF, posix=ON (push) Successful in 17s
CMake / ubuntu-latest - shared=OFF, pthread=ON, posix=ON (push) Successful in 15s
CMake / ubuntu-latest - shared=ON, pthread=ON, posix=ON (push) Successful in 12s
Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
20
build.sh
20
build.sh
@@ -8,7 +8,7 @@ CFLAGS="-std=gnu99 -Wall -Wextra -pedantic -Werror -Wno-newline-eof -Wno-languag
|
||||
BUILD_SHARED=1
|
||||
PTHREAD_SUPPORT=1
|
||||
POSIX_SUPPORT=1
|
||||
BUILD_PROGRAMS=0
|
||||
BUILD_PROGRAMS=1
|
||||
SRC_DIR="src"
|
||||
INCLUDE_DIR="include"
|
||||
PROGRAMS_DIR="programs"
|
||||
@@ -50,21 +50,23 @@ $CC $CFLAGS -fPIC -shared "../$SRC_DIR/dcfg.c" -I"../$INCLUDE_DIR" -o "$OUTPUT_N
|
||||
$CC $CFLAGS -c "../$SRC_DIR/dcfg.c" -I"../$INCLUDE_DIR"
|
||||
ar rcs "$OUTPUT_NAME.a" dcfg.o
|
||||
set +x
|
||||
|
||||
echo "Installing library..."
|
||||
cp -r "../$INCLUDE_DIR/"* "$INSTALL_DIR/include/"
|
||||
cp "$OUTPUT_NAME.so" "$INSTALL_DIR/lib/"
|
||||
cp "$OUTPUT_NAME.a" "$INSTALL_DIR/lib/"
|
||||
|
||||
#
|
||||
# Build programs if requested
|
||||
if [ "$BUILD_PROGRAMS" -eq 1 ]; then
|
||||
echo "Building example programs..."
|
||||
for src in "../$PROGRAMS_DIR"/*.c; do
|
||||
prog=$(basename "$src" .c)
|
||||
echo "Building $prog..."
|
||||
$CC $CFLAGS "$src" -I"../$INCLUDE_DIR" "$OUTPUT_NAME.a" $LIBS -o "$prog"
|
||||
cp "$prog" "$INSTALL_DIR/bin/"
|
||||
$CC $CFLAGS -c "$src" -I"../$INCLUDE_DIR"
|
||||
mkdir -p bin
|
||||
$CC $CFLAGS "$prog.o" "$OUTPUT_NAME.a" $LIBS -o "bin/$prog"
|
||||
done
|
||||
fi
|
||||
|
||||
echo "Installing library..."
|
||||
cp -r "../$INCLUDE_DIR/"* "$INSTALL_DIR/include/"
|
||||
cp "$OUTPUT_NAME.so" "$INSTALL_DIR/lib/"
|
||||
cp "$OUTPUT_NAME.a" "$INSTALL_DIR/lib/"
|
||||
cp -r "bin/"* "$INSTALL_DIR/bin/"
|
||||
|
||||
echo "Done. Installed to $INSTALL_DIR"
|
||||
|
@@ -99,7 +99,8 @@ static inline bool dcfg_Value_get_array_item(
|
||||
{
|
||||
return dcfg_Value_get_array_item_ex(value, index, out_value, true);
|
||||
}
|
||||
bool dcfg_Value_get_function_body(dcfg_Value *value, dcfg_Value **out_value)
|
||||
static inline bool dcfg_Value_get_function_body(
|
||||
dcfg_Value *value, dcfg_Value **out_value)
|
||||
{
|
||||
return dcfg_Value_get_function_body_ex(value, out_value, true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user