aboutsummaryrefslogtreecommitdiff
path: root/.boilerplates/c
diff options
context:
space:
mode:
authorMarvin Borner2022-05-31 14:17:19 +0200
committerMarvin Borner2022-05-31 14:17:19 +0200
commitb8be82d9113dd0fec9021aa573039cc64dbd849a (patch)
tree0694d21e5ba03e843dc6f03d1c5b1ed033123875 /.boilerplates/c
parent272cc6e941d798d7270fcf74a98f592ef06e14ac (diff)
Clean
Diffstat (limited to '.boilerplates/c')
-rw-r--r--.boilerplates/c/.gitignore3
-rw-r--r--.boilerplates/c/makefile24
-rwxr-xr-x.boilerplates/c/run7
-rw-r--r--.boilerplates/c/src/main.c18
4 files changed, 0 insertions, 52 deletions
diff --git a/.boilerplates/c/.gitignore b/.boilerplates/c/.gitignore
deleted file mode 100644
index 3a401d0..0000000
--- a/.boilerplates/c/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-out/
-compile_commands.json
-tags
diff --git a/.boilerplates/c/makefile b/.boilerplates/c/makefile
deleted file mode 100644
index 7f33a3b..0000000
--- a/.boilerplates/c/makefile
+++ /dev/null
@@ -1,24 +0,0 @@
-TARGET=out/name
-CC=gcc
-CFLAGS=-Iinc -Wall -Wextra -g
-
-SRC=$(wildcard src/*.c)
-OBJ=$(patsubst src/%.c,out/%.o,$(SRC))
-MAKEFLAGS+=--silent
-
-all: $(TARGET)
-
-$(TARGET): $(OBJ)
- $(CC) $(CFLAGS) -o $@ $^
-
-out/%.o: src/%.c
- @mkdir -p "$(@D)"
- $(CC) $(CFLAGS) -MD -o $@ -c $<
-
-
-clean:
- rm -rf out/
-
--include $(OBJECTS:.o=.d)
-
-.PHONY: all clean run
diff --git a/.boilerplates/c/run b/.boilerplates/c/run
deleted file mode 100755
index 6eea488..0000000
--- a/.boilerplates/c/run
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env sh
-
-make --always-make --dry-run | grep -w 'gcc' | grep -w '\-c' | jq -nR '[inputs|{directory:".", command:., file: match(" [^ ]+$").string[1:]}]' > compile_commands.json
-
-ctags -R --exclude=.git --exclude=out .
-
-make && ./out/name "$@"
diff --git a/.boilerplates/c/src/main.c b/.boilerplates/c/src/main.c
deleted file mode 100644
index 10ea279..0000000
--- a/.boilerplates/c/src/main.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-void print_help()
-{
- printf("Help\n");
- exit(1);
-}
-
-int main(int argc, char *argv[])
-{
- if (argc == 2 && (strcmp(argv[1], "--help") == 0))
- print_help();
-
- printf("Hello, world!\n");
- return 0;
-}