Create project skeleton
This commit is contained in:
commit
64c3aaf077
21
.clang-format
Normal file
21
.clang-format
Normal file
@ -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
|
||||
...
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
build/
|
7
app/main.c
Normal file
7
app/main.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return EXIT_SUCCESS;
|
||||
}
|
10
scripts/build.sh
Normal file
10
scripts/build.sh
Normal file
@ -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
|
3
scripts/entr.sh
Normal file
3
scripts/entr.sh
Normal file
@ -0,0 +1,3 @@
|
||||
cd "$(git rev-parse --show-toplevel)"
|
||||
find . -not \( -path build -prune \) \
|
||||
| entr -s 'clear && sh scripts/build.sh'
|
3
scripts/format.sh
Normal file
3
scripts/format.sh
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user