Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 49ccc76933 | |||
| d1660e05cb | |||
| 259d9873fb | |||
| 46029cd01f | |||
| 5953b84cff | |||
| 4c34c127a6 | |||
| cae29d6395 | |||
| 596c570756 | |||
| 1c93d4eb73 | |||
| 6126001e5a |
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# git add --renormalize .
|
||||
*.sh text eol=lf
|
||||
@@ -1 +1 @@
|
||||
2.2.1
|
||||
2.2.4
|
||||
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,3 +1,16 @@
|
||||
## 2.2.4
|
||||
+ **default config**: C standard changed to C99
|
||||
+ **default config**: enabled more warnings
|
||||
+ added file `default_vscode/c_cpp_properties.json`
|
||||
+ fixed copying of `default_vscode` files
|
||||
|
||||
## 2.2.3
|
||||
+ removed `\r` characters from `detect_os.sh`
|
||||
|
||||
## 2.2.2
|
||||
+ `bootstrap.sh` can show help for cbuild installations again
|
||||
+ copy dependency out files only if they are newer or don't exist
|
||||
|
||||
## 2.2.1
|
||||
+ updated `bootsrap.sh` to 1.0.2
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
CBUILD_BOOTSTRAP_VERSION=1.0.2
|
||||
CBUILD_BOOTSTRAP_VERSION=1.0.3
|
||||
set -eo pipefail
|
||||
|
||||
function version_parse {
|
||||
@@ -75,7 +75,6 @@ do
|
||||
;;
|
||||
'-h' | '--help')
|
||||
print_help
|
||||
exit 0
|
||||
;;
|
||||
'-c' | '--config')
|
||||
i=$((i+1))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
INSTALLED_CBUILD_VERSION=2.2.1
|
||||
INSTALLED_CBUILD_VERSION=2.2.4
|
||||
|
||||
# set \t size to 4 spaces
|
||||
tabs 4
|
||||
@@ -106,8 +106,10 @@ do
|
||||
|
||||
if ask_yn "Copy default .vscode launch tasks?"; then
|
||||
new_project_vscode_dir="$new_project_dir/.vscode"
|
||||
mkdir -p "$new_project_vscode_dir"
|
||||
cp -vr "$CBUILD_INSTALL_DIR/default_vscode/"* "$new_project_vscode_dir/"
|
||||
mkdir -pv "$new_project_vscode_dir"
|
||||
for vscode_dir_f in $(find "$CBUILD_INSTALL_DIR/default_vscode/" -type f); do
|
||||
cp -vr "$vscode_dir_f" "$new_project_vscode_dir/"
|
||||
done
|
||||
sed "s,\%PROJECT_NAME\%,$project_name,g" \
|
||||
"$new_project_vscode_dir/launch.json" > "$new_project_vscode_dir/launch.json.temp"
|
||||
mv "$new_project_vscode_dir/launch.json.temp" "$new_project_vscode_dir/launch.json"
|
||||
|
||||
@@ -1,13 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
CBUILD_VERSION=2.2.1
|
||||
CBUILD_VERSION=2.2.4
|
||||
|
||||
PROJECT="%PROJECT_NAME%"
|
||||
CMP_C="gcc"
|
||||
CMP_CPP="g++"
|
||||
STD_C="c11"
|
||||
STD_C="c99"
|
||||
STD_CPP="c++11"
|
||||
WARN_C="-Wall -Wno-discarded-qualifiers -Wextra -Wno-unused-parameter"
|
||||
WARN_CPP="-Wall -Wextra -Wno-unused-parameter"
|
||||
WARN_C="-Wall -Wextra
|
||||
-Wduplicated-branches
|
||||
-Wduplicated-cond
|
||||
-Wformat=2
|
||||
-Wmissing-include-dirs
|
||||
-Wshadow
|
||||
-Werror=return-type
|
||||
-Werror=pointer-arith
|
||||
-Werror=init-self
|
||||
-Werror=incompatible-pointer-types"
|
||||
WARN_CPP="$WARN_C"
|
||||
SRC_C="$(find src -name '*.c')"
|
||||
SRC_CPP="$(find src -name '*.cpp')"
|
||||
|
||||
@@ -24,22 +33,24 @@ ENABLED_DEPENDENCIES=''
|
||||
# └── profile/ - gcc *.gcda profiling info files
|
||||
OBJDIR="obj"
|
||||
OUTDIR="bin"
|
||||
STATIC_LIB_FILE="lib$PROJECT.a"
|
||||
STATIC_LIB_FILE="$PROJECT.a"
|
||||
|
||||
# example: "-I./include"
|
||||
INCLUDE=""
|
||||
|
||||
# OS-specific options
|
||||
case "$OS" in
|
||||
WINDOWS)
|
||||
EXEC_FILE="$PROJECT.exe"
|
||||
SHARED_LIB_FILE="$PROJECT.dll"
|
||||
# example: "-I./dependencies/include/SDL2"
|
||||
INCLUDE=""
|
||||
INCLUDE="$INCLUDE "
|
||||
# example: "-lSDL2 -lSDL2_image"
|
||||
LINKER_LIBS=""
|
||||
;;
|
||||
LINUX)
|
||||
EXEC_FILE="$PROJECT"
|
||||
SHARED_LIB_FILE="$PROJECT.so"
|
||||
INCLUDE=""
|
||||
INCLUDE="$INCLUDE "
|
||||
LINKER_LIBS=""
|
||||
;;
|
||||
*)
|
||||
|
||||
14
default_vscode/c_cpp_properties.json
Normal file
14
default_vscode/c_cpp_properties.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "all",
|
||||
"defines": [],
|
||||
"includePath": [
|
||||
// "include",
|
||||
"${default}"
|
||||
],
|
||||
"cStandard": "c99"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
DEP_WORKING_DIR='depencencies/libexample1'
|
||||
DEP_WORKING_DIR='dependencies/libexample1'
|
||||
DEP_PRE_BUILD_COMMAND=''
|
||||
DEP_BUILD_COMMAND='make libexample1.a'
|
||||
DEP_POST_BUILD_COMMAND=''
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
DEP_WORKING_DIR='depencencies/libexample2'
|
||||
DEP_WORKING_DIR='dependencies/libexample2'
|
||||
DEP_PRE_BUILD_COMMAND=''
|
||||
DEP_POST_BUILD_COMMAND=''
|
||||
DEP_CLEAN_COMMAND='make clean'
|
||||
|
||||
@@ -90,10 +90,10 @@ function build_dependency {
|
||||
if [ "$PRESERVE_OUT_DIRECTORY_STRUCTURE" = true ] && [ "$file_dir" != '.' ]; then
|
||||
mkdir -p "$proj_root_dir/$OUTDIR/$file_dir"
|
||||
mkdir -p "$proj_root_dir/$OBJDIR/dynamic_libs/$file_dir"
|
||||
cp -v "$file" "$proj_root_dir/$OUTDIR/$file"
|
||||
cp -v -u --preserve=timestamps "$file" "$proj_root_dir/$OUTDIR/$file"
|
||||
ln -sfv "$real_file" "$proj_root_dir/$OBJDIR/dynamic_libs/$file"
|
||||
else
|
||||
cp -v "$file" "$proj_root_dir/$OUTDIR/"
|
||||
cp -v -u --preserve=timestamps "$file" "$proj_root_dir/$OUTDIR/"
|
||||
ln -sfv "$real_file" "$proj_root_dir/$OBJDIR/dynamic_libs/"
|
||||
fi
|
||||
done
|
||||
@@ -104,9 +104,9 @@ function build_dependency {
|
||||
if [ "$PRESERVE_OUT_DIRECTORY_STRUCTURE" = true ]; then
|
||||
file_dir=$(dirname $file)
|
||||
mkdir -p "$proj_root_dir/$OUTDIR/$file_dir"
|
||||
cp -v "$file" "$proj_root_dir/$OUTDIR/$file"
|
||||
cp -v -u --preserve=timestamps "$file" "$proj_root_dir/$OUTDIR/$file"
|
||||
else
|
||||
cp -v "$file" "$proj_root_dir/$OUTDIR/"
|
||||
cp -v -u --preserve=timestamps "$file" "$proj_root_dir/$OUTDIR/"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user