commit 64c3aaf077aace6b2ae4b5fe65cf9e66331e7182 Author: Camden Dixie O'Brien Date: Thu Oct 24 11:37:33 2024 +0100 Create project skeleton diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..3840d47 --- /dev/null +++ b/.clang-format @@ -0,0 +1,21 @@ +--- +BasedOnStyle: WebKit +AlignAfterOpenBracket: AlwaysBreak +AlignConsecutiveMacros: false +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignEscapedNewlines: DontAlign +AlignOperands: false +AlignTrailingComments: false +TabWidth: 4 +UseTab: ForIndentation +DerivePointerAlignment: false +PointerAlignment: Right +BinPackArguments: true +BinPackParameters: true +ExperimentalAutoDetectBinPacking: false +AllowAllArgumentsOnNextLine: true +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortFunctionsOnASingleLine: None +ColumnLimit: 77 +... diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..567609b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/README b/README new file mode 100644 index 0000000..5aafa3e --- /dev/null +++ b/README @@ -0,0 +1 @@ + INFIX CALCULATOR diff --git a/app/main.c b/app/main.c new file mode 100644 index 0000000..ab37147 --- /dev/null +++ b/app/main.c @@ -0,0 +1,7 @@ +#include +#include + +int main(void) +{ + return EXIT_SUCCESS; +} diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100644 index 0000000..e7e86e1 --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,10 @@ +cd "$(git rev-parse --show-toplevel)" + +CFLAGS="$CFLAGS -std=c11 -pedantic -Wall -Wextra" +CFLAGS="$CFLAGS -Og -ggdb" + +mkdir -p build + +# Build application +clang $CFLAGS -c -o build/main.o app/main.c +clang $CFLAGS -o build/infix-calculator build/main.o diff --git a/scripts/entr.sh b/scripts/entr.sh new file mode 100644 index 0000000..f506c10 --- /dev/null +++ b/scripts/entr.sh @@ -0,0 +1,3 @@ +cd "$(git rev-parse --show-toplevel)" +find . -not \( -path build -prune \) \ + | entr -s 'clear && sh scripts/build.sh' diff --git a/scripts/format.sh b/scripts/format.sh new file mode 100644 index 0000000..0e92e72 --- /dev/null +++ b/scripts/format.sh @@ -0,0 +1,3 @@ +cd "$(git rev-parse --show-toplevel)" +find . -not \( -path build -prune \) -name '*.c' -o -name '*.h' \ + | xargs -n 1 clang-format -i