diff options
Diffstat (limited to '.boilerplates/c')
-rw-r--r-- | .boilerplates/c/.gitignore | 3 | ||||
-rw-r--r-- | .boilerplates/c/makefile | 24 | ||||
-rwxr-xr-x | .boilerplates/c/run | 7 | ||||
-rw-r--r-- | .boilerplates/c/src/main.c | 18 |
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; -} |