hachem.wtf
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--Makefile38
-rw-r--r--README.md1
-rw-r--r--mkproj.c6
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");
+}