diff options
| author | hachem <im@hachem.wtf> | 2026-09-07 18:59:38 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-09-07 18:59:38 +0200 |
| commit | 6a0143e28f294dc5672404a8bbc1e6dbb0229ba8 (patch) | |
| tree | 799a832921ae15c150bd63fbf31cebcc92683360 | |
setup: initialize repo
| -rw-r--r-- | .gitignore | 4 | ||||
| -rw-r--r-- | Makefile | 38 | ||||
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | mkproj.c | 6 |
4 files changed, 49 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ab0ffed --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +mkproj +*.dSYM +.DS_Store + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b98c49f --- /dev/null +++ b/Makefile @@ -0,0 +1,38 @@ +CC := clang +SANITIZE ?= 1 + +CFLAGS := -g \ + -Wall \ + -Wextra \ + -Wshadow \ + -Wpedantic \ + -std=c17 \ + -Wconversion \ + -Wstrict-prototypes \ + -Wsign-conversion \ + -Wmissing-prototypes \ + -fno-omit-frame-pointer + +ifeq ($(SANITIZE),1) +CFLAGS += -fsanitize=address,undefined +LDFLAGS += -fsanitize=address,undefined +endif + +TARGET := mkproj +SRC := mkproj.c + +all: $(TARGET) + +$(TARGET): $(SRC) + $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS) + +check: + bear -- make clean all + cppcheck --enable=warning,style,performance,portability \ + --project=compile_commands.json \ + --error-exitcode=1 + +clean: + rm -f $(TARGET) + +.PHONY: all check clean diff --git a/README.md b/README.md new file mode 100644 index 0000000..dd9d25d --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# mkproj diff --git a/mkproj.c b/mkproj.c new file mode 100644 index 0000000..45f759c --- /dev/null +++ b/mkproj.c @@ -0,0 +1,6 @@ +#include <stdio.h> + +int main(void) +{ + (void) puts("type shi"); +} |
